Skip to content

Commit

Permalink
another bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
KinoMyu committed Jul 3, 2018
1 parent 44a8f33 commit a225e95
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,10 @@ void MainWindow::reset()
BASS_ChannelPause(play_stream);
}
// Set positions and flush buffer
for(int i = 0; i < unitsize; ++i)
{
BASS_ChannelSetPosition(idols[i]->get_decode_channel(), 0, BASS_POS_BYTE);
}
BASS_Mixer_ChannelSetPosition(bgm->get_decode_channel(), 0, BASS_POS_BYTE | BASS_POS_MIXER_RESET);
}

Expand All @@ -340,11 +344,11 @@ void MainWindow::save()
{
return;
}
reset();
// Wait for all HCA audio to be decoded
dec.wait_for_finish();
// Stream needs to be paused else the output will be garbled
BASS_ChannelPause(play_stream);
reset();
export_to_wav(bgm->get_decode_channel(), mix_stream, filename);
reset();
}
Expand Down

0 comments on commit a225e95

Please sign in to comment.