audio export: fix sample rate change

This commit is contained in:
tildearrow 2024-05-11 02:05:20 -05:00
parent 008fe4b6b8
commit fc66fe1b15

View file

@ -403,6 +403,7 @@ bool DivEngine::saveAudio(const char* path, DivAudioExportOptions options) {
repeatPattern=false;
setOrder(0);
remainingLoops=-1;
got.rate=options.sampleRate;
if (shallSwitchCores()) {
bool isMutedBefore[DIV_MAX_CHANS];
@ -417,7 +418,6 @@ bool DivEngine::saveAudio(const char* path, DivAudioExportOptions options) {
}
}
got.rate=options.sampleRate;
exportOutputs=options.chans;
if (exportOutputs<1) exportOutputs=1;
if (exportOutputs>DIV_MAX_OUTPUTS) exportOutputs=DIV_MAX_OUTPUTS;