ralphy wrote: 
> That's what I noticed in the first log as well.  To me, that means it's
> not making a difference and you can probably just remove setting the
> bufferThreshold.
> 

Ok, thanks, I think I understand this now.   On BBC Sounds Live Radio, 
this underrun problem never occurs now.  This is because the protocol
handler is operating on the live edge, and as a maximum,  only has up to
12 seconds (2 dash chunks) of audio available to the radio.  So the aac
decoder can never prioritise filling up the input buffer over populating
the output buffer.  so you get a very different log profile for live
radio:


Code:
--------------------
    
  Mar  1 07:59:02 squeezeplay: INFO   audio.decode - Playback.lua:477 connect 
172.16.0.8:9000 GET /stream.mp3?player=00:04:20:2c:fa:10 HTTP/1.0^M
  Mar  1 07:59:02 squeezeplay: DEBUG  audio.decode - Playback.lua:194 
source=stream
  Mar  1 07:59:02 squeezeplay: DEBUG  audio.decode - stream_connectL:506 
streambuf connect 172.16.0.8:9000
  Mar  1 07:59:02 squeezeplay: DEBUG  audio.decode - Playback.lua:1262 stopping 
local pause timer
  Mar  1 07:59:02 squeezeplay: DEBUG  audio.decode - Playback.lua:1192 gainL, 
gainR: 200 200
  Mar  1 07:59:03 squeezeplay: DEBUG  audio.decode - Playback.lua:397 resume 
decoder, 32768 bytes buffered, decode threshold 2048
  Mar  1 07:59:03 squeezeplay: DEBUG  audio.decode - decode_resume_decoder:580 
decode_resume_decoder
  Mar  1 07:59:03 squeezeplay: DEBUG  audio.decode - 
decode_resume_decoder_handler:122 resume_decoder decode state: 1 audio state 0
  Mar  1 07:59:03 squeezeplay: DEBUG  audio.decode - debug_fullness:112 
fullness: 32768 / 0 | 1.04% / 0.00%
  Mar  1 07:59:04 squeezeplay: DEBUG  audio.decode - decode_output_samples:280 
first buffer sample_rate=48000
  Mar  1 07:59:04 squeezeplay: DEBUG  audio.decode - Playback.lua:424 resume 
audio bytesReceivedL=95944 outputTime=149 threshold=40960
  Mar  1 07:59:04 squeezeplay: DEBUG  audio.decode - decode_resume_audio:601 
decode_resume_audio start_jiffies=0
  Mar  1 07:59:04 squeezeplay: DEBUG  audio.decode - 
decode_resume_audio_handler:133 decode_resume_audio_handler start_jiffies=0
  Mar  1 07:59:04 squeezeplay: DEBUG  audio.decode - debug_fullness:112 
fullness: 63176 / 65536 | 2.01% / 1.86%
  Mar  1 07:59:04 squeezeplay: DEBUG  audio.decode - 
decode_resume_audio_handler:146 resume_audio decode state: 1 audio state 40
  Mar  1 07:59:04 squeezeplay: INFO   audio.decode - Playback.lua:448 2.0%/1.6%
  Mar  1 07:59:04 squeezeplay: DEBUG  audio.decode - Playback.lua:381 status 
TRACK STARTED (elapsed: 528)
  Mar  1 07:59:05 squeezeplay: INFO   applet.NowPlaying - 
NowPlayingApplet.lua:422 enable volume UI in NP
  Mar  1 07:59:06 squeezeplay: INFO   audio.decode - Playback.lua:448 8.0%/3.6%
  Mar  1 07:59:07 squeezeplay: INFO   audio.decode - Playback.lua:448 10.4%/6.3%
  Mar  1 07:59:08 squeezeplay: INFO   audio.decode - Playback.lua:448 7.9%/15.3%
  Mar  1 07:59:09 squeezeplay: INFO   audio.decode - Playback.lua:448 
12.6%/16.6%
  Mar  1 07:59:10 squeezeplay: INFO   audio.decode - Playback.lua:448 
12.5%/21.5%
  Mar  1 07:59:11 squeezeplay: INFO   audio.decode - Playback.lua:448 
