From a477481aabaa16f1ed15af456125160bc8face5a Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 9 Mar 2014 00:04:37 +0100 Subject: audio/out: feed AOs from a separate thread This has 2 goals: - Ensure that AOs have always enough data, even if the device buffers are very small. - Reduce complexity in some AOs, which do their own buffering. One disadvantage is that performance is slightly reduced due to more copying. Implementation-wise, we don't change ao.c much, and instead "redirect" the driver's callback to an API wrapper in push.c. Additionally, we add code for dealing with AOs that have a pull API. These AOs usually do their own buffering (jack, coreaudio, portaudio), and adding a thread is basically a waste. The code in pull.c manages a ringbuffer, and allows callback-based AOs to read data directly. --- old-makefile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'old-makefile') diff --git a/old-makefile b/old-makefile index 0614829e6f..c2ca755335 100644 --- a/old-makefile +++ b/old-makefile @@ -181,6 +181,8 @@ SOURCES = audio/audio.c \ audio/out/ao.c \ audio/out/ao_null.c \ audio/out/ao_pcm.c \ + audio/out/pull.c \ + audio/out/push.c \ bstr/bstr.c \ common/asxparser.c \ common/av_common.c \ -- cgit v1.2.3