output/Internal: move the Mutex to struct AudioOutputControl

struct AudioOutput should not know or care about multi-threading.
This commit is contained in:
Max Kellermann
2017-06-08 22:23:26 +02:00
parent 546b773b21
commit 27d68d8fdd
6 changed files with 9 additions and 10 deletions
+5 -1
View File
@@ -23,6 +23,7 @@
#include "Source.hxx"
#include "AudioFormat.hxx"
#include "thread/Thread.hxx"
#include "thread/Mutex.hxx"
#include "thread/Cond.hxx"
#include "system/PeriodClock.hxx"
#include "Compiler.h"
@@ -203,7 +204,10 @@ class AudioOutputControl {
bool skip_delay;
public:
Mutex &mutex;
/**
* This mutex protects #open, #fail_timer, #pipe.
*/
mutable Mutex mutex;
AudioOutputControl(AudioOutput *_output, AudioOutputClient &_client);