10.5%/26.4%
  Mar  1 07:59:13 squeezeplay: INFO   audio.decode - Playback.lua:448 8.5%/32.0%
  Mar  1 07:59:14 squeezeplay: INFO   audio.decode - Playback.lua:448 6.5%/36.9%
  Mar  1 07:59:15 squeezeplay: INFO   audio.decode - Playback.lua:448 4.6%/41.4%
  Mar  1 07:59:16 squeezeplay: INFO   audio.decode - Playback.lua:448 
11.1%/41.0%
  Mar  1 07:59:17 squeezeplay: INFO   audio.decode - Playback.lua:448 9.5%/45.2%
  Mar  1 07:59:18 squeezeplay: INFO   audio.decode - Playback.lua:448 7.7%/49.4%
  Mar  1 07:59:19 squeezeplay: INFO   audio.decode - Playback.lua:448 5.9%/54.1%
  Mar  1 07:59:20 squeezeplay: INFO   audio.decode - Playback.lua:448 3.9%/58.7%
  Mar  1 07:59:21 squeezeplay: INFO   audio.decode - Playback.lua:448 2.0%/63.1%
  Mar  1 07:59:22 squeezeplay: INFO   audio.decode - Playback.lua:448 8.5%/62.7%
  Mar  1 07:59:23 squeezeplay: INFO   audio.decode - Playback.lua:448 6.9%/67.9%
  Mar  1 07:59:24 squeezeplay: INFO   audio.decode - Playback.lua:448 4.8%/73.2%
  Mar  1 07:59:25 squeezeplay: INFO   audio.decode - Playback.lua:448 3.0%/77.6%
  Mar  1 07:59:26 squeezeplay: INFO   audio.decode - Playback.lua:448 1.2%/81.6%
  Mar  1 07:59:27 squeezeplay: INFO   audio.decode - Playback.lua:448 0.0%/80.7%
  Mar  1 07:59:28 squeezeplay: INFO   audio.decode - Playback.lua:448 5.7%/72.2%
  Mar  1 07:59:30 squeezeplay: INFO   audio.decode - Playback.lua:448 6.0%/76.6%
  Mar  1 07:59:31 squeezeplay: INFO   audio.decode - Playback.lua:448 3.9%/81.4%
  Mar  1 07:59:32 squeezeplay: INFO   audio.decode - Playback.lua:448 2.1%/85.8%
  Mar  1 07:59:33 squeezeplay: INFO   audio.decode - Playback.lua:448 0.0%/91.1%
  Mar  1 07:59:34 squeezeplay: INFO   audio.decode - Playback.lua:448 0.0%/79.6%
  Mar  1 07:59:34 dropbear[8653]: Child connection from 172.16.0.70:39826
  Mar  1 07:59:35 squeezeplay: INFO   audio.decode - Playback.lua:448 7.6%/73.7%
  Mar  1 07:59:36 squeezeplay: INFO   audio.decode - Playback.lua:448 6.1%/73.9%
  Mar  1 07:59:37 squeezeplay: INFO   audio.decode - Playback.lua:448 4.3%/77.4%
  Mar  1 07:59:38 dropbear[8653]: Password auth succeeded for 'root' from 
172.16.0.70:39826
  
--------------------


So actually, for the non-live audio on demand radio streams,  I can
actually eliminate the buffer underruns by throttling the amount of data
available to the radio.  Which is all a bit counter intuitive!  So I'm
not sure I want to do that in a release version.

As you eluded to earlier in the thread,  it looks like the
outputThreshold setting is probably the right one which (from what I
understand from your comments) delays the playback until a threshold is
reached in the decoded output buffer.  But I don't believe I can set
that in the protocol handler?



EXPECTINGTOFLY PLUGINS :
    
- *BBC Sounds* : 
  https://github.com/expectingtofly/LMS_BBC_Sounds_Plugin 
- *BBC Sounds Wiki* :
  https://github.com/expectingtofly/LMS_BBC_Sounds_Plugin/wiki
- *Virgin Radio (UK)* : 
  https://github.com/expectingtofly/LMS_Virgin_Radio_Plugin 
- *Times Radio* : 
  https://github.com/expectingtofly/LMS_TIMES_RADIO_PLUGIN
------------------------------------------------------------------------
expectingtofly's Profile: http://forums.slimdevices.com/member.php?userid=63263
View this thread: http://forums.slimdevices.com/showthread.php?t=113479

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to