diff options
Diffstat (limited to 'servers/audio/audio_driver_dummy.cpp')
-rw-r--r-- | servers/audio/audio_driver_dummy.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/servers/audio/audio_driver_dummy.cpp b/servers/audio/audio_driver_dummy.cpp index 5389c64099..69b098edfc 100644 --- a/servers/audio/audio_driver_dummy.cpp +++ b/servers/audio/audio_driver_dummy.cpp @@ -49,7 +49,6 @@ Error AudioDriverDummy::init() { samples_in = memnew_arr(int32_t, buffer_frames * channels); - mutex = Mutex::create(); thread = Thread::create(AudioDriverDummy::thread_func, this); return OK; @@ -95,16 +94,16 @@ AudioDriver::SpeakerMode AudioDriverDummy::get_speaker_mode() const { void AudioDriverDummy::lock() { - if (!thread || !mutex) + if (!thread) return; - mutex->lock(); + mutex.lock(); }; void AudioDriverDummy::unlock() { - if (!thread || !mutex) + if (!thread) return; - mutex->unlock(); + mutex.unlock(); }; void AudioDriverDummy::finish() { @@ -120,14 +119,11 @@ void AudioDriverDummy::finish() { }; memdelete(thread); - if (mutex) - memdelete(mutex); thread = NULL; }; AudioDriverDummy::AudioDriverDummy() { - mutex = NULL; thread = NULL; }; |