1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-23 23:32:26 +00:00
mpv/audio/out
wm4 8e7cf4bc99 atomics: switch to C11 stdatomic.h
In my opinion, we shouldn't use atomics at all, but ok.

This switches the mpv code to use C11 stdatomic.h, and for compilers
that don't support stdatomic.h yet, we emulate the subset used by mpv
using the builtins commonly provided by gcc and clang.

This supersedes an earlier similar attempt by Kovensky. That attempt
unfortunately relied on a big copypasted freebsd header (which also
depended on much more highly compiler-specific functionality, defined
reserved symbols, etc.), so it had to be NIH'ed.

Some issues:
- C11 says default initialization of atomics "produces a valid state",
  but it's not sure whether the stored value is really 0. But we rely on
  this.
- I'm pretty sure our use of the __atomic... builtins is/was incorrect.
  We don't use atomic load/store intrinsics, and access stuff directly.
- Our wrapper actually does stricter typechecking than the stdatomic.h
  implementation by gcc 4.9. We make the atomic types incompatible with
  normal types by wrapping them into structs. (The FreeBSD wrapper does
  the same.)
- I couldn't test on MinGW.
2014-05-21 02:21:18 +02:00
..
ao_alsa.c
ao_coreaudio_properties.c
ao_coreaudio_properties.h
ao_coreaudio_utils.c ao_coreaudio: skip unknown channel labels 2014-05-10 14:07:45 +02:00
ao_coreaudio_utils.h ao_coreaudio: use description-based channel layouts 2014-05-10 14:07:45 +02:00
ao_coreaudio.c ao_coreaudio: remove useless code 2014-05-10 14:07:45 +02:00
ao_dsound.c
ao_jack.c
ao_lavc.c encode: fix PTS unit mismatch 2014-05-10 10:44:16 +02:00
ao_null.c ao_null: fix unit mismatch with latency option 2014-05-04 16:57:32 +02:00
ao_openal.c
ao_oss.c
ao_pcm.c
ao_portaudio.c
ao_pulse.c ao_pulse: use ao_need_data() 2014-04-15 22:42:15 +02:00
ao_rsound.c
ao_sdl.c
ao_sndio.c
ao_wasapi_utils.c atomics: switch to C11 stdatomic.h 2014-05-21 02:21:18 +02:00
ao_wasapi_utils.h
ao_wasapi.c atomics: switch to C11 stdatomic.h 2014-05-21 02:21:18 +02:00
ao_wasapi.h atomics: switch to C11 stdatomic.h 2014-05-21 02:21:18 +02:00
ao.c player: unrangle one aspect of audio EOF handling 2014-04-17 23:48:09 +02:00
ao.h player: unrangle one aspect of audio EOF handling 2014-04-17 23:48:09 +02:00
internal.h player: unrangle one aspect of audio EOF handling 2014-04-17 23:48:09 +02:00
pull.c atomics: switch to C11 stdatomic.h 2014-05-21 02:21:18 +02:00
push.c threads: use mpv time for mpthread_cond_timedwait wrapper 2014-05-18 19:20:32 +02:00