<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Jul 23, 2011, at 5:24 PM, Ron Frederick wrote:</div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Jul 18, 2011, at 3:08 AM, Felix Kühne wrote:</div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On 18.07.2011, at 08:42, David Fuhrmann wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>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.<br></div></blockquote></div><br><div>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.</div><div><br></div><div>Your patch was applied to the stable and unstable branches of VLC and will be part of tonight's nightly builds available at <a href="http://nightlies.videolan.org/">nightlies.videolan.org</a>.</div></div></blockquote><div><br></div>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.</div><div><br></div><div>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.</div></div></blockquote><div><br></div></div>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.<div><br></div><div>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.</div><div></div></body></html>