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

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: [Windows] AudioEngine testers - Windows platform only (/showthread.php?tid=124600)



RE: [Windows] AudioEngine testers - Windows platform only - DDDamian - 2012-08-28

Hey no prob bossanova808. Yep, consensus was a return to Eden-style release of the audio device. That's good and bad.

Good because:
- ppl running XBMC in the background can hear other sounds when XBMC idle
- reduces CPU usage for Android, Raspberry PI, embedded platforms

Bad because:
- there'll be Eden-style missing audio at the start of tracks
- there'll be more receiver switching and/or drop-outs

I think I gave the best of both worlds: to handle external players or shell launches like ROMs with WASAPI we use the new Suspend()/Resume() functions, and if you use the new <streamsilence>1</streamsilence> tag you'll still get the current AE-style continuous stream with minimal gaps between songs or on starting a song.

If you really need XBMC to drop the audio device when nothing's playing that will be the new default behaviour, albeit with the issues noted.

Glad the Catalyst update fixed that - less for me Smile tbh that one puzzled me!


RE: [Windows] AudioEngine testers - Windows platform only - bossanova808 - 2012-08-28

Hmm, so in my case where I only run XBMC on Windows but want my addon to be able to use the audio device when run, I guess I could then actually leave the streamsilence set to (1) and by default addons will have a suspend()/resume() call when called anyway? In which case for me, that's best of both worlds really....or am I misunderstanding?



RE: [Windows] AudioEngine testers - Windows platform only - DDDamian - 2012-08-28

@bossanove808 - that likely won't happen. Addon's are a broad catagory - everything from services to weather to visualizations to scrapers. We can't Suspend/Resume for every addon the way we can with external players.

Imagine listening to music and checking the weather - only to have the audio stop and streams lost. Now imagine the same scenario when a visualizations starts!

Forgive me - not sure what addon you are referring to. If it's in a defined addon class where it makes sense to stop XBMC's audio when launching that class it *may* be do-able.

Let me know, and I'll also ask around the team (although I'm doubtful) about if we can expose a trigger to a Python script which the main app can watch for and enter Suspend/Resume that way.

Otherwise the only way that would work is using DirectSound or <streamsilence>0 if you're using audio external to XBMC but still want to use WASAPI.


RE: [Windows] AudioEngine testers - Windows platform only - bossanova808 - 2012-08-28

It's Add-on:XSqueeze (wiki) - basically uses a Squeezebox emulator program to let XBMC hook into an existing player infrastructure for e.g. Multi-Room audio.

It's no drama - my receiver is pretty quick, was just curious. Certainly don't do it on my account - it's kinda ridiculous, I barely use my own addon! Just did it for an exercise to learn Python and for others who seemed keen, I just generally play music in XBMC itself Smile





RE: [Windows] AudioEngine testers - Windows platform only - DDDamian - 2012-08-28

Oh yeah - I've followed a bit of that Smile

I'll still ask around - there may be some ridiculously simple way of exposing those triggers, or it may be insanely hard - addon/XBMC interaction is an area I've never checked into. Someone on the team will know a quick answer I'm sure - I'll ask in the team chat.

FYI - those drop-out's or delays I mentioned are only when the stream list is empty and a new stream is started - wouldn't affect a playlist of mp3's for example.


RE: [Windows] AudioEngine testers - Windows platform only - sialivi - 2012-08-28

I posted about an issue when switching audio tracks in the AE windows support thread. Could someone confirm this issue so I know it's not a problem at my end?


RE: [Windows] AudioEngine testers - Windows platform only - DDDamian - 2012-08-28

@sialivi - if someone else can confirm will try to duplicate here - not sure I have any vids with multiple tracks but can get

@bossanova808 - good news for you. With the gracious help of devs jcarroll and amet (thx!) we're going to add xbmc.AudioSuspend and xbmc.AudioResume to the Python API so you'll be able to suspend AE from there. Amazing what can happen when the dev team comes together!!

That said - that particular feature won't be in until October merge window. For external players it'll go in September merge.


