PDA

View Full Version : Digital Audio Output (AC3/DTS SPDIF pass-through)?


pty80
2008-03-14, 19:24
First of all a big thank you to everyone involved in getting XBMC to Windows! XBMC's future is looking better by the minute. Finally I can watch Hi-Def content in XBMC :-)

As for my question, has anyone gotten Digital Audio to work? When set to "Analog" I get stereo sound, but whenever I switch the Audio output to "Digital" I observe the following behaviour:

- no audio at all
- the video seems to playback at higher speed than normal (approx 1.5x - 2x faster)

I have a SB Connect which is connected to a JBL AC3/DTS suround setup with an optical cable. SPDIF pass through is working fine on my system with other movieplayers.

I have no idea what version of XBMC_PC I'm using, but it's the one at this link: http://www.megaupload.com/?d=UDMNXCT0 (ie the first one in Wiso's "XBMC for Windows SVN build (SDL/OpenGL)" thread). I'm using it with T3CH's 2008-03-09 rev11970 build.

My system:
Windows XP SP2 - Intel Core 2 Quad6600 - 2GB RAM
Nvidia GT7300EN

budwize
2008-03-15, 00:42
if your motherboard has onboard sound try disabling your SB card
im using my onboard sound and its working perfect with the build dated 10/02/08 and Wiso's latest exe

rollin
2008-03-16, 11:55
I have the same problem. I use a ALC655. At anaolog output i get Stereo and on digital no sound at all and the video speed is faster.

CrazyIvan
2008-03-16, 18:58
With mine set to digital, all stereo files (video and music) play normally including the XBMC sounds. However when I try to play anything that has AC3 audio I get what is described here. This is with onboard sound via SPDIF which works flawlessly for everything else.

Hitcher
2008-03-16, 19:40
I have the same problem. I use a ALC655. At anaolog output i get Stereo and on digital no sound at all and the video speed is faster.

Exact same problem here.

nc88keyz
2008-03-16, 23:26
i concurr same issues with video speeding up with digital. Using p4pE which has similar onboard sound.

I sunday experimental build would be nice with recent changes to the svn .

thanks

Lowen SoDium
2008-03-18, 04:33
I have the same problem when set to digital, going through the HDMI port on my ga-73pvm-s2h gigabyte board. (Nvidia 630i/7100).

Even weirder is when I set it to analog (in XBMC), I get sound, but only the left right channels when playing a file with AC3 or DTS audio. No center, surrounds, etc. (Note, I do have it plugged in to a TV that is only stereo)

What makes this weird is that TV shows will have all of their music and sound effects, but no dialog at all. It's creepy.

Short of the long is that I can not down-mix surround to stereo.

Phobia
2008-03-20, 02:27
Hi all,

Don't mean to double post, but I already replied about this issue in another thread.

I too experience this with onboard nVidia "HD" audio - optical spdif output.

Big thanks to all the devs - this is a brilliant effort!

-- Phob

anyo
2008-03-25, 19:12
Same problem here... video plays fast, no digital pass through... tho the navigation sounds and music works fine.

I have a SB live SE 7.1 card.
vista 32bit

WiSo
2008-03-25, 19:59
Any example vids for download (only legal stuff please)?
I don't have a digital environment so testing won't be possible but I could at least see if (and hopefully why) the video rate is doubled.
Also please remember to post the full log to pastebin.

Gamester17
2008-03-25, 20:29
Legal AC3/A52 and DTS samples with surround sound audio streams:
http://www.dvdloc8.com/list_dvd_clip.php
http://www.kellyindustries.com/sounds.html#dts_downloads
http://digital-audio.net/sounds_o.shtml
http://www.alcorn.com/ftp/media/
ftp://ftp1.mplayerhq.hu/MPlayer/samples/
ftp://ftp1.mplayerhq.hu/MPlayer/samples/MPEG-VOB/vob-DTS/
ftp://ftp1.mplayerhq.hu/MPlayer/samples/MPEG-VOB/vdr-AC3/
ftp://ftp1.mplayerhq.hu/MPlayer/samples/DVD-Audio/


I have not tested any of these (as I do not currently have surround sound at home).

jz53
2008-03-25, 23:35
I cannot get digit audio out either. see a portion of log file


