decoder/Bridge: move code to DecoderControl::SetReady()
This commit is contained in:
@@ -53,6 +53,27 @@ DecoderControl::WaitForDecoder()
|
||||
client_is_waiting = false;
|
||||
}
|
||||
|
||||
void
|
||||
DecoderControl::SetReady(const AudioFormat audio_format,
|
||||
bool _seekable, SignedSongTime _duration)
|
||||
{
|
||||
assert(state == DecoderState::START);
|
||||
assert(pipe != nullptr);
|
||||
assert(pipe->IsEmpty());
|
||||
assert(audio_format.IsDefined());
|
||||
assert(audio_format.IsValid());
|
||||
|
||||
in_audio_format = audio_format;
|
||||
out_audio_format = audio_format;
|
||||
out_audio_format.ApplyMask(configured_audio_format);
|
||||
|
||||
seekable = _seekable;
|
||||
total_time = _duration;
|
||||
|
||||
state = DecoderState::DECODE;
|
||||
client_cond.signal();
|
||||
}
|
||||
|
||||
bool
|
||||
DecoderControl::IsCurrentSong(const DetachedSong &_song) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user