To Complete the analysis, I've added a setting to BBC Sounds that an
interval can be set between fetching audio chunks, effectively making a
throttle to the amount of data that can be made available to the radio.
Here is a log where I have specified at least 1 second occurs before the
next 6 second chunk of audio is fetched from the BBC (on Audio-on-demand
content).
It solves the problem as the radio has time to decode, rather than
filling up the input buffer. No underrun occurs. Effectively,
prioritising decoding over input buffering.
Code:
--------------------
Mar 1 10:06:49 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 10:06:49 squeezeplay: DEBUG audio.decode - Playback.lua:194
source=stream
Mar 1 10:06:49 squeezeplay: DEBUG audio.decode - stream_connectL:506
streambuf connect 172.16.0.8:9000
Mar 1 10:06:49 squeezeplay: DEBUG audio.decode - Playback.lua:1262 stopping
local pause timer
Mar 1 10:06:49 squeezeplay: DEBUG audio.decode - Playback.lua:1192 gainL,
gainR: 658 658
Mar 1 10:06:50 squeezeplay: DEBUG audio.decode - Playback.lua:397 resume
decoder, 32768 bytes buffered, decode threshold 2048
Mar 1 10:06:50 squeezeplay: DEBUG audio.decode - decode_resume_decoder:580
decode_resume_decoder
Mar 1 10:06:50 squeezeplay: DEBUG audio.decode -
decode_resume_decoder_handler:122 resume_decoder decode state: 1 audio state 0
Mar 1 10:06:51 squeezeplay: DEBUG audio.decode - debug_fullness:112
fullness: 32768 / 0 | 1.04% / 0.00%
Mar 1 10:06:51 squeezeplay: DEBUG audio.decode - decode_output_samples:280
first buffer sample_rate=48000
Mar 1 10:06:51 squeezeplay: INFO audio.decode - Playback.lua:448 0.1%/1.4%
Mar 1 10:06:51 squeezeplay: DEBUG audio.decode - Playback.lua:424 resume
audio bytesReceivedL=139920 outputTime=490 threshold=122880
Mar 1 10:06:51 squeezeplay: DEBUG audio.decode - decode_resume_audio:601
decode_resume_audio start_jiffies=0
Mar 1 10:06:51 squeezeplay: DEBUG audio.decode -
decode_resume_audio_handler:133 decode_resume_audio_handler start_jiffies=0
Mar 1 10:06:51 squeezeplay: DEBUG audio.decode - debug_fullness:112
fullness: 150384 / 196608 | 4.78% / 5.57%
Mar 1 10:06:51 squeezeplay: DEBUG audio.decode -
decode_resume_audio_handler:146 resume_audio decode state: 1 audio state 40
Mar 1 10:06:51 squeezeplay: DEBUG audio.decode - Playback.lua:381 status
TRACK STARTED (elapsed: 159)
Mar 1 10:06:52 squeezeplay: INFO audio.decode - Playback.lua:448 12.9%/7.7%
Mar 1 10:06:53 squeezeplay: INFO audio.decode - Playback.lua:448 25.6%/6.5%
Mar 1 10:06:55 squeezeplay: INFO audio.decode - Playback.lua:448 34.7%/6.2%
Mar 1 10:06:56 squeezeplay: INFO audio.decode - Playback.lua:448 41.9%/7.4%
Mar 1 10:06:57 squeezeplay: INFO audio.decode - Playback.lua:448 52.7%/6.6%
Mar 1 10:06:57 squeezeplay: WARN net.thread - NetworkThread.lua:146
network thread timeout for Task(SocketHttpQueue {piCorePlayer2}(R))
Mar 1 10:06:58 squeezeplay: INFO audio.decode - Playback.lua:448 61.4%/6.8%
Mar 1 10:06:59 squeezeplay: INFO audio.decode - Playback.lua:448
69.7%/12.2%
Mar 1 10:07:00 squeezeplay: INFO audio.decode - Playback.lua:448
82.5%/10.6%
Mar 1 10:07:01 squeezeplay: INFO audio.decode - Playback.lua:448
89.1%/11.7%
Mar 1 10:07:02 squeezeplay: INFO audio.decode - Playback.lua:448
98.5%/12.9%
Mar 1 10:07:03 squeezeplay: INFO audio.decode - Playback.lua:448
99.9%/15.8%
Mar 1 10:07:03 squeezeplay: WARN net.thread - NetworkThread.lua:146
network thread timeout for Task(SocketHttp {baby.squeezenetwork.com}(R))
Mar 1 10:07:04 squeezeplay: INFO audio.decode - Playback.lua:448
99.3%/21.6%
Mar 1 10:07:05 squeezeplay: INFO audio.decode - Playback.lua:448
100.0%/25.6%
Mar 1 10:07:06 squeezeplay: INFO audio.decode - Playback.lua:448
99.7%/30.2%
Mar 1 10:07:07 squeezeplay: INFO audio.decode - Playback.lua:448
99.7%/34.6%
Mar 1 10:07:08 squeezeplay: INFO audio.decode - Playback.lua:448
99.9%/39.3%
Mar 1 10:07:10 squeezeplay: INFO audio.decode - Playback.lua:448
99.9%/44.0%
Mar 1 10:07:11 squeezeplay: INFO audio.decode - Playback.lua:448
99.9%/47.7%
Mar 1 10:07:12 squeezeplay: INFO audio.decode - Playback.lua:448
99.9%/51.2%
Mar 1 10:07:13 squeezeplay: INFO audio.decode - Playback.lua:448
99.7%/55.6%
Mar 1 10:07:14 squeezeplay: INFO audio.decode - Playback.lua:448
99.9%/59.8%
Mar 1 10:07:15 squeezeplay: INFO audio.decode - Playback.lua:448
99.7%/63.9%
Mar 1 10:07:16 squeezeplay: INFO audio.decode - Playback.lua:448
99.7%/68.4%
Mar 1 10:07:17 squeezeplay: INFO audio.decode - Playback.lua:448
99.7%/72.6%
Mar 1 10:07:18 squeezeplay: INFO audio.decode - Playback.lua:448
99.7%/77.3%
Mar 1 10:07:19 squeezeplay: INFO audio.decode - Playback.lua:448
99.7%/81.6%
Mar 1 10:07:20 squeezeplay: INFO audio.decode - Playback.lua:448
99.6%/85.7%
Mar 1 10:07:22 squeezeplay: INFO audio.decode - Playback.lua:448
99.7%/86.6%
--------------------
Actually, I'm probably happy to release like this, with a default of 1
second interval throttling, you could probably argue that does have
benefits server side.
Obviously, this is very BBC Sounds specific. What's your thoughts?
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