XBMC Community Forum
[Windows] AudioEngine testers - Windows platform only - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Development (/forumdisplay.php?fid=93)
+--- Thread: [Windows] AudioEngine testers - Windows platform only (/showthread.php?tid=124600)



RE: [Windows] AudioEngine testers - Windows platform only - DDDamian - 2012-09-30 22:15

Hi mirpet,

Relevent snippet is below (I'll break a forum rule here lol):
Code:
18:28:29 T:1136    INFO: CSoftAE::LoadSettings - Stereo upmix is enabled
18:28:29 T:1136    INFO: CSoftAE::InternalOpenSink - Transcode passthrough enabled
18:28:29 T:1136   DEBUG: CAESinkDirectSound::IsCompatible: Formats Incompatible due to different :Data Formats:Passthrough Formats
18:28:29 T:1136    INFO: CSoftAE::InternalOpenSink - sink incompatible, re-starting
18:28:29 T:1136   DEBUG: CAESinkDirectSound::Deinitialize: Cleaning up
18:28:29 T:4948    INFO: Scriptresult: Success
18:28:29 T:4948    INFO: Python script stopped
18:28:29 T:4948   DEBUG: Thread XBPyThread 4948 terminating
18:28:29 T:1136   DEBUG: CAESinkDirectSound::Initialize: Using Window handle: 590932
18:28:29 T:1136   DEBUG: CAESinkDirectSound::Initialize: secondary buffer created
18:28:29 T:1136   DEBUG: CAESinkDirectSound::Initialize: Initializing DirectSound with the following parameters:
18:28:29 T:1136   DEBUG:   Audio Device    : Realtek Digital Output (Realtek High Definition Audio)
18:28:29 T:1136   DEBUG:   Sample Rate     : 48000
18:28:29 T:1136   DEBUG:   Sample Format   : AE_FMT_S16NE
18:28:29 T:1136   DEBUG:   Bits Per Sample : 16
18:28:29 T:1136   DEBUG:   Valid Bits/Samp : 16
18:28:29 T:1136   DEBUG:   Channel Count   : 2
18:28:29 T:1136   DEBUG:   Block Align     : 4
18:28:29 T:1136   DEBUG:   Avg. Bytes Sec  : 192000
18:28:29 T:1136   DEBUG:   Samples/Block   : 16
18:28:29 T:1136   DEBUG:   Format cBSize   : 22
18:28:29 T:1136   DEBUG:   Channel Layout  : FL,FR
18:28:29 T:1136   DEBUG:   Channel Mask    : 3
18:28:29 T:1136   DEBUG:   Frames          : 480
18:28:29 T:1136   DEBUG:   Frame Samples   : 960
18:28:29 T:1136   DEBUG:   Frame Size      : 4
18:28:29 T:1136    INFO: CSoftAE::InternalOpenSink - DirectSound Initialized:
18:28:29 T:1136    INFO:   Output Device : {699A975C-3407-43BF-A5F5-764287D89400}
18:28:29 T:1136    INFO:   Sample Rate   : 48000
18:28:29 T:1136    INFO:   Sample Format : AE_FMT_S16NE
18:28:29 T:1136    INFO:   Channel Count : 2
18:28:29 T:1136    INFO:   Channel Layout: FL,FR
18:28:29 T:1136    INFO:   Frames        : 480
18:28:29 T:1136    INFO:   Frame Samples : 960
18:28:29 T:1136    INFO:   Frame Size    : 4
18:28:29 T:1136   DEBUG: CSoftAE::InternalOpenSink - Encoding using layout: FL,FR,FC,LFE,BL,BR

As you can see:
1) you're using DirectSound - use WASAPI
2) configure Windows to allow exclusive mode per this post
3) disable Settings>System>Audio Output>Stereo Upmix (just for testing - shouldn't affect it but)
4) the 2ch thing is okay as AC3 is passed via two encoded channels
5) your RealTek driver is reporting it accepts AC3 so should be fine, but driver updates are always worth checking for
6) the log shows it is trying to transcode all six channels, I think the issue here is DirectSound usage over WASAPI


RE: [Windows] AudioEngine testers - Windows platform only - mirpet - 2012-09-30 23:42

Windows is already configured to allow exclusive mode see https://www.dropbox.com/s/5tgrjnlcj4z0pes/Capture.JPG

I already tried with WASAPI, so i switch to Direct Sound to test that config. I made another log: https://www.dropbox.com/s/9ihrvoqrj7sxufd/xbmc%20%282%29.log with WASAPI and Stereo Upmix disabled but with no improvement, XBMC still outputs stereo. I know that because when 5.1 passthrough is used before I couldn't use XBMC volume control (it says 'Passthrough in use'), and now I can turn down/up volume with XBMC.
Also I noticed (as you can see: https://www.dropbox.com/s/5tgrjnlcj4z0pes/Capture.JPG) in 'Default Format' it says 2 channels and I can't select nothing else.

As I try to understand Smile could it be that XBMC doesn't use passthrough when doing DTS to AC3 transcoding? Because when playing DTS movie I can turn up/down volume with XBMC controls (see in logs) and it doesn't say 'Passthrough audio in use'. XBMC should do DTS to AC3 transcoding and then passthrough AC3 stream because I checked that option in settings, maybe XBMC doesn't transcode DTS to AC3? because when I play movie with AC3 5.1 stream (not DTS) all is working -> I can hear sound from all of my speakers, and when trying to volume up/down XBMC does't allow it ('Passthrough audio in use').

Thank you for your continuing support DDDamian!


RE: [Windows] AudioEngine testers - Windows platform only - DDDamian - 2012-10-01 02:01

Np mirpet. And I think you may have discovered a bug.

When I test on my HDMI setup forcing transcoding of DTS>AC3 it craps out. This is going to take some research - thx for that! It's serious enough to warrant a pretty high priority: I'd hate to get to the Frodo release with that not working! And yes, it looks like we're just decoding the DTS to PCM, and ofc your optical connection can only handle stereo PCM.

Please leave those logs in your dropbox for my reference!


RE: [Windows] AudioEngine testers - Windows platform only - smf007 - 2012-10-01 05:23

Please keep in mind that any decoded audio signal that is to be transcoded, has the XBMC volume control applied.

The only time the XBMC volume control doesn't work is when an audio signal is NOT decoded and passed through. If AC3 is the only passed through signal, all >2 channel sound will be transcoded to AC3. AC3 though is never decoded. So for all NON-AC3 audio, the volume control will work. The ability to decode AC3 then transcode back to AC3 (thus applying volume control) was a feature request of mine for a setup for my kids.

* I'm using an Core i5 with RealTek Optical out. I have the advanced page of the driver set to 2 channel 16bit 48khz.


RE: [Windows] AudioEngine testers - Windows platform only - mirpet - 2012-10-01 10:39

I will leave files as long as you need them.

Please let me know when you fix that so I can test, and also don't hesitate to ask if you need anything else I can help you with!

Thanks again and regards


RE: [Windows] AudioEngine testers - Windows platform only - sialivi - 2012-10-02 18:58

Hi DDDamian,
I just noticed you're not listed as assigned on my http://trac.xbmc.org/ticket/13322 ticket, just a reminder so it doesn't get lost in the shuffle while you have higher priority things to fix. Cheers.


RE: [Windows] AudioEngine testers - Windows platform only - bugme - 2012-10-02 19:25

Can a developer look at this log http://pastebin.com/RKtX3hXn

All xbmc compiled from xbmc/master and other details are in log.

and explain why the AE puts out

INFO: CAESinkALSA - ALSA: pcm_hw.c:587:(snd_pcm_hw_start) SNDRV_PCM_IOCTL_START failed: Broken pipe

And why the error and how can this be fixed?

16:20:54 T:3077659136 ERROR: CAESinkOSS::EnumerateDevicesEx - Failed to open mixer: /dev/mixer

if theres other errors pls let me know what can be done to fix/mitigate?


RE: [Windows] AudioEngine testers - Windows platform only - DDDamian - 2012-10-03 04:42

@sialiva - ticket accepted

@bugme - there's a Linux AE thread but I'll answer here on the first issue: that log line is a buffer underrun caused by a problem we're working on (I'm a win dev but am trying to resolve with other team members who work on Linux/ALSA). See post #2 of this thread for the <streamsilence> tag for advancedsettings.xml. If enabled it should resolve that issue until we fix properly.

Not sure about the CAESinkOSS error except to say something is not set up correctly in your sound settings outside of XBMC.


RE: [Windows] AudioEngine testers - Windows platform only - bugme - 2012-10-03 10:45

(2012-10-03 04:42)DDDamian Wrote:  @bugme - there's a Linux AE thread but I'll answer here on the first issue: that log line is a buffer underrun caused by a problem we're working on (I'm a win dev but am trying to resolve with other team members who work on Linux/ALSA). See post #2 of this thread for the <streamsilence> tag for advancedsettings.xml. If enabled it should resolve that issue until we fix properly.

Not sure about the CAESinkOSS error except to say something is not set up correctly in your sound settings outside of XBMC.

Adding <audio><streamsilence>1</streamsilence></audio> has zero effect on either entry in xbmc.log., its exactly the same. so it fixes nothing however I can tell you that its not uncommon error/entries in anyones linux logs, if I google any error i get pastebins after pastebins in many different platforms e.g.non ubuntu.

that alone tells me It cant be simply a misconfiguration on my part but something deeper into AE

while I realize this is a "windows" thread and your a windows dev, (just realized it today) nonetheless you are informed that something is going on, and that the workaround you suggest has no effect. Perhaps the AE devs in linux can be made aware AE is causing these weird errors and broken pipes + random messages.

Perhaps you guys are even able to fix it, I see a few git PR that could very well have positive effects on these idk, im no expert.

please help.


RE: [Windows] AudioEngine testers - Windows platform only - ffreak - 2012-10-03 20:27

Hey DDDamian,

there is a bug i have for a long time now:
Playing back movies with a PCM Track (like casino royale) over wasapi results in stuttering and no sound ( my receiver shows 0 channels )
It works when I deactivate pcm support ( for transcoding ) or change the playback device to directsound.
Having this issue on all recent nightlies, with windows 7 and 8 with a E350 setup.

Is this a known error or do you need a debug log?

Appreciate your help
kindest regards
ffreak


RE: [Windows] AudioEngine testers - Windows platform only - zotnick - 2012-10-05 07:55

Would just like to add that I have the same problem as ffreak. Any mkv file with an LPCM track using wasapi stutters very badly and has no sound. Same thing if it has a FLAC track. Been happening on all nightlies I've tried for months, Windows 7, using Intel HD graphics (Iron Lake).


RE: [Windows] AudioEngine testers - Windows platform only - DDDamian - 2012-10-06 04:44

Of course I need logs Tongue


RE: [Windows] AudioEngine testers - Windows platform only - sialivi - 2012-10-06 05:07

DDDamian,

I can confirm the PCM bug reported above, just tried it. Here's a log and a sample file.

Logfile: http://xbmclogs.com/show.php?id=9970
Sample: http://dl.dropbox.com/u/41720073/CRANK%20%281%29-001%20%288%20channel%20PCM%20audio%29.mkv

I've also tested the sample file in mpc-hc and it plays just fine there.

Edit: Missed that the original poster was using a LPCM source and my sample was PCM, but it seems perhaps both are effected.


RE: [Windows] AudioEngine testers - Windows platform only - thrak76 - 2012-10-06 08:14

I'm not saying that sialivi, ffreak, and zotnick aren't having issues playing PCM tracks contained in an .mkv, but here on my Windows 7, Frodo Alpha 6 (snapshot) install, i'm not having those problems.

I tested a multichannel PCM .mkv (Kill Bill), and a multichannel .flac .mkv (Lion/ Witch/ Wardrobe). I did notice that the Crank file is 8 channel PCM, and my sources were only 6. I, unfortunately cannot test with an 8 channel PCM/.flac source. All my 8 channel material is DTSHD/TrueHD.

EDIT - Just tested the sample sialivi posted. Played fine here w/ WASAPI.


RE: [Windows] AudioEngine testers - Windows platform only - sialivi - 2012-10-06 16:57

(2012-10-06 08:14)thrak76 Wrote:  I'm not saying that sialivi, ffreak, and zotnick aren't having issues playing PCM tracks contained in an .mkv, but here on my Windows 7, Frodo Alpha 6 (snapshot) install, i'm not having those problems.

I tested a multichannel PCM .mkv (Kill Bill), and a multichannel .flac .mkv (Lion/ Witch/ Wardrobe). I did notice that the Crank file is 8 channel PCM, and my sources were only 6. I, unfortunately cannot test with an 8 channel PCM/.flac source. All my 8 channel material is DTSHD/TrueHD.

EDIT - Just tested the sample sialivi posted. Played fine here w/ WASAPI.

Just so we are on the same page here, do you have "Multichannel LPCM capable receiver" enabled in the settings? Cause the file is *decoded* just fine with it disabled, but when bitstreamed to an AVR it fails.