KODI v17 Audio error
#1
KODI logs 011717

First of all congratulations on v17's many improvements. The audio quality has now retired my usual music player it has improved so much. Two audio issues is what I am here to post some possible bugs about. First any time I play my music collection kodi will crash. This is every time without exception and also I've noticed that while kodi is open and I go to a website with audio, youtube usually, there is no sound at all. I have to first close kodi and then my browser to make audio work again. After playing music today and having the same issue repeatedly and also the no audio in my browser while kodi is minimized I decided to turn on debugging mode and recreate the issues. After I turned debugging on music played flawlessly. So the attached log files will hopefully have entries from the minutes before I turned debugging on because both issues would be on there. After debugging was turned on there were no more music playback issues.

Kodi v17rc3
win10 x64
Reply
#2
Windows audio (wiki) FTW: Kodi uses WASAPI only in the Exclusive Mode of operation in order that Kodi gets the exclusive rights to the audio buffers whilst playing audio streams to the exclusion of all other sounds or players, this is a change from previous version of Kodi where Shared Mode was also allowed.
Quote:After debugging was turned on there were no more music playback issues.
If this is the solve, leave it on! Looking at your log, there is a lot of errors coming from the Emby add-on, and I'm unfamiliar with it enough to suggest trying to disabling it to see if you can play back audio with some stability.
Reply
#3
Windows has 2 main audio API's, these are Directsound and WASAPI.

Directsound is the main API used for desktop apps as it sends all sound to a built in Windows Audio Mixer that allows more than one sound to be heard at once, however sending sound through the mixer can compromise quality. For audio apps that need high quality there is a 2nd API called WASAPI, however in order to achieve the highest quality possible that your audio device can produce the first app to open using WASAPI takes exclusive control of the audio device, excluding of all other apps/sounds from the audio device.

If your PC is mostly Kodi usage with occassional desktop usage then stick with WASAPI, however make sure the "Keep audio device alive" and "GUI sounds" settings are turned off, thus after an idle period of no audio the exclusive control should be release and allow sound from other apps.

However is your PC is mostly desktop usage with occasional Kodi, or you use Kodi in the background for music while doing other things for example, usage then switch to the Directsound selection for your audio device within Kodi then you never have to worry about Kodi grabbing exclusive control.
Reply
#4
Thanks, I am using the WASPI settings and my pc is used almost exclusively as an HTPC. I will have to stick with WASPI, that is the only setting that allows DTS audio to play, win10 alone won't play DTS and apparently the directsound setting won't either. I had installed win10 a year ago and reverted to win7 after no dts would play. If I had knew then that Kodi would enable that capability I would have stayed with win10 then.

I guess the main issue then is why I can't get the music to play without locking/crashing kodi. Immediately after I posted this I turned off the debug mode and tried to play music and it locked kodi immediately. I then immediately tried to play a music track with the windows app and it gave the message that your audio is not available because another program is using it.

That has made using kodi as my only music player not feasible at the moment, and I still need to use musicbee to be able to endlessly play music. Musicbee did sound much better than kodi and I always used it to play music, but not any more because kodi sounds so much better now, the same as musicbee.

I like to have all media playable from one media center as I use to do with msMCE. Do you see any reason why this happens in the logs? Also I'll have to check but I'm fairly certain I have all of the GUI sounds off, but I have to make sure the keep audio device alive setting is correct. I'm not sure about that one. Is that the probable reason kodi will not release it's audio hooks from my PC?
Reply
#5
(2017-01-18, 18:31)DParsons Wrote: I guess the main issue then is why I can't get the music to play without locking/crashing kodi.
How do you play? Do you fill the current playlist with a large number of songs and then look at it?
There is a bug in v17 up to and including RC3 that causes crashes if you do this. If you queue say just an album the crash doesn't happen.

If not that then again I don't know the effects those Embly errors may have. Remove the addons, or install a portable version and try, and see what happens.
Reply
#6
I will typically just press the party mode, which would make a large playlist. You're seeing emby errors? I know that is one of the questions I'm asked when I setup my emby addon is whether or not to use the emby music library in kodi or not. I may be able to turn that off if that is the reason. I'll check on that, typically emby makes the artwork better for any library that it controls and so I think it would be good to have it work correctly with kodi. Maybe I should post that to them and see if there is something that they need to do to make it work correctly in v17; because I like the whole package I'm using and it would be good to have it all function together as it did with v16.
Reply
#7
(2017-01-18, 18:31)DParsons Wrote: Also I'll have to check but I'm fairly certain I have all of the GUI sounds off, but I have to make sure the keep audio device alive setting is correct. I'm not sure about that one. Is that the probable reason kodi will not release it's audio hooks from my PC?

Even with WASPI we should only be taking control when there is something generating sound from Kodi, this can include the GUI sounds which is why suggest setting those to off. Also the Keep alive setting sends inaudible noise when nothing else is being played or no GUI sounds, this keeps the audio device active and is meant for use with AVR's that sleep their HDMI audio connection if no audio is present, and can be slow to respond when audio appears again. If there has been no sound for a period with keep alive off (not sure what value it is, but it certainly should be well under 10 seconds), then Kodi should release the audio device, if the audio device never gets released then that is a bug I believe.
Reply
#8
(2017-01-18, 19:13)DParsons Wrote: I will typically just press the party mode, which would make a large playlist.
Then it is very likely that the crashes you have experienced will be fixed in RC4 that will be out soon. Please try that and report back either way (I am more likely to spot music related things in the Music Support subforum than I am in any processer specific ones)

