Fix AudioServer::finish not getting called while quitting

This commit is contained in:
Marcelo Fernandez 2017-08-01 18:09:52 -03:00
parent 6dd1cdc9db
commit 3180827387
2 changed files with 3 additions and 1 deletions

View File

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

View File

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