RE: [Windows] AudioEngine testers - Windows platform only - sialivi - 2012-08-28

Here's a sample file, would appreciate if someone could test if they're seeing the same problem, http://dl.dropbox.com/u/41720073/dualaudio.mkv

Just switch audiotrack while it's playing and see if the video gets all choppy for several seconds.




RE: [Windows] AudioEngine testers - Windows platform only - bossanova808 - 2012-08-29

@DDDamian - very good news indeed. Means my addon will work nicely no matter what choice the user has made with the streamsilence option. And one presumes there will be other addons that find this handy.

Certainly no hurry on when it gets in, it will be a very simple addon change to make it all work it seems...


RE: [Windows] AudioEngine testers - Windows platform only - jjd-uk - 2012-08-30

(2012-08-28, 05:46)DDDamian Wrote: Bad because:
- there'll be Eden-style missing audio at the start of tracks
- there'll be more receiver switching and/or drop-outs
I guess this must depend a lot on individual set up as I've never noticed either of these on main htpc connected via hdmi to an avr or my bedroom htpc connected via optical spidf to an avr Huh or perhaps it's there but just too short for me to notice Huh




RE: [Windows] AudioEngine testers - Windows platform only - thrak76 - 2012-08-30

The only time i was ever aware of the drop-outs in Eden was after playback resumes from a pause. It always took a couple seconds to send audio again. Other than that I didn't notice.


RE: [Windows] AudioEngine testers - Windows platform only - DDDamian - 2012-08-30

(2012-08-30, 14:21)jjd-uk Wrote:
(2012-08-28, 05:46)DDDamian Wrote: Bad because:
- there'll be Eden-style missing audio at the start of tracks
- there'll be more receiver switching and/or drop-outs
I guess this must depend a lot on individual set up as I've never noticed either of these on main htpc connected via hdmi to an avr or my bedroom htpc connected via optical spidf to an avr Huh or perhaps it's there but just too short for me to notice Huh

It will depend on several factors for sure:
1) your receiver and it's switching time and reaction if no incoming data (the latter being an issue on very few receivers)
2) your processor speed
3) whether you switch much between different file types, e.g. mp3 to FLAC and back

There's some minor issues in PAPlayer that need addressing when tracks switch as well that are a bit of a priority on the list.

The good thing is now you have options Wink


RE: [Windows] AudioEngine testers - Windows platform only - jjd-uk - 2012-08-30

(2012-08-30, 17:13)DDDamian Wrote: The good thing is now you have options Wink
Once again thanks for getting this done and providing the rest of the Team the gentle nudge needed to reach agreement on this, if I've read the comments on the pull request right davilla had already done something similar to free up resources on the Android systems.

Just wondered, with gnif now on sabbatical after getting this beast of a project merged, are you now the numero uno dev on the non platform specific parts of AE? or is development now being done on a ad hoc basis of who on the team has any free time? or a bit of both?



RE: [Windows] AudioEngine testers - Windows platform only - DDDamian - 2012-08-30

@jjd-uk - part of the benefit of getting this project merged early after the Eden final release was that it brought AE into the main base of code that all XBMC developers are working at. This means that obvious issues, whether platform-dependent or not, will become apparant to them, Whether they decide to tackle them or not is of course up to them: devs work on a combination of what needs to be done and what they feel like working on, as is fitting for a volunteer project.

They're also very good at narrowing down issues or providing excellent detective work as many have intricate knowledge of the code base, and slowly but surely of AE itself.

Several devs (davilla, memphiz, anssi, theuni and others) have fixed things on their platforms and in general - welcome help indeed.

As far as features it's me that is most focused on AE at the moment. Bug-fixes and stability are the most important issues right now due to the upcoming Frodo release, but there are several features either completed at this stage or sketched out, but they will be post-Frodo.

Everything in XBMC is a little ad-hoc - just the nature of the beast Smile


RE: [Windows] AudioEngine testers - Windows platform only - sialivi - 2012-08-30

DDDamian,
Had a chance to see if you could recreate the issue when switching audio track?