Your second issue I am unable to repeat on my dev setup which is windows based, so I really can't comment. But do try what jjd suggests
Reply
#9
Hello Dave,

I'll will do that. I'll look for the music support forum, actually wasn't aware of that thanks.
Reply
#10
(2017-01-18, 06:03)PatK Wrote: Windows audio (wiki) FTW: Kodi uses WASAPI only in the Exclusive Mode of operation in order that Kodi gets the exclusive rights to the audio buffers whilst playing audio streams to the exclusion of all other sounds or players, this is a change from previous version of Kodi where Shared Mode was also allowed.
Quote:After debugging was turned on there were no more music playback issues.
If this is the solve, leave it on! Looking at your log, there is a lot of errors coming from the Emby add-on, and I'm unfamiliar with it enough to suggest trying to disabling it to see if you can play back audio with some stability.

Thanks Pat,

Missed your post initially. My keep audio alive setting was set to 1 minute and I had noticed that the no audio in other apps only happened for a brief moment and would work again eventually even if kodi was still open. Changing that setting to no time may have worked, not entirely sure yet. I haven't had a chance to test it yet. I will try to disable emby's control from the musice library. I think if I just remove it and reinstall it I just need to answer no to having emby control the library and that might work. If it does I'll post that on the emby forum to let them know and also to see if they can sort out the issue it's giving.

I had actually thought to leave debugging on, is there a way to make all of the stats that pop up on the screen go away that would workSmile
Reply
#11
(2017-01-19, 16:43)DParsons Wrote: I had actually thought to leave debugging on, is there a way to make all of the stats that pop up on the screen go away that would workSmile
You can set log level in advancedsettings http://kodi.wiki/view/Advancedsettings.xml
Reply
#12
(2017-01-19, 12:04)DaveBlake Wrote:
(2017-01-18, 19:13)DParsons Wrote: I will typically just press the party mode, which would make a large playlist.
Then it is very likely that the crashes you have experienced will be fixed in RC4 that will be out soon. Please try that and report back either way (I am more likely to spot music related things in the Music Support subforum than I am in any processer specific ones)

Your second issue I am unable to repeat on my dev setup which is windows based, so I really can't comment. But do try what jjd suggests

Hello Dave,

I've reinstalled emby and just chose no to the question about having it control the music library. There have been no errors playing after that point, except now party mode will not work for me anymore. Also changing the stay alive setting to not stay alive lets me use other audio immediately. The artwork is even the same I had thought emby was doing that so I don't even see any point in having emby control the music library at all, not sure if there is a point. Everything seems fine now.
Reply
#13
(2017-01-20, 17:18)DParsons Wrote: There have been no errors playing after that point, except now party mode will not work for me anymore.
Huh
Party mode (from the side blade?) actually uses a smart playlist called "Party Mode", that by default has no rules and so uses all your songs. It is not the way I play so I am not that familiar with using it, but I do wonder if something has happened to that playlist. Maybe have a look - go to smart playlists and try to edit it. You can add rules etc. to make the party mode use a subset of your songs e.g. those of certain genre etc.

I'm still not convinced that Emby having "control of the music library" was the reason for the crashes you experienced, it could be since you were getting errors in the log, or it could be that you were using party mode and thus lots of songs in the current playlist and having the crash related to that. But we'll take the win.

Quote:The artwork is even the same I had thought emby was doing that so I don't even see any point in having emby control the music library at all, not sure if there is a point. Everything seems fine now.
I can't comment, I have never used Embly. But I can say that with well tagged music files you can get a lot from the Kodi music library all on its own Smile

Glad everything is fine for you now. If your problem reappears then come back with debug log as as much detail as you can.
Reply
#14
After v17 rc4 came out I did as clean an install of kodi as possible and did not install the emby addon at all. After about a week I can't figure if there really is any point in it being a part of kodi. It's a very nice and useful app but as far as being in kodi the only point to it I believe is the artwork is synced between the two. It became a useful addon to me years ago as a movie library for msMediaCenter (was called Media Browse or M.B. for short, emby now). There it had a much nicer movie library than the native version, but my main reason to use it was it allowed .iso files to be automatically mounted and played right from the library. After switching to kodi a year ago it was available as an addon to kodi so I installed it. It uses the Nextpvr media center as it's pvr backend the same as kodi so any use of emby will sync with kodi through their mutual pvr backend so other than artwork syncing there is not a lot of use for it in kodi. Just a fyi as why this is app used. It has now become a streaming media center that I can now play live tv, recordedtv, movies; basically like having kodi on my phone or on any web browser and is definitely and integral part of my current htpc and one of the main reasons why my current media center setup is much nicer than my previous stand alone msMediaCenter based htpc.
Reply

Logout Mark Read Team Forum Stats Members Help
KODI v17 Audio error0