mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
This improves mixing performance by about 20%
This commit is contained in:
parent
ff0e8f659e
commit
d6384a6886
|
@ -433,6 +433,8 @@ impl MixerBuffer {
|
|||
channel.pos += 2 * self.frequency.buffer_size() as u32;
|
||||
}
|
||||
|
||||
#[link_section = ".iwram.write_mono"]
|
||||
#[inline(never)]
|
||||
fn write_mono(&self, channel: &mut SoundChannel, working_buffer: &mut [Num<i16, 4>]) {
|
||||
let right_amount = ((channel.panning + 1) / 2) * channel.volume;
|
||||
let left_amount = ((-channel.panning + 1) / 2) * channel.volume;
|
||||
|
|
Loading…
Reference in a new issue