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
|
@ -289,7 +289,9 @@ void Source::GenerateFrame() {
|
|||
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);
|
||||
}
|
||||
|
|
Reference in New Issue