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:
@@ -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.
|
||||||
|
Reference in New Issue
Block a user