[MPlayer-dev-eng] [PATCH] Coreaudio patches (audio device selection and deprecated functions)
Adrian Stutz
adrian at sttz.ch
Sat Apr 17 22:25:22 CEST 2010
Hello list,
The ao_coraudio output has an issue on 10.6, loosing it's audio output
whenever plugging/unplugging headphones.
I was investigating the issue when I noticed a lot of deprecated
functions in ao_coreaudio. The first patches replace those functions
with their newer ones (which is pretty straight-forward because the
functionality didn't change). I decided to split out repeated tasks
into separate functions (like getting an array from the API) to
simplify the code. Some of the functions where deprecated in 10.5,
most in 10.6. All new functions are available in 10.4, which IIRC is
the minimum requirement elsewhere already.
coreaudio_1_UInt32_printf.diff
> Change printf placeholders of UInt32 variables to PRIu32 (gcc was complaining about these)
coreaudio_2_replace_deprecated_functions.diff
> Replace all deprecated function calls with their new counterparts
coreaudio_3_int_to_UInt32.diff
> Correct use of int instead of UInt32 in two places
The new functionality allows to select an audio device by its id,
while the default and 0 selects the default device. It also sets the
selected device as the current device, which makes ao_coreaudio
correctly switch devices when default device is selected and changes.
Selecting a specific device will stick to it.
coreaudio_4_device_id_option.diff
> Add the new option and correctly handle setting the default / a specific device.
I wasn't able to actually verfiy SPDIF output apart from checking it
produces noise on regular speakers so it would be great of someone
could test that!
Greetings,
Adrian
More information about the MPlayer-dev-eng
mailing list