Can set the asm buffer size just once

This commit is contained in:
Gwilym Kuiper 2022-12-10 00:01:08 +00:00
parent 6f2c1bc616
commit a870a1deda

View file

@ -140,6 +140,8 @@ impl Mixer {
buffer_pointer_for_interrupt_handler.swap(cs); buffer_pointer_for_interrupt_handler.swap(cs);
}); });
set_asm_buffer_size(frequency);
Self { Self {
frequency, frequency,
buffer, buffer,
@ -391,8 +393,6 @@ impl MixerBuffer {
} }
fn write_channels<'a>(&mut self, channels: impl Iterator<Item = &'a mut SoundChannel>) { fn write_channels<'a>(&mut self, channels: impl Iterator<Item = &'a mut SoundChannel>) {
set_asm_buffer_size(self.frequency);
self.working_buffer.fill(0.into()); self.working_buffer.fill(0.into());
for channel in channels { for channel in channels {