1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-18 12:55:16 +00:00
mpv/audio
Stefano Pigozzi bff03a181f core: add a spsc ringbuffer implementation
Currently every single AO was implementing it's own ringbuffer, many times
with slightly different semantics. This is an attempt to fix the problem.

I stole some good ideas from ao_portaudio's ringbuffer and went from there.
The main difference is this one stores wpos and rpos which are absolute
positions in an "infinite" buffer. To find the actual position for writing /
reading just apply modulo size.

The producer only modifies wpos while the consumer only modifies rpos. This
makes it pretty easy to reason about and make the operations thread safe by
using barriers (thread safety is guaranteed only in the Single-Producer/Single-
Consumer case).

Also adapted ao_coreaudio to use this ringbuffer.
2013-06-16 18:20:39 +02:00
..
decode options: remove --stereo 2013-06-13 00:59:27 +02:00
filter af_lavfi: add libavfilter bridge 2013-05-23 17:44:06 +02:00
out core: add a spsc ringbuffer implementation 2013-06-16 18:20:39 +02:00
audio.c audio: add channel map selection function 2013-05-12 21:24:57 +02:00
audio.h audio/filters: add af_force 2013-05-12 21:24:56 +02:00
chmap_sel.c audio: add channel map selection function 2013-05-12 21:24:57 +02:00
chmap_sel.h audio: add channel map selection function 2013-05-12 21:24:57 +02:00
chmap.c chmap: fix oddity due to ambiguous 6.1 ffmpeg channel layout 2013-05-13 23:55:39 +02:00
chmap.h audio/out: channel map selection 2013-05-12 21:24:57 +02:00
fmt-conversion.c audio: add double sample format 2013-05-12 21:24:57 +02:00
fmt-conversion.h ad_lavc: use fmt-conversion to map sample formats 2013-04-13 04:21:27 +02:00
format.c core: add a spsc ringbuffer implementation 2013-06-16 18:20:39 +02:00
format.h core: add a spsc ringbuffer implementation 2013-06-16 18:20:39 +02:00
mixer.c audio/out: switch to channel map 2013-05-12 21:24:54 +02:00
mixer.h mplayer: keep volume persistent, even when using --volume 2013-04-10 21:29:04 +02:00
reorder_ch.c audio: fix compilation with older libavresample versions 2013-05-13 00:39:07 +02:00
reorder_ch.h audio: fix compilation with older libavresample versions 2013-05-13 00:39:07 +02:00