1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-08-15 14:27:29 +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() { MainWindow::~MainWindow() {
// Stop the timer.
timer.reset();
// Stop the audio output, and its thread. // Stop the audio output, and its thread.
if(audioOutput) { if(audioOutput) {
audioThread.performAsync([this] { audioThread.performAsync([this] {
@@ -90,9 +93,6 @@ MainWindow::~MainWindow() {
}); });
audioThread.stop(); audioThread.stop();
} }
// Stop the timer.
timer.reset();
} }
// MARK: Machine launch. // MARK: Machine launch.