1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-27 16:31:31 +00:00

Ensures audio is not being pumped while the AudioBuffer is being destructed.

This commit is contained in:
Thomas Harte 2020-06-19 23:09:39 -04:00
parent 95e98323c5
commit 12ee8e4db4

View File

@ -83,6 +83,9 @@ void MainWindow::about() {
}
MainWindow::~MainWindow() {
// Stop the timer.
timer.reset();
// Stop the audio output, and its thread.
if(audioOutput) {
audioThread.performAsync([this] {
@ -90,9 +93,6 @@ MainWindow::~MainWindow() {
});
audioThread.stop();
}
// Stop the timer.
timer.reset();
}
// MARK: Machine launch.