[vlc-devel] [PATCH] auhal: fixed digital audio output

Ron Frederick ronf at timeheart.net
Sun Jul 24 04:46:07 CEST 2011

On Jul 23, 2011, at 5:24 PM, Ron Frederick wrote:
> On Jul 18, 2011, at 3:08 AM, Felix Kühne wrote:
>> On 18.07.2011, at 08:42, David Fuhrmann wrote:
>>> Since vlc 1.1.11 digital audio output (ac3, dts) is broken on mac os. The following patch fixes the problem. It is tested with mac os 10.6, vlc 1.1.11 and various audio formats.
>> Thanks a lot for the patch. I had to re-write the AUHAL API parts of this module to ensure compatibility with future Mac OS X releases. Due to a lack of an optical audio testing device, these mistakes weren't caught.
>> Your patch was applied to the stable and unstable branches of VLC and will be part of tonight's nightly builds available at nightlies.videolan.org.
> Unfortunately, this still isn't working for me under 10.6.8. While it now tries to send encoded output again, the audio stutters on the files I've tried, as if maybe it isn't sending the data at the right rate. Going back to 1.1.11, the audio from the same files plays smoothly over the optical audio out but only in stereo.
> I also gave Lion a quick try on another machine and optical audio output didn't seem to work at all, in either stereo or surround.

After some additional investigation, I discovered the problem. It wasn't an issue with the i_rate value in the output object as I originally thought. That was being set correctly. However, the stream properties array that it was looping over was of the wrong type. It should have been of type AudioStreamRangedDescription, not AudioStreamBasicDescription. Since the sizes of those objects were different, this was causing it to get garbled data as it stepped through the array. I have attached a patch which corrects this.

This fixes the SPDIF output problem for me on 10.6.8, but unfortunately still doesn't fix whatever is causing VLC audio not to work on Lion.

Ron Frederick
ronf at timeheart.net

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20110723/d6872dfb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-auhal-Fix-SPDIF-support.patch
Type: application/octet-stream
Size: 4767 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20110723/d6872dfb/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20110723/d6872dfb/attachment-0001.html>

More information about the vlc-devel mailing list