path: root/
diff options
authorwm4 <wm4@nowhere>2014-03-09 00:04:37 +0100
committerwm4 <wm4@nowhere>2014-03-09 01:27:41 +0100
commita477481aabaa16f1ed15af456125160bc8face5a (patch)
treec99949f3e13e7c7ba498c56edcbcfa433e487cd3 /
parent5ffd6a9e9b7a0d894d7513ad20c24c2727426ecd (diff)
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.
Diffstat (limited to '')
1 files changed, 2 insertions, 0 deletions
diff --git a/ b/
index 2d24a4c685..999a14495a 100644
--- a/
+++ b/
@@ -145,6 +145,8 @@ def build(ctx):
( "audio/out/ao_sdl.c", "sdl2" ),
( "audio/out/ao_sndio.c", "sndio" ),
( "audio/out/ao_wasapi.c", "wasapi" ),
+ ( "audio/out/pull.c" ),
+ ( "audio/out/push.c" ),
## Bstr
( "bstr/bstr.c" ),