15:29:20 T:1620 M:2147483647 DEBUG: CPlayerCoreFactor::GetPlayers(F:\movie\PRE0NNW1\pr e0nw1-0ms.ac3)
15:29:20 T:1620 M:2147483647 NOTICE: DVDPlayer: Opening: F:\movie\PRE0NNW1\pre0nw1-0ms.ac3
15:29:20 T:2460 M:2147483647 DEBUG: thread start, auto delete: 1
15:29:20 T:1620 M:2147483647 WARNING: CDVDMessageQueue::Put MSGQ_NOT_INITIALIZED
15:29:20 T:2972 M:2147483647 DEBUG: thread start, auto delete: 0
15:29:20 T:2972 M:2147483647 NOTICE: Creating InputStream
15:29:20 T:2972 M:2147483647 NOTICE: Creating Demuxer
15:29:20 T:2972 M:2147483647 DEBUG: CDVDDemuxFFmpeg::Open - av_find_stream_info starting
15:29:20 T:2972 M:2147483647 DEBUG: CDVDDemuxFFmpeg::Open - av_find_stream_info finished
15:29:20 T:2972 M:2147483647 INFO: ffmpeg: Input #0, ac3, from 'F:\movie\PRE0NNW1\pre0nw1-0ms.ac3':
15:29:20 T:2972 M:2147483647 INFO: ffmpeg: Duration: 02:10:28.3, bitrate: 384 kb/s
15:29:20 T:2972 M:2147483647 INFO: ffmpeg: Stream #0.0: Audio: ac3, 48000 Hz, 5:1, 384 kb/s
15:29:20 T:2972 M:2147483647 INFO: CDVDFactorySubtitle::GetSubtitles, searching subtitles
15:29:20 T:2972 M:2147483647 DEBUG: CUtil::CacheSubtitles: START
15:29:20 T:2972 M:2147483647 INFO: CDVDFactorySubtitle::GetSubtitles, searching subtitles done
15:29:20 T:2972 M:2147483647 NOTICE: Opening audio stream: 0 source: 256
15:29:20 T:2972 M:2147483647 NOTICE: Finding audio codec for: 86020
15:29:20 T:2972 M:2147483647 DEBUG: FactoryCodec - Audio: passthrough - Opening
15:29:20 T:2972 M:2147483647 DEBUG: FactoryCodec - Audio: passthrough - Opened
15:29:20 T:2972 M:2147483647 NOTICE: Creating audio thread
15:29:20 T:2972 M:2147483647 DEBUG: Playback has started
15:29:20 T:3212 M:2147483647 DEBUG: thread start, auto delete: 0
15:29:20 T:2972 M:2147483647 INFO: Loading skin file: DialogProgress.xml
15:29:20 T:3212 M:2147483647 NOTICE: running thread: CDVDPlayerAudio::Process()
15:29:20 T:1620 M:2147483647 INFO: Loading skin file: MusicOverlay.xml
15:29:20 T:1620 M:2147483647 DEBUG: Load MusicOverlay.xml: 2.50ms (1.00 ms xml load)
15:29:20 T:1620 M:2147483647 DEBUG: Alloc resources: 2.58ms (2.58 ms skin load, 0.00 ms preload)
15:29:20 T:2972 M:2147483647 DEBUG: Creating surface for thread 2972l
15:29:20 T:1620 M:2147483647 DEBUG: CGUIInfoManager::SetCurrentSong(F:\movie\PRE0NNW1\ pre0nw1-0ms.ac3)
15:29:20 T:2972 M:2147483647 ERROR: Did not get surface for thread 2972l
15:29:20 T:2972 M:2147483647 DEBUG: Load DialogProgress.xml: 22.59ms (1.19 ms xml load)
15:29:20 T:3212 M:2147483647 DEBUG: CDVDAudioCodecPassthrough: Synced to AC3 frame
15:29:20 T:3212 M:2147483647 NOTICE: Creating audio device with codec id: 86020, channels: 2, sample rate: 48000, pass-through
15:29:20 T:3212 M:2147483647 ERROR: CDVDPlayerAudio::Process - failed to create audio renderer
15:29:20 T:3212 M:2147483647 ERROR: CDVDAudio::AddPackets - More bytes left than can be stored in buffer
15:29:20 T:1620 M:2147483647 DEBUG: Loading additional tag info for file F:\movie\PRE0NNW1\pre0nw1-0ms.ac3
15:29:20 T:3212 M:2147483647 NOTICE: Creating audio device with codec id: 86020, channels: 2, sample rate: 48000, pass-through
15:29:20 T:3212 M:2147483647 ERROR: CDVDPlayerAudio::Process - failed to create audio renderer
15:29:20 T:3212 M:2147483647 ERROR: CDVDAudio::AddPackets - More bytes left than can be stored in buffer
15:29:20 T:3212 M:2147483647 DEBUG: CDVDPlayerAudio:: Discontinuty - was:32224.141697, should be:64000.000000, error:31775.858303
15:29:20 T:3212 M:2147483647 NOTICE: Creating audio device with codec id: 86020, channels: 2, sample rate: 48000, pass-through
15:29:20 T:3212 M:2147483647 ERROR: CDVDPlayerAudio::Process - failed to create audio renderer
15:29:20 T:3212 M:2147483647 ERROR: CDVDAudio::AddPackets - More bytes left than can be stored in buffer

