mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-25 01:01:34 +11:00
Better comparison
This commit is contained in:
parent
f5d771d349
commit
8cffa4ae3d
|
@ -133,7 +133,7 @@ impl MixerBuffer {
|
||||||
let right_amount = ((channel.panning + 1) / 2) * channel.volume;
|
let right_amount = ((channel.panning + 1) / 2) * channel.volume;
|
||||||
let left_amount = ((-channel.panning + 1) / 2) * channel.volume;
|
let left_amount = ((-channel.panning + 1) / 2) * channel.volume;
|
||||||
|
|
||||||
if channel.pos + channel.playback_speed * SOUND_BUFFER_SIZE >= channel.data.len().into()
|
if (channel.pos + channel.playback_speed * SOUND_BUFFER_SIZE).floor() >= channel.data.len()
|
||||||
{
|
{
|
||||||
// TODO: This should probably play what's left rather than skip the last bit
|
// TODO: This should probably play what's left rather than skip the last bit
|
||||||
if channel.should_loop {
|
if channel.should_loop {
|
||||||
|
|
Loading…
Reference in a new issue