mixer: advance position before mixing

Sometimes, the play position in stream is behind the out stream, mostly
because of timing issue. In this case, the mixer will produce invalid
packets which in return will lead to looping on an invalid packet in
the audio_drv.

Issue #1666.
This commit is contained in:
Josef Söntgen 2015-09-02 17:05:56 +02:00 committed by Christian Helmuth
parent 7d12bdc8bc
commit a9569eb41e

View File

@ -292,11 +292,11 @@ class Audio_out::Mixer : public Thread<1024 * sizeof(addr_t)>
continue; continue;
} }
_mix();
/* advance position of clients */ /* advance position of clients */
_advance_position(); _advance_position();
_mix();
if (!_left.stream()->empty()) if (!_left.stream()->empty())
_wait_for_progress(); _wait_for_progress();
else else