diff options
Diffstat (limited to 'drivers/pulseaudio/audio_driver_pulseaudio.cpp')
-rw-r--r-- | drivers/pulseaudio/audio_driver_pulseaudio.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/pulseaudio/audio_driver_pulseaudio.cpp b/drivers/pulseaudio/audio_driver_pulseaudio.cpp index df9303fbec..ee9278fb8f 100644 --- a/drivers/pulseaudio/audio_driver_pulseaudio.cpp +++ b/drivers/pulseaudio/audio_driver_pulseaudio.cpp @@ -291,7 +291,6 @@ Error AudioDriverPulseAudio::init() { Error err = init_device(); if (err == OK) { - mutex = Mutex::create(); thread = Thread::create(AudioDriverPulseAudio::thread_func, this); } @@ -597,16 +596,16 @@ void AudioDriverPulseAudio::set_device(String device) { void AudioDriverPulseAudio::lock() { - if (!thread || !mutex) + if (!thread) return; - mutex->lock(); + mutex.lock(); } void AudioDriverPulseAudio::unlock() { - if (!thread || !mutex) + if (!thread) return; - mutex->unlock(); + mutex.unlock(); } void AudioDriverPulseAudio::finish_device() { @@ -640,10 +639,6 @@ void AudioDriverPulseAudio::finish() { } memdelete(thread); - if (mutex) { - memdelete(mutex); - mutex = NULL; - } thread = NULL; } @@ -800,7 +795,6 @@ String AudioDriverPulseAudio::capture_get_device() { AudioDriverPulseAudio::AudioDriverPulseAudio() : thread(NULL), - mutex(NULL), pa_ml(NULL), pa_ctx(NULL), pa_str(NULL), |