output/Multiple: move Wait() to struct PlayerControl
Eliminate a dependency from MultipleOutputs on PlayerControl.
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "MultipleOutputs.hxx"
|
||||
#include "player/Control.hxx"
|
||||
#include "Internal.hxx"
|
||||
#include "Domain.hxx"
|
||||
#include "MusicBuffer.hxx"
|
||||
@@ -331,22 +330,6 @@ MultipleOutputs::Check()
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool
|
||||
MultipleOutputs::Wait(PlayerControl &pc, unsigned threshold)
|
||||
{
|
||||
pc.Lock();
|
||||
|
||||
if (Check() < threshold) {
|
||||
pc.Unlock();
|
||||
return true;
|
||||
}
|
||||
|
||||
pc.Wait();
|
||||
pc.Unlock();
|
||||
|
||||
return Check() < threshold;
|
||||
}
|
||||
|
||||
void
|
||||
MultipleOutputs::Pause()
|
||||
{
|
||||
|
||||
@@ -159,16 +159,6 @@ public:
|
||||
*/
|
||||
unsigned Check();
|
||||
|
||||
/**
|
||||
* Checks if the size of the #MusicPipe is below the #threshold. If
|
||||
* not, it attempts to synchronize with all output threads, and waits
|
||||
* until another #MusicChunk is finished.
|
||||
*
|
||||
* @param threshold the maximum number of chunks in the pipe
|
||||
* @return true if there are less than #threshold chunks in the pipe
|
||||
*/
|
||||
bool Wait(PlayerControl &pc, unsigned threshold);
|
||||
|
||||
/**
|
||||
* Puts all audio outputs into pause mode. Most implementations will
|
||||
* simply close it then.
|
||||
|
||||
Reference in New Issue
Block a user