mpv/audio/out
wm4 81bf9a1963 audio: cleanup spdif format definitions
Before this commit, there was AF_FORMAT_AC3 (the original spdif format,
used for AC3 and DTS core), and AF_FORMAT_IEC61937 (used for AC3, DTS
and DTS-HD), which was handled as some sort of superset for
AF_FORMAT_AC3. There also was AF_FORMAT_MPEG2, which used
IEC61937-framing, but still was handled as something "separate".

Technically, all of them are pretty similar, but may use different
bitrates. Since digital passthrough pretends to be PCM (just with
special headers that wrap digital packets), this is easily detectable by
the higher samplerate or higher number of channels, so I don't know why
you'd need a separate "class" of sample formats (AF_FORMAT_AC3 vs.
AF_FORMAT_IEC61937) to distinguish them. Actually, this whole thing is
just a mess.

Simplify this by handling all these formats the same way.
AF_FORMAT_IS_IEC61937() now returns 1 for all spdif formats (even MP3).
All AOs just accept all spdif formats now - whether that works or not is
not really clear (seems inconsistent due to earlier attempts to make
DTS-HD work). But on the other hand, enabling spdif requires manual user
interaction, so it doesn't matter much if initialization fails in
slightly less graceful ways if it can't work at all.

At a later point, we will support passthrough with ao_pulse. It seems
the PulseAudio API wants to know the codec type (or maybe not - feeding
it DTS while telling it it's AC3 works), add separate formats for each
codecs. While this reminds of the earlier chaos, it's stricter, and most
code just uses AF_FORMAT_IS_IEC61937().

Also, modify AF_FORMAT_TYPE_MASK (renamed from AF_FORMAT_POINT_MASK) to
include special formats, so that it always describes the fundamental
sample format type. This also ensures valid AF formats are never 0 (this
was probably broken in one of the earlier commits from today).
2014-09-23 23:11:54 +02:00
..
ao.c audio/out: remove old things 2014-09-06 02:30:57 +02:00
ao.h audio/out: remove old things 2014-09-06 02:30:57 +02:00
ao_alsa.c audio: cleanup spdif format definitions 2014-09-23 23:11:54 +02:00
ao_coreaudio.c audio/out: remove old things 2014-09-06 02:30:57 +02:00
ao_coreaudio_device.c audio: cleanup spdif format definitions 2014-09-23 23:11:54 +02:00
ao_coreaudio_properties.c ao_coreaudio: move to new log API 2013-08-01 20:32:49 +02:00
ao_coreaudio_properties.h ao_coreaudio: report hardware latency to ao_read_data 2014-07-03 20:05:15 +02:00
ao_coreaudio_utils.c audio: cleanup spdif format definitions 2014-09-23 23:11:54 +02:00
ao_coreaudio_utils.h ao_coreaudio: move channel mapping away from utils 2014-07-02 21:43:08 +02:00
ao_dsound.c audio: cleanup spdif format definitions 2014-09-23 23:11:54 +02:00
ao_jack.c audio/out/pull: remove race conditions 2014-05-29 02:24:17 +02:00
ao_lavc.c Move compat/ and bstr/ directory contents somewhere else 2014-08-29 12:31:52 +02:00
ao_null.c audio/out: always round get_space on period size 2014-09-06 12:59:00 +02:00
ao_openal.c audio/out: remove old things 2014-09-06 02:30:57 +02:00
ao_oss.c audio: cleanup spdif format definitions 2014-09-23 23:11:54 +02:00
ao_pcm.c audio: cleanup spdif format definitions 2014-09-23 23:11:54 +02:00
ao_portaudio.c audio/out/pull: remove race conditions 2014-05-29 02:24:17 +02:00
ao_pulse.c audio: drop swapped-endian audio formats 2014-09-23 23:09:25 +02:00
ao_rsound.c audio: drop swapped-endian audio formats 2014-09-23 23:09:25 +02:00
ao_sdl.c audio: drop swapped-endian audio formats 2014-09-23 23:09:25 +02:00
ao_sndio.c audio: drop swapped-endian audio formats 2014-09-23 23:09:25 +02:00
ao_wasapi.c audio/out: remove old things 2014-09-06 02:30:57 +02:00
ao_wasapi.h Move compat/ and bstr/ directory contents somewhere else 2014-08-29 12:31:52 +02:00
ao_wasapi_utils.c audio: cleanup spdif format definitions 2014-09-23 23:11:54 +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: remove old things 2014-09-06 02:30:57 +02:00
pull.c audio/out: make EOF handling properly event-based 2014-09-05 23:45:54 +02:00
push.c audio/out: fix active waiting during pause again 2014-09-06 16:25:27 +02:00