summaryrefslogtreecommitdiffstats
path: root/audio/out/internal.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-11-30 01:14:33 +0100
committerwm4 <wm4@nowhere>2017-11-30 01:20:03 +0100
commit6f8cf73f54c4b1f80d69ecd30d269f16df70ef6e (patch)
tree48cc61b0f1f0196b27b8381f840a42cb47bfafa9 /audio/out/internal.h
parent963eb15006342b694a9b396af596a4f049acb23a (diff)
downloadmpv-6f8cf73f54c4b1f80d69ecd30d269f16df70ef6e.tar.bz2
mpv-6f8cf73f54c4b1f80d69ecd30d269f16df70ef6e.tar.xz
ao: simplify hack for float atomics
stdatomic.h defines no atomic_float typedef. We can't just use _Atomic unconditionally, because we support compilers without C11 atomics. So just create a custom atomic_float typedef in the wrapper, which uses _Atomic in the C11 code path.
Diffstat (limited to 'audio/out/internal.h')
-rw-r--r--audio/out/internal.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/out/internal.h b/audio/out/internal.h
index 9826630108..33e8a8c6a9 100644
--- a/audio/out/internal.h
+++ b/audio/out/internal.h
@@ -70,8 +70,8 @@ struct ao {
// Internal events (use ao_request_reload(), ao_hotplug_event())
atomic_int events_;
- // Float gain multiplicator, reinterpret-casted to int.
- atomic_uint_least32_t gain_fi;
+ // Float gain multiplicator
+ mp_atomic_float gain;
int buffer;
double def_buffer;