Random Audio Hangs

I am getting random audio hangs on my quite new Vero 2, when playing music. I think it’s not a complete system hang, but I’m not entirely certain. I may be seeing a similar issue when playing video, but this could be a sync issue with my AVR or TV.
The hangs last about 1-5 seconds with no obvious regularity.

So I am looking for ways to figure out what happens, but I’m not sure where to look. I tried enabling debug logging, but nothing seems to stand out when the hangs happen. dmesg shows nothing unusual as well.

Let’s have a look at the log. Can you also explain how your audio is connected (HDMI, Analog, SPDIF?).

Does plugging directly in to the TV (temporarily) help?

Sam

I’m playing files via SMB over wired ethernet. The Vero is connected via S/PDIF to my AVR.
I’m trying different sources and connections now to see what I can rule out. I’ll post log info if I keep seeing the hangs.

A log will likely let us see what’s up

Also try copying the file locally and seeing if the issue persists

Cheers

Sam

Yeah I’ve been playing files off an SD card for a while now, and I haven’t noticed any hangs.
So it may turn out to be a network problem, but wouldn’t the Vero have to be using little or no buffering to exhibit interruptions with normal MP3 files?

Unfortunately paplayer, which is Kodi’s audio player has no buffering. This affects other OSMC platforms. I agree that it’s problematic.

You can play audio with dvdplayer (Kodi’s video player) which does have buffering, but you lose some nice things like gapless audio; visualisations etc.

Sam

Ah that would explain it :slight_smile: I will try using dvdplayer to confirm.
I did suspect buffering, but I thought it very unlikely, particularly since I’d expect underruns to show up in the debug log.

Let me know how you get on.

Sam

I have been playing music off an SD card for a couple of days with no issues, so I think it’s safe to say that it was just a network issue. I haven’t bothered with dvdplayer yet, but I may give it a whirl when I have some spare time.
I am wondering why there is no buffering in paplayer though.

I’ve had this problem too, and people just don’t like big gaps in the music when you’re hammering out some tunes for the dancefloor!!!

Surely adding some buffering to paplayer would be an obvious thing to do. Who/where do we ask nicely to sort this issue?

Buffer in paplayer has been requested since 2009.

http://forum.kodi.tv/showthread.php?tid=52908

Maybe there will be something we can do in the interim. Are you streaming via SMB? Does NFS improve things?

As a workaround you could try setting buffermode to 1 in advancedsettings.xml:

http://kodi.wiki/view/HOW-TO:Modify_the_cache

This tells Kodi to use the default 20MB buffer for “local” file systems as well as “internet” filesystems. EG it will add buffering for NFS and SMB sources. The default 20MB should be more than enough so buffermode is all that should need changing.

Note: this buffering is outside of paplayer, it is an additional buffer in Kodi at the file system / network level before the data is passed to paplayer or dvdplayer, which is not normally enabled for “local” sources like local disk, NFS, and SMB.

Another option (possibly better, but more complicated) would be that if you are using SMB or NFS, to set up a kernel mount for those in /etc/fstab and use that, rather than using Kodi’s built in NFS/SMB clients, as they do not do much/any buffering whilst a kernel mount will use any free system ram for buffering automatically and will automatically do a lot of readahead.

That does look like a bona fide buffering setting. I wonder why it’s tucked away in there and/or not enabled by default?
If indeed SMB/NFS fall in the local filesystem category, this would very likely solve the issue.

A simple solution could then be to set buffermode to 1 in /usr/share/kodi/system/advancedsettings.xml, perhaps with a smaller buffer.
A menu in My OSMC for things like this could be a great feature. I had no idea this setting existed (or was necessary).