The Fuzz
It looks like the new audio code has gone down well in most quarters, at least for people who were previously unable to use their 5.1 receivers with Plex. Thanks to the forum users for all the help debugging that issue.
Unfortunately you can’t make an omelette without breaking a few eggs, and two eggs I broke were the volume control (de-amplifier) and playback of some unusually-formatted music in paplayer (our music player). The volume control was purely because I personally don’t use it, and therefore it didn’t get the testing it deserved. My profuse apologies. The music playback speed bugs were more an issue of not having the files to test, but again, I apologise profusely.
I’ve read the forum reports of bugs, and have been able to reproduce and fix both. As a nice side effect, I’ve removed the resampling code from paplayer. We do a single conversion from whatever input format you use to 32 bit floating point (the same conversion CoreAudio would do internally) and maintain the audio in that format. We no longer do any sample rate conversion, which means if you want to play 24-bit 96khz (or higher!) audio, just set your hardware to that format in Audio MIDI Setup, and Plex will deliver it bit-perfect for you. The same is true for CD audio or other 16 bit 44.1/48Khz audio.
The new release will be available once it’s been through our dedicated testing team. Enjoy, and as always, polite and detailed success/failure reports here or in the forums are appreciated.
9 comments9 Comments so far
Leave a reply

[...] NEW: Ryan greatly enhanced the CoreAudio driver, cutting out lots of old crufty code in the process. Not only does this fix the problem with fuzzy audio at low volumes and incorrect playback speed, but it also add some features that audiophiles will appreciate. The legacy XBMC code was performing a bunch of useless format conversions, whereas his new code converts from source format directly to 32 floating point, which is the CoreAudio native format. This means you can now play back 24-bit 96KHz media, at full fidelity. Ryan explains more in his blog post. [...]
Heroic! Thanks Ryan!!!
Thank you Ryan! Audiophiles looking forward to bitperfect playback
http://code.google.com/p/cmediadrivers/wiki/Bitperfect
So all XBMC legacy issues from the Xbox days should be gone now?
http://xbmc.org/trac/ticket/4731
Pretty much, just make sure you set your output device to the right sample rate, and there will be no rate conversion anywhere. Enjoy!
Great, but makes Plex crash everytime I will leave a video with DD or DTS sound (format was mkv, reproducable). Plex Freezes, afterwards no more audioplayback (in iTunes or alike) is possible. hardware is mac pro (early 2008) via digital out to surround receiver.
Hrm, that’s no good. If you could PM me a crash log and debug log (cat ~/Library/Logs/Plex.log in Terminal) and upload a sample, that’d be great.
19:11:26 T:2691614496 M:123482112 NOTICE: DVDPlayer: Opening: /Volumes/Pontos/xxxxx/some 1080p h264 movie with two dd 5.1 audio streams.mkv
19:11:26 T:2691614496 M:123486208 WARNING: CDVDMessageQueue::Put MSGQ_NOT_INITIALIZED
19:11:26 T:2964504576 M:123478016 NOTICE: Creating InputStream
19:11:26 T:2964504576 M:123465728 NOTICE: Creating Demuxer
19:11:26 T:2964504576 M:122695680 NOTICE: Opening video stream: 0 source: 256
19:11:26 T:2964504576 M:122712064 NOTICE: Creating video codec with codec id: 28
19:11:26 T:2964504576 M:122494976 NOTICE: Creating video thread
19:11:26 T:2964504576 M:122486784 NOTICE: Opening audio stream: 1 source: 256
19:11:26 T:2964504576 M:122486784 NOTICE: Finding audio codec for: 86020
19:11:26 T:2969296896 M:122478592 NOTICE: running thread: video_thread
19:11:26 T:2964504576 M:122376192 NOTICE: Creating audio thread
19:11:26 T:2964504576 M:122363904 NOTICE: Opening Subtitle stream: 3 source: 256
19:11:26 T:2969829376 M:122363904 NOTICE: running thread: CDVDPlayerAudio::Process()
19:11:26 T:2969829376 M:120164352 NOTICE: Creating audio device with codec id: 86020, channels: 2, sample rate: 48000, pass-through
19:11:26 T:2969296896 M:110477312 NOTICE: fps: 23.976025, pwidth: 1920, pheight: 864, dwidth: 1920, dheight: 864
19:11:26 T:2969296896 M:110481408 NOTICE: Display resolution AUTO : 720p 16:9 (Windowed) (1)
19:11:26 T:2969296896 M:110481408 WARNING: Upscale: selected algorithm 0
19:11:26 T:2969829376 M:110477312 NOTICE: Asked to create device: [Built-in Digital Output]
19:11:26 T:2969829376 M:110477312 NOTICE: Device should be digital: [1]
19:11:26 T:2969829376 M:110477312 NOTICE: CoreAudio S/PDIF mode: [1]
19:11:26 T:2969829376 M:110477312 NOTICE: Music mode: [0]
19:11:26 T:2969829376 M:110477312 NOTICE: Channels: [2]
19:11:26 T:2969829376 M:110477312 NOTICE: Sample Rate: [48000]
19:11:26 T:2969829376 M:110477312 NOTICE: BitsPerSample: [16]
19:11:26 T:2969829376 M:110477312 NOTICE: PacketSize: [1024]
19:11:26 T:2691614496 M:124112896 NOTICE: GL: Selecting YUV 2 RGB Progressive Shader
19:11:26 T:2691614496 M:120111104 NOTICE: GL: NPOT texture support detected
19:11:27 T:2969296896 M:103030784 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 58, consumed: 0
19:11:27 T:2969296896 M: 99442688 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:11:27 T:2969296896 M: 99442688 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:11:32 T:2691614496 M: 98500608 NOTICE: CDVDPlayer::CloseFile()
19:11:32 T:2691614496 M: 98516992 NOTICE: DVDPlayer: waiting for threads to exit
19:11:32 T:2964504576 M: 98516992 NOTICE: CDVDPlayer::OnExit()
19:11:32 T:2964504576 M: 98516992 NOTICE: DVDPlayer: closing audio stream
19:11:32 T:2964504576 M: 98516992 NOTICE: Closing audio stream
19:11:32 T:2964504576 M: 98516992 NOTICE: waiting for audio thread to exit
19:11:32 T:2969829376 M: 98516992 NOTICE: Closing audio device
19:11:33 T:2969296896 M: 98488320 ERROR: – Timeout waiting for previous frame to be presented
19:11:34 T:2969296896 M: 98435072 ERROR: – Timeout waiting for previous frame to be presented
19:11:35 T:2969296896 M: 98381824 ERROR: – Timeout waiting for previous frame to be presented
19:11:36 T:2969296896 M: 98328576 ERROR: – Timeout waiting for previous frame to be presented
19:11:36 T:2969296896 M: 98328576 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:11:36 T:2969296896 M: 98328576 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:11:37 T:2969296896 M: 99131392 ERROR: – Timeout waiting for previous frame to be presented
19:11:38 T:2969296896 M: 98709504 ERROR: – Timeout waiting for previous frame to be presented
19:11:38 T:2969296896 M: 98709504 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:11:38 T:2969296896 M: 98709504 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 58, consumed: 0
19:11:39 T:2969296896 M: 98623488 ERROR: – Timeout waiting for previous frame to be presented
19:11:40 T:2969296896 M: 98971648 ERROR: – Timeout waiting for previous frame to be presented
19:11:40 T:2969296896 M: 98971648 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:11:40 T:2969296896 M: 98971648 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 58, consumed: 0
19:11:41 T:2969296896 M: 98529280 ERROR: – Timeout waiting for previous frame to be presented
19:11:42 T:2969296896 M: 98787328 ERROR: – Timeout waiting for previous frame to be presented
19:11:42 T:2969296896 M: 98787328 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:11:42 T:2969296896 M: 98787328 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:11:43 T:2969296896 M: 98746368 ERROR: – Timeout waiting for previous frame to be presented
19:11:44 T:2969296896 M: 98684928 ERROR: – Timeout waiting for previous frame to be presented
19:11:44 T:2969296896 M: 98684928 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:11:44 T:2969296896 M: 98684928 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 58, consumed: 0
19:11:45 T:2969296896 M: 98611200 ERROR: – Timeout waiting for previous frame to be presented
19:11:46 T:2969296896 M: 98553856 ERROR: – Timeout waiting for previous frame to be presented
19:11:46 T:2969296896 M: 98553856 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:11:46 T:2969296896 M: 98553856 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 58, consumed: 0
19:11:47 T:2969296896 M: 98463744 ERROR: – Timeout waiting for previous frame to be presented
19:11:48 T:2969296896 M: 98398208 ERROR: – Timeout waiting for previous frame to be presented
19:11:48 T:2969296896 M: 98398208 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:11:48 T:2969296896 M: 98398208 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:11:49 T:2969296896 M: 98381824 ERROR: – Timeout waiting for previous frame to be presented
19:11:50 T:2969296896 M: 98308096 ERROR: – Timeout waiting for previous frame to be presented
19:11:50 T:2969296896 M: 98308096 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:11:50 T:2969296896 M: 98308096 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 58, consumed: 0
19:11:51 T:2969296896 M: 98226176 ERROR: – Timeout waiting for previous frame to be presented
19:11:52 T:2969296896 M: 98168832 ERROR: – Timeout waiting for previous frame to be presented
19:11:52 T:2969296896 M: 98168832 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:11:52 T:2969296896 M: 98168832 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 58, consumed: 0
19:11:53 T:2969296896 M: 98111488 ERROR: – Timeout waiting for previous frame to be presented
19:11:54 T:2969296896 M: 98054144 ERROR: – Timeout waiting for previous frame to be presented
19:11:54 T:2969296896 M: 98054144 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:11:54 T:2969296896 M: 98054144 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:11:55 T:2969296896 M: 97685504 ERROR: – Timeout waiting for previous frame to be presented
19:11:56 T:2969296896 M: 97636352 ERROR: – Timeout waiting for previous frame to be presented
19:11:56 T:2969296896 M: 97636352 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:11:56 T:2969296896 M: 97636352 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 58, consumed: 0
19:11:57 T:2969296896 M: 97619968 ERROR: – Timeout waiting for previous frame to be presented
19:11:58 T:2969296896 M: 97497088 ERROR: – Timeout waiting for previous frame to be presented
19:11:58 T:2969296896 M: 97497088 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:11:58 T:2969296896 M: 97497088 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 58, consumed: 0
19:11:59 T:2969296896 M: 97292288 ERROR: – Timeout waiting for previous frame to be presented
19:12:00 T:2969296896 M: 96854016 ERROR: – Timeout waiting for previous frame to be presented
19:12:00 T:2969296896 M: 96854016 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:12:00 T:2969296896 M: 96854016 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:12:01 T:2969296896 M: 96829440 ERROR: – Timeout waiting for previous frame to be presented
19:12:02 T:2969296896 M: 97009664 ERROR: – Timeout waiting for previous frame to be presented
19:12:02 T:2969296896 M: 97009664 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:12:02 T:2969296896 M: 97009664 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 58, consumed: 0
19:12:03 T:2969296896 M: 96968704 ERROR: – Timeout waiting for previous frame to be presented
19:12:04 T:2969296896 M: 96923648 ERROR: – Timeout waiting for previous frame to be presented
19:12:04 T:2969296896 M: 96923648 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:12:04 T:2969296896 M: 96923648 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 58, consumed: 0
19:12:05 T:2969296896 M: 96886784 ERROR: – Timeout waiting for previous frame to be presented
19:12:06 T:2969296896 M: 97210368 ERROR: – Timeout waiting for previous frame to be presented
19:12:06 T:2969296896 M: 97210368 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:12:06 T:2969296896 M: 97210368 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:12:07 T:2969296896 M: 97177600 ERROR: – Timeout waiting for previous frame to be presented
19:12:09 T:2969296896 M: 96473088 ERROR: – Timeout waiting for previous frame to be presented
19:12:09 T:2969296896 M: 96473088 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:12:09 T:2969296896 M: 96473088 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 58, consumed: 0
19:12:10 T:2969296896 M: 96423936 ERROR: – Timeout waiting for previous frame to be presented
19:12:11 T:2969296896 M: 96374784 ERROR: – Timeout waiting for previous frame to be presented
19:12:11 T:2969296896 M: 96374784 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:12:11 T:2969296896 M: 96374784 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 58, consumed: 0
19:12:12 T:2969296896 M: 96313344 ERROR: – Timeout waiting for previous frame to be presented
19:12:13 T:2969296896 M: 96251904 ERROR: – Timeout waiting for previous frame to be presented
19:12:13 T:2969296896 M: 96251904 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:12:13 T:2969296896 M: 96251904 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:12:14 T:2969296896 M: 96260096 ERROR: – Timeout waiting for previous frame to be presented
19:12:15 T:2969296896 M: 96808960 ERROR: – Timeout waiting for previous frame to be presented
19:12:15 T:2969296896 M: 96808960 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:12:15 T:2969296896 M: 96808960 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 58, consumed: 0
19:12:16 T:2969296896 M: 96694272 ERROR: – Timeout waiting for previous frame to be presented
19:12:17 T:2969296896 M: 96534528 ERROR: – Timeout waiting for previous frame to be presented
19:12:17 T:2969296896 M: 96534528 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:12:17 T:2969296896 M: 96534528 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 58, consumed: 0
19:12:18 T:2969296896 M: 96378880 ERROR: – Timeout waiting for previous frame to be presented
19:12:19 T:2969296896 M: 96210944 ERROR: – Timeout waiting for previous frame to be presented
19:12:19 T:2969296896 M: 96210944 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:12:19 T:2969296896 M: 96210944 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:12:20 T:2969296896 M: 96124928 ERROR: – Timeout waiting for previous frame to be presented
19:12:21 T:2969296896 M: 95977472 ERROR: – Timeout waiting for previous frame to be presented
19:12:21 T:2969296896 M: 95977472 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:12:21 T:2969296896 M: 95977472 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 58, consumed: 0
19:12:22 T:2969296896 M: 95924224 ERROR: – Timeout waiting for previous frame to be presented
19:12:23 T:2969296896 M: 95883264 ERROR: – Timeout waiting for previous frame to be presented
19:12:23 T:2969296896 M: 95883264 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 59, consumed: 0
19:12:23 T:2969296896 M: 95883264 WARNING: Decode – avcodec_decode_video didn’t consume the full packet. size: 58, consumed: 0
19:12:24 T:2969296896 M: 95436800 ERROR: – Timeout waiting for previous frame to be presented
here you are … sorry, its kind a big. hope this helps and gets fixed soon. i may have exaggerated a bit, happens a lot (like 90%) but not with every movie it seems. symptoms always the same: no digital audio is availible any more under os x (no itunes, systems sounds, etc.).
anyway: keep up the great work!
Thank you! It’s great to have bitperfect audio output!
One quick question, though. I currently have to switch the sample rate for my mac using Audio MIDI Setup depending on whether I’m playing a CD at 44.1khz or a video file with audio at 48khz. Is there no way for that to be done automatically, ie have Plex check the bitrate of the audio file and then have it adjust the output in Audio MIDI Setup to the ideal rate?