mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-24 23:53:12 -04:00
Clear history samples when resetting channel
This commit is contained in:
@@ -60,7 +60,7 @@ static void RenderChannel(
|
||||
ChannelAuxData& channelAux,
|
||||
DspSubframe& subframe);
|
||||
|
||||
static void ResetChannel(JASDsp::TChannel& channel, const ChannelAuxData& aux) {
|
||||
static void ResetChannel(JASDsp::TChannel& channel, ChannelAuxData& aux) {
|
||||
channel.mSamplesLeft = channel.mEndSample - channel.mSamplePosition;
|
||||
|
||||
const SDL_AudioSpec spec = {
|
||||
@@ -69,6 +69,9 @@ static void ResetChannel(JASDsp::TChannel& channel, const ChannelAuxData& aux) {
|
||||
static_cast<int>(static_cast<u64>(SampleRate) * channel.mPitch / 4096)
|
||||
};
|
||||
|
||||
aux.hist0 = 0;
|
||||
aux.hist1 = 0;
|
||||
|
||||
SDL_ClearAudioStream(aux.resampleStream);
|
||||
SDL_SetAudioStreamFormat(aux.resampleStream, &spec, nullptr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user