output/Multiple: move Wait() to struct PlayerControl

Eliminate a dependency from MultipleOutputs on PlayerControl.
This commit is contained in:
Max Kellermann
2016-12-14 12:54:19 +01:00
parent 7c6b0d5c31
commit ece5971027
5 changed files with 32 additions and 29 deletions

View File

@@ -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()
{