mirror of
https://github.com/PabloMK7/citra
synced 2024-11-15 13:18:24 +00:00
HLE Audio: Increase frame position by input buffer sample rate (#5049)
* HLE Audio: Increase frame position by input buffer sample rate Currently the frame position moves ahead by the number of samples output, but thats a fixed number based on the 3ds native sample rate. Instead, based on a homebrew by cyuubi and looking at the lle audio, this sample position should be moved forward by the number of samples from the input buffer that was read, based on the buffer's sample rate.
This commit is contained in:
parent
f8d717bc7a
commit
a6ee1bf913
1 changed files with 3 additions and 1 deletions
|
@ -289,7 +289,9 @@ void Source::GenerateFrame() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
state.next_sample_number += static_cast<u32>(frame_position);
|
// TODO(jroweboy): Keep track of frame_position independently so that it doesn't lose precision
|
||||||
|
// over time
|
||||||
|
state.next_sample_number += static_cast<u32>(frame_position * state.rate_multiplier);
|
||||||
|
|
||||||
state.filters.ProcessFrame(current_frame);
|
state.filters.ProcessFrame(current_frame);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue