ralphy wrote: > I implemented the AAC decoder for squeezeplay and later the community > firmware as Logitech never released the code as they used the closed > source fdk-aac library in the official firmware. > > I have spent some time investigating this issue but had to setup a local > server that streams AAC 320Kbps at 48KHz as unfortunately the high rate > BBC streams aren't available outside the UK. > > What's happening is the aac decoder can't push enough decoded PCM data > to the output buffer at the start of the high rate streams and jive_alsa > throws an underrun error. > > So far I have been able to mitigate this problem using this patch to > Playback.lua on the radio. This change stopped the stuttering about 95% > of the time with my test stream. > > > Code: -------------------- > > --- share/jive/jive/audio/Playback.lua.orig 1969-12-31 19:00:00.000000000 -0500 > +++ share/jive/jive/audio/Playback.lua 2022-06-20 08:49:07.469506981 -0400 > @@ -908,6 +908,11 @@ > -- Even this may not be enough for files with large comments... > self.decodeThreshold = self.threshold > > + elseif self.mode == 'a' then > + -- For fdk-aac, we need to let the decoder fill the pcm output > + -- buffer, otherwise alsa immediately throws an underrun error. > + self.decodeThreshold = 40960 > + > elseif self.threshold > (254 * 1024) and (self.mode == 'f' or self.mode == 'p' or self.mode == 'l') then > -- For lossless (high bit-rate) formats, lets try to get a much bigger chunk so that > -- any server-side delay in streaming caused by playlist updates, etc., do not cause undue problems. > -------------------- > > > > The BBC Sounds Stream throttling interval works around the problem but > might also help find proper fix in the firmware, however the > stuttering doesn't happen with the 96Kbps streams. > > Any help would be appreciated.Can this stuttering occur any time or just at > the beginning of a stream?
Sent from my Pixel 3a using Tapatalk ------------------------------------------------------------------------ slartibartfast's Profile: http://forums.slimdevices.com/member.php?userid=35609 View this thread: http://forums.slimdevices.com/showthread.php?t=113479 _______________________________________________ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins