[AudioEngine] Support for AE on Windows platform

  Thread Rating:
  • 4 Votes - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
DDDamian Offline
Team-XBMC Developer
Posts: 3,030
Joined: Sep 2011
Reputation: 254
Location: Canada
Post: #226
PR submitted to allow audio when using external players and WASAPI exclusive - should be in master shortly
https://github.com/xbmc/xbmc/pull/1326

System: XBMC HTPC with HDMI WASAPI & AudioEngine - Denon AVR-3808CI - Denon DVD-5900 Universal Player - Denon DCM-27 CD-Changer
- Sony BDP-S580 Blu-Ray - X-Box 360 - Android tablet wireless remote - 7.1 Streem/Axiom/Velodyne Surround System
If I have been able to help feel free to add to my reputation +/- below - thanks!
find quote
jjd-uk Offline
Team-XBMC Member
Posts: 2,706
Joined: Oct 2011
Reputation: 57
Post: #227
(2012-08-25 08:31)DDDamian Wrote:  PR submitted to allow audio when using external players and WASAPI exclusive - should be in master shortly
https://github.com/xbmc/xbmc/pull/1326
Thanks for doing that Damian.

Still trying to understand the logic for the decision behind the AE WASAPI exclusive sink being constantly on. I understand it was for the silent stream bug that some users see, however my understanding that those who suffer only lose the 1st couple of seconds of audio while the sink reinitialises, so to me not really a big deal on a 2hr movie although maybe more concerning for music. I've not seen this silent stream bug widely reported as a must fix issue, certainly don't see many posts on it around here, so why the change which has caused such a major regression in behaviour for the majority of people who've no idea about silent stream bug?

If something had to be done, why not leave it to end user choice and maybe tie it to GUI sounds on/off, so new behaviour where sink is in constant use with GUI sounds on but releases audio device as per previous behaviour with GUI sounds off. Perhaps also include a volume slider for GUI sounds so GUI sounds could be set to on for new behaviour then minimised for those that don't want them while at the same still giving new sink behaviour.

I know Directsound can be used, but that then means no HD Audio so no good if you want HD Audio plus do other things on your pc.

Sorry for banging on about this and fully appreciate the unpaid efforts of yourself and all the other developers, but many use there pc's for more than just XBMC. It doesn't personally affect me to a great extent, but I can imagine there being a big fuss by end users if no choice is given by the time Frodo official comes out, I see all the forums posts complaining coming in my mind anyway.

I believe the AE WASAPI exclusive sink behaviour also breaks some addons as well.

Please don't take this as having a go, just trying to understand why the decision was taken to implement as is, any insight would be gratefully received.
find quote
DDDamian Offline
Team-XBMC Developer
Posts: 3,030
Joined: Sep 2011
Reputation: 254
Location: Canada
Post: #228
@jjd-uk - agree with what you're saying. FYI it was something built into the design of AE from the get-go, long before I got involved with it, and I believe it was to solve issues with receiver's dropping the signal after a period of silence and to improve response time for streams starting/switching but that's a guess.

The issue only appears for exclusive modes on win32 and OSx, but for win users WASAPI is the preferred method by far and required for most bistreaming formats.

An easy solution presents itself, and that's with a setting in as.xml but we try to avoid such settings where possible as there are so many. This one though is important enough to warrant inclusion in my books - just waiting for feedback from team. I would default it to the preferred behaviour here which in my books is releasing the sink and audio device if no streams are playing and GUI sounds are disabled.

Unless you *really* like GUI sounds it seems the best solution Wink

System: XBMC HTPC with HDMI WASAPI & AudioEngine - Denon AVR-3808CI - Denon DVD-5900 Universal Player - Denon DCM-27 CD-Changer
- Sony BDP-S580 Blu-Ray - X-Box 360 - Android tablet wireless remote - 7.1 Streem/Axiom/Velodyne Surround System
If I have been able to help feel free to add to my reputation +/- below - thanks!
find quote
jjd-uk Offline
Team-XBMC Member
Posts: 2,706
Joined: Oct 2011
Reputation: 57
Post: #229
Thanks a lot for your response, I'm very happy see we're in agreement and your trying to make some changes, it's very much appreciated even if your efforts with the Team come to nothing.

I'm still running Eden (daniella HD audio build) on my main htpc, with Frodo snapshots on my laptop for testing, so hasn't been a big deal for me, my main usage case would be switching to a browser for UK catch up tv sites but these are rarely used as my regular viewing is set up in Sickbeard.

Something I been thinking about experimenting with is launching the catch up tv sites with the browser as an external player using the methods outlined at http://wiki.xbmc.org/index.php?title=How...nal_player

Would your external player fix give audio to the browser? I'm guessing it will work with any defined external player and doesn't care what type of program it is.

Thanks again for your time.
(This post was last modified: 2012-08-25 20:15 by jjd-uk.)
find quote
thrak76 Offline
Moderator
Posts: 1,394
Joined: Mar 2011
Reputation: 25
Location: Lake Michigan Shoreline
Post: #230
Where the exclusive sink is getting me is how you are describing jjd-uk, when trying to view content in a web browser. In my case, I'm trying to run everything from my xbmc install, including amazon instant videos and Netflix. Amazon works fine thanks to Bluecop's add-on, but Netflix has to be run within a browser window/silverlight. Not only do I not get audio (expected), but I also get nice errors (in silverlight) i believe are related to AE not releasing audio device. The Wiki entry you referenced is interesting. I wonder if it could be tweaked to be as seamless as this set of batch files for launching Netflix. This worked well in Eden.

I look forward to an AS.xml option!
find quote
Death-Axe Offline
Posting Freak
Posts: 777
Joined: Feb 2007
Reputation: 5
Post: #231
AAC seems to have been improved some what in alpha 4, the 2.0 files are now watchable but still judder a little bit though. 5.1 AAC though still judders and makes things unwatchable. I suspect it is the same discontinuity errors, I'll do another debug log tomorrow. Or if you would be so kind, look back at my older posts on this topic and take a peek at those logs to see if you can make sense of it all.

Glad to see you're back, and glad AE is coming along nicely.

[Image: widget]
HTPC: Motherboard: Asus F2A85-V, CPU: AMD A10 6800K, RAM: Kingston XMP BEAST 16GB, Samsung 840 EVO 250GB, LG CH12NS30 Blu-Ray drive, Samsung, and WD various 2 and 3TB for storage, Windows 8.1, one for all remote/FLIRC, Logitech z906 surround system.
find quote
ashlar Offline
Donor
Posts: 2,110
Joined: Mar 2006
Reputation: 27
Post: #232
Am I mistaken in understanding that, considering AE seems quite unready for primetime, the chance of people testing the new releases diminishes? I mean apart from AE itself. When minor things aren't working, one is more than happy to test it to make it better. But the entire sound subsystem? It's a whole different beast? Maybe it's been merged too soon?

Sorry if I am mistaken, I read several pages of this thread and it scared me off...

For troubleshooting and bug reporting please make sure you read this first.
find quote
Death-Axe Offline
Posting Freak
Posts: 777
Joined: Feb 2007
Reputation: 5
Post: #233
Here is a new debug log, same errors as previous: http://xbmclogs.com/show.php?id=7314

[Image: widget]
HTPC: Motherboard: Asus F2A85-V, CPU: AMD A10 6800K, RAM: Kingston XMP BEAST 16GB, Samsung 840 EVO 250GB, LG CH12NS30 Blu-Ray drive, Samsung, and WD various 2 and 3TB for storage, Windows 8.1, one for all remote/FLIRC, Logitech z906 surround system.
find quote
DDDamian Offline
Team-XBMC Developer
Posts: 3,030
Joined: Sep 2011
Reputation: 254
Location: Canada
Post: #234
(2012-08-26 12:20)ashlar Wrote:  Am I mistaken in understanding that, considering AE seems quite unready for primetime, the chance of people testing the new releases diminishes? I mean apart from AE itself. When minor things aren't working, one is more than happy to test it to make it better. But the entire sound subsystem? It's a whole different beast? Maybe it's been merged too soon?

Sorry if I am mistaken, I read several pages of this thread and it scared me off...

Hi Ashlar - I'd have to disagree about it not being ready to merge for a few reasons:

1) the merge took place almost immediately after the Eden final release, which is perfect timing as it gives an entire release cycle for testing
2) we released several pre-built versions for the initial beta-testers (and thx to all those brave souls Wink )
3) based on their reports and the release of Eden final we merged it for testing on a wider range of users - those using nightlies
4) with the merge we have both a wider tester base and more devs are able to contribute and fix issues

Please remember that reading support or development threads will *always* highlight issues - that's why we created these threads and monitor them. They are not generally indicative of the state of things as for each user reporting a bug ten users may not have issues at all. Or to put it another way many users will report a bug (thank you!) but few will post comments when things are working well.

That's not to diminish the fact that there *will* be issues and fixes required. We knew going in that this was likely the biggest single merge / re-write in XBMC's history, and I noted in the press release for AE that bugs will be found and problems solved along the way. The previous audio system had years of tweaks, additions and fixes - AE is just beginning that cycle. Being a very core function of a media player a wholesale re-coding of the audio system affects everyone - moreso than the addition of something like PVR. For that reason it will be tested on a very wide range of systems, platforms, etc.

Such is progress - without going through these motions we would not have HD audio bitstreaming, 24bit audio, DSP's or for that matter any of the features of XBMC.

Anyone using nightlies or alphas is by default a beta tester. You can expect more issues, overnight code changes and bugs. Often to have the latest features you need to be ready to accept the downsides as well.

It's because of those users that XBMC in general matures and grows. It's not a role for everyone - and for those who are testing nightlies we both appreciate the bug reports and their role in the development cycle, and hope they enjoy the new features. Anything outside of the stable releases (which still obviously have bugs) is bleeding-edge and should be treated as such.

For those who don't / won't / can't accept that we fully understand and hope they enjoy the stable releases!

System: XBMC HTPC with HDMI WASAPI & AudioEngine - Denon AVR-3808CI - Denon DVD-5900 Universal Player - Denon DCM-27 CD-Changer
- Sony BDP-S580 Blu-Ray - X-Box 360 - Android tablet wireless remote - 7.1 Streem/Axiom/Velodyne Surround System
If I have been able to help feel free to add to my reputation +/- below - thanks!
(This post was last modified: 2012-08-26 18:26 by DDDamian.)
find quote
DDDamian Offline
Team-XBMC Developer
Posts: 3,030
Joined: Sep 2011
Reputation: 254
Location: Canada
Post: #235
(2012-08-26 15:32)Death-Axe Wrote:  Here is a new debug log, same errors as previous: http://xbmclogs.com/show.php?id=7314

Hi Death-Axe,

On my systems 5.1 AAC works fine with HDMI output as well as downmixed to 2.0 analog, but your situation is different as you're using an optical or coax SPDIF output.

Can you try a couple of things?

1) First grab the latest nightly as some changes have been made recently.
2) Set your speaker layout to 2.0 and try that file again. Because you are using an optical output AAC 5.1 would need to be either downmixed to 2.0 PCM or transcoded to ac3 which is another option. Optical only allows 2 channel PCM and setting your speaker layout to 2.0 will not affect normal 5.1 ac3 or dts files as these are passed thru.

I'd like to know if that solves the problem, although obviously it will only give you stereo output.

Let me know, and then we'll look at using <transcodeto> to get your 5.1.

System: XBMC HTPC with HDMI WASAPI & AudioEngine - Denon AVR-3808CI - Denon DVD-5900 Universal Player - Denon DCM-27 CD-Changer
- Sony BDP-S580 Blu-Ray - X-Box 360 - Android tablet wireless remote - 7.1 Streem/Axiom/Velodyne Surround System
If I have been able to help feel free to add to my reputation +/- below - thanks!
find quote
Death-Axe Offline
Posting Freak
Posts: 777
Joined: Feb 2007
Reputation: 5
Post: #236
Hi, tried those and I still get the same issue when I selected 2.0 in audio settings. I first tried the file on today's nightly then I changed speaker setting to 2.0 and again tried the file. I have upped a log for ref: http://xbmclogs.com/show.php?id=7347

Odd thing is, the decode light on the system is lit when the ep is played, which in theory it shouldn't be. Odd (decode doesn't light up on 2.0 AAC).

A transcode option would be great if you could put that in.

Thank you so much for helping.



(just a side issue, every time I update XBMC it resets my database back from over a week ago, items that where once ticked off as watched are no longer, and newly scanned in stuff has gone and I need to rescan. I have to go to the trakt website to to see what eps of stuff I watched last.)

[Image: widget]
HTPC: Motherboard: Asus F2A85-V, CPU: AMD A10 6800K, RAM: Kingston XMP BEAST 16GB, Samsung 840 EVO 250GB, LG CH12NS30 Blu-Ray drive, Samsung, and WD various 2 and 3TB for storage, Windows 8.1, one for all remote/FLIRC, Logitech z906 surround system.
(This post was last modified: 2012-08-26 20:46 by Death-Axe.)
find quote
DDDamian Offline
Team-XBMC Developer
Posts: 3,030
Joined: Sep 2011
Reputation: 254
Location: Canada
Post: #237
@Death-Axe - in your last log it still indicated a 5.1 layout, so I assume you changed that back to 5.1 taking the log.

It appears from the log that it is transcoding AAC>AC3 automatically (as it should) so no point forcing the transcoding as that's already happening due to the setting "AAC capable receiver" being disabled.

Can you try again but this time set both the passthrough and non-passthrough devices to WASAPI so I can see if it's a DirectSound issue.

Regarding the database issue sounds like the latest nightlies are using a newer database version and not correctly transferring the watched status flags when copying the old database over...

System: XBMC HTPC with HDMI WASAPI & AudioEngine - Denon AVR-3808CI - Denon DVD-5900 Universal Player - Denon DCM-27 CD-Changer
- Sony BDP-S580 Blu-Ray - X-Box 360 - Android tablet wireless remote - 7.1 Streem/Axiom/Velodyne Surround System
If I have been able to help feel free to add to my reputation +/- below - thanks!
find quote
Death-Axe Offline
Posting Freak
Posts: 777
Joined: Feb 2007
Reputation: 5
Post: #238
Speaker config is indeed at 2.0, tried with wasapi with the same result (judder on playback). Log here http://xbmclogs.com/show.php?id=7353

[Image: widget]
HTPC: Motherboard: Asus F2A85-V, CPU: AMD A10 6800K, RAM: Kingston XMP BEAST 16GB, Samsung 840 EVO 250GB, LG CH12NS30 Blu-Ray drive, Samsung, and WD various 2 and 3TB for storage, Windows 8.1, one for all remote/FLIRC, Logitech z906 surround system.
(This post was last modified: 2012-08-26 22:30 by Death-Axe.)
find quote
DDDamian Offline
Team-XBMC Developer
Posts: 3,030
Joined: Sep 2011
Reputation: 254
Location: Canada
Post: #239
Pls try to keep logs shorter - playback didn't start until ~11,000 lines had gone by lol.

Two more thing to try - enable "AAC capable receiver" in Settings>System>Audio Output and try.

If that doesn't help then add the following to your advancedsettings.xml file and try again:

Code:
<audio>
    <audiosinkbufferdurationmsec>150</audiosinkbufferdurationmsec>
</audio>

You can add those 3 lines right after the <advancedsettings> tag.

System: XBMC HTPC with HDMI WASAPI & AudioEngine - Denon AVR-3808CI - Denon DVD-5900 Universal Player - Denon DCM-27 CD-Changer
- Sony BDP-S580 Blu-Ray - X-Box 360 - Android tablet wireless remote - 7.1 Streem/Axiom/Velodyne Surround System
If I have been able to help feel free to add to my reputation +/- below - thanks!
find quote
Death-Axe Offline
Posting Freak
Posts: 777
Joined: Feb 2007
Reputation: 5
Post: #240
AAC capable receiver on: http://xbmclogs.com/show.php?id=7363 (no change)

advancedsettings: http://xbmclogs.com/show.php?id=7364 (no change)

[Image: widget]
HTPC: Motherboard: Asus F2A85-V, CPU: AMD A10 6800K, RAM: Kingston XMP BEAST 16GB, Samsung 840 EVO 250GB, LG CH12NS30 Blu-Ray drive, Samsung, and WD various 2 and 3TB for storage, Windows 8.1, one for all remote/FLIRC, Logitech z906 surround system.
find quote
Post Reply