mpv/audio
wm4 39609fc19a audio/out/push: redo audio waiting
Improve the logic how the audio thread decides how to wait until the AO
is ready for new data. The previous commit makes some of this easier,
although it turned out that it wasn't required, and we still can handle
AOs with bad get_space implementation (although the new code prints an
error message, and it might fail in obscure situations).

The new code is pretty similar to the old one, and the main thing that
changes is that complicated conditions are tweaked. AO waiting is now
used better (mainly instead of max>0, r>0 is used). Whether to wakeup
is reevaluated every time, instead of somehow doing the wrong thing
and compensating for it with a flag.

This fixes the specific situation when the device buffer is full, and
we don't want to buffer more data. In the old code, this wasn't handled
correctly: the AO went to sleep forever, because it prevented proper
wakeup by the AO driver, and as consequence never asked the core for new
data. Commit 4fa3ffeb was a hack-fix against this, and now that we have
a proper solution, this hack is removed as well.

Also make the refill threshold consistent and always use 1/4 of the
buffer. (The threshold is used for situations when an AO doesn't
support proper waiting or chunked processing.)

This commit will probably cause a bunch of regressions again.
2014-09-06 12:59:04 +02:00
..
decode Move compat/ and bstr/ directory contents somewhere else 2014-08-29 12:31:52 +02:00
filter af_hrtf: request required samplerate, instead of erroring out 2014-09-05 20:49:35 +02:00
out audio/out/push: redo audio waiting 2014-09-06 12:59:04 +02:00
audio.c af_fmt2bits: change to af_fmt2bps (bytes/sample) where appropriate 2014-05-28 21:38:00 +02:00
audio.h af_fmt2bits: change to af_fmt2bps (bytes/sample) where appropriate 2014-05-28 21:38:00 +02:00
audio_buffer.c Split mpvcore/ into common/, misc/, bstr/ 2013-12-17 02:39:45 +01:00
audio_buffer.h audio: add mp_audio_buffer 2013-11-12 23:28:21 +01:00
chmap.c Add more const 2014-06-11 00:39:14 +02:00
chmap.h Move compat/ and bstr/ directory contents somewhere else 2014-08-29 12:31:52 +02:00
chmap_sel.c Add more const 2014-06-11 00:39:14 +02:00
chmap_sel.h audio: add channel map selection function 2013-05-12 21:24:57 +02:00
fmt-conversion.c audio: fix format ID conversion 2013-12-23 21:24:41 +01:00
fmt-conversion.h ad_lavc: use fmt-conversion to map sample formats 2013-04-13 04:21:27 +02:00
format.c af_fmt2bits: change to af_fmt2bps (bytes/sample) where appropriate 2014-05-28 21:38:00 +02:00
format.h Move compat/ and bstr/ directory contents somewhere else 2014-08-29 12:31:52 +02:00
mixer.c audio/out: remove old things 2014-09-06 02:30:57 +02:00
mixer.h player: show "neutral" position markers for OSD bars 2014-06-08 23:52:58 +02:00