mpv/audio/out
wm4 9a210ca2d5 Audit and replace all ctype.h uses
Something like "char *s = ...; isdigit(s[0]);" triggers undefined
behavior, because char can be signed, and thus s[0] can be a negative
value. The is*() functions require unsigned char _or_ EOF. EOF is a
special value outside of unsigned char range, thus the argument to the
is*() functions can't be a char.

This undefined behavior can actually trigger crashes if the
implementation of these functions e.g. uses lookup tables, which are
then indexed with out-of-range values.

Replace all <ctype.h> uses with our own custom mp_is*() functions added
with misc/ctype.h. As a bonus, these functions are locale-independent.
(Although currently, we _require_ C locale for other reasons.)
2014-07-01 23:11:08 +02:00
..
ao.c audio: prefer dsound over wasapi 2014-06-01 19:00:44 +02:00
ao.h player: unrangle one aspect of audio EOF handling 2014-04-17 23:48:09 +02:00
ao_alsa.c Audit and replace all ctype.h uses 2014-07-01 23:11:08 +02:00
ao_coreaudio.c ao_coreaudio: remove useless code 2014-05-10 14:07:45 +02:00
ao_coreaudio_properties.c
ao_coreaudio_properties.h audio/out: make ao struct opaque 2014-03-09 00:19:31 +01:00
ao_coreaudio_utils.c Audit and replace all ctype.h uses 2014-07-01 23:11:08 +02:00
ao_coreaudio_utils.h ao_coreaudio: use description-based channel layouts 2014-05-10 14:07:45 +02:00
ao_dsound.c af_fmt2bits: change to af_fmt2bps (bytes/sample) where appropriate 2014-05-28 21:38:00 +02:00
ao_jack.c audio/out/pull: remove race conditions 2014-05-29 02:24:17 +02:00
ao_lavc.c encode: get rid of the recursion that led to a deadlock. 2014-06-12 11:42:00 +02:00
ao_null.c ao_null: fix unit mismatch with latency option 2014-05-04 16:57:32 +02:00
ao_openal.c audio/out: make draining a separate operation 2014-03-09 01:27:41 +01:00
ao_oss.c Add more const 2014-06-11 00:39:14 +02:00
ao_pcm.c ao_pcm: fix message strings 2014-06-15 09:25:15 +02:00
ao_portaudio.c audio/out/pull: remove race conditions 2014-05-29 02:24:17 +02:00
ao_pulse.c audio/out/push: add mechanism for event-based waiting 2014-05-30 02:15:47 +02:00
ao_rsound.c ao_rsound: pass correct data type to rsd_set_param() 2014-03-09 19:11:49 +01:00
ao_sdl.c audio/out/pull: remove race conditions 2014-05-29 02:24:17 +02:00
ao_sndio.c audio/out: make draining a separate operation 2014-03-09 01:27:41 +01:00
ao_wasapi.c audio/out/pull: remove race conditions 2014-05-29 02:24:17 +02:00
ao_wasapi.h atomics: switch to C11 stdatomic.h 2014-05-21 02:21:18 +02:00
ao_wasapi_utils.c ao_wasapi: simplify nAvgBytesPerSec calculation 2014-05-28 21:38:15 +02:00
ao_wasapi_utils.h ao_wasapi: Move non-critical code outside of the event thread 2014-03-11 16:37:02 -03:00
internal.h audio/out/push: add a way to wait for the audio device with poll() 2014-05-30 02:16:25 +02:00
pull.c audio/out/pull: remove race conditions 2014-05-29 02:24:17 +02:00
push.c audio: more detailed debugging output 2014-06-12 00:55:13 +02:00