1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-05 19:31:35 +00:00

Merge pull request #10028 from marcelofg55/audioserver_finish

Fix AudioServer::finish not getting called while quitting
This commit is contained in:
Rémi Verschelde
2017-08-02 00:16:33 +02:00
committed by GitHub
2 changed files with 3 additions and 1 deletions

View File

@@ -1704,6 +1704,7 @@ void Main::cleanup() {
#endif
if (audio_server) {
audio_server->finish();
memdelete(audio_server);
}

View File

@@ -66,7 +66,8 @@ void AudioDriver::audio_server_process(int p_frames, int32_t *p_buffer, bool p_u
void AudioDriver::update_mix_time(int p_frames) {
_mix_amount += p_frames;
_last_mix_time = OS::get_singleton()->get_ticks_usec();
if (OS::get_singleton())
_last_mix_time = OS::get_singleton()->get_ticks_usec();
}
double AudioDriver::get_mix_time() const {