summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--servers/audio_server.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp
index a08733de87..8b14a5a8a7 100644
--- a/servers/audio_server.cpp
+++ b/servers/audio_server.cpp
@@ -892,15 +892,15 @@ void AudioServer::load_default_bus_layout() {
void AudioServer::finish() {
+ for (int i = 0; i < AudioDriverManager::get_driver_count(); i++) {
+ AudioDriverManager::get_driver(i)->finish();
+ }
+
for (int i = 0; i < buses.size(); i++) {
memdelete(buses[i]);
}
buses.clear();
-
- for (int i = 0; i < AudioDriverManager::get_driver_count(); i++) {
- AudioDriverManager::get_driver(i)->finish();
- }
}
void AudioServer::update() {