jz53
2008-03-25, 23:38
by the way, I am using Chaintech AV-710, envy24 driver 5.12.1.3653

chadoe
2008-03-25, 23:44
There is no passthrough in the win32 port yet, meaning no ac3 or dts unless it's set to analog (and even then it's probably not downmixed to 2 channels, the xbox does this for us, win32 doesn't).

DVDAudio.cpp line 98
if( audioframe.passthrough )
return false;

m_pAudioDecoder = new CWin32DirectSound(m_pCallback, audioframe.channels, audioframe.sample_rate, audioframe.bits_per_sample, false, codecstring);Anyone interested in writing the passthrough code? ;)

anyo
2008-03-26, 01:25
Any example vids for download (only legal stuff please)?
I don't have a digital environment so testing won't be possible but I could at least see if (and hopefully why) the video rate is doubled.
Also please remember to post the full log to pastebin.

When I get home I can post the full log... but here is a place with some demo mkv files and another with ts streams.

http://www.matroska.org/samples/

http://www.dododge.net/roku/ts-samples.html

anyo
2008-03-26, 01:27
Anyone interested in writing the passthrough code? ;)

I'm crossin my fingers here

WiSo
2008-03-26, 11:09
There is no passthrough in the win32 port yet, meaning no ac3 or dts unless it's set to analog (and even then it's probably not downmixed to 2 channels, the xbox does this for us, win32 doesn't).

I found this also but since I'm not very deep in digital audio I didn't know if it's still needed. Also the logfiles surprises me since I read in a few "..using pass through.."

elupus
2008-03-26, 14:47
Well, dvdplayer doesn't know output system doesn't support passthrough. So it will assume that is possible and output the encoded frames. You need to explicitly disable it for windows (alternatly fixup AsyncDirectSound.cpp, to support it which shouldn't be too hard).

WiSo
2008-03-26, 16:28
Windows uses CWin32DirectSound instead of CASyncDirectSound.
Since I've never used digital audio nor programmed it I'm a little bit lost here. I searched a little bit through the net but only found references that windows will handle it for you no matter if 2 or more channels are present. Does it mean we just can take the CWin32DirectSound for pass through playback or are there other changes required?

elupus
2008-03-26, 18:12
try setting SubFormat to MEDIASUBTYPE_DOLBY_AC3_SPDIF or KSDATAFORMAT_SUBTYPE_DOLBY_AC3_SPDIF instead of KSDATAFORMAT_SUBTYPE_PCM. when passthrough in passthrough mode.

And no windows will not handle it if you feed it compressed AC3/DTS frames but tell it, it's uncompressed pcm audio :)

WiSo
2008-03-26, 19:05
Ah, that make things a little bit clearer for me.

Thanks,
WiSo

WiSo
2008-03-26, 21:52
For all testers, I've created a new build with hopefully working audio pass through: http://xbmc.org/forum/showthread.php?t=32202

farfromover
2008-08-31, 23:14
Hi guys, I'm still getting the same problems with no sound on digital output through spdif/toslink on my motherboard.

Has this issue been resolved yet?

Love everything else thus far, keep it coming...

Thanks

farfromover
2008-08-31, 23:17
BTW, i'm getting sound in XBMC when it boots up, it is just not giving me any sound either in digital OR Analog videos.

Thanks

farfromover
2008-09-03, 20:06
Hi guys, I'm still getting the same problems with no sound on digital output through spdif/toslink on my motherboard.

Has this issue been resolved yet?

Love everything else thus far, keep it coming...

Thanks

BUMP!! Anyone?

StevenSeagull
2008-09-04, 20:14
So fa i have two boxes running winXP with spdif outputting perfectly all ac3 and DTS to a pioneer reciever. The only thing if somebody did not tweak in the creative console is uder decoder - spdif passthrough not use built in decoder.

Both pc-s running cheap ass audigy's bought second hand for a few beers. ;)

StevenSeagull
2008-09-04, 20:18
Althrough i had many issues with onboard sound cards out of XBMC enviroment... i ditched those "solutions" many many times in the past years. Granted, creative products may not be excellent but generally work very well if you dont ask too much.