HLE DSP: Reset flags should take priority

This commit is contained in:
wheremyfoodat 2024-07-30 00:36:16 +03:00
parent 6668ba3e37
commit e26f58595e

View file

@ -253,6 +253,17 @@ namespace Audio {
return; return;
} }
// The reset flags take priority, as you can reset a source and set it up to be played again at the same time
if (config.resetFlag) {
config.resetFlag = 0;
source.reset();
}
if (config.partialResetFlag) {
config.partialResetFlag = 0;
source.buffers = {};
}
if (config.enableDirty) { if (config.enableDirty) {
config.enableDirty = 0; config.enableDirty = 0;
source.enabled = config.enable != 0; source.enabled = config.enable != 0;
@ -272,16 +283,6 @@ namespace Audio {
); );
} }
if (config.resetFlag) {
config.resetFlag = 0;
source.reset();
}
if (config.partialResetFlag) {
config.partialResetFlag = 0;
source.buffers = {};
}
// TODO: Should we check bufferQueueDirty here too? // TODO: Should we check bufferQueueDirty here too?
if (config.formatDirty || config.embeddedBufferDirty) { if (config.formatDirty || config.embeddedBufferDirty) {
source.sampleFormat = config.format; source.sampleFormat = config.format;