projects
/
music-assistant-server.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e15d160
)
decrease buffer for radio playback (#300)
author
Marcel van der Veldt
<m.vanderveldt@outlook.com>
Mon, 9 May 2022 22:49:40 +0000
(
00:49
+0200)
committer
GitHub
<noreply@github.com>
Mon, 9 May 2022 22:49:40 +0000
(
00:49
+0200)
music_assistant/controllers/stream.py
patch
|
blob
|
history
diff --git
a/music_assistant/controllers/stream.py
b/music_assistant/controllers/stream.py
index 32cce3a29dcf22d772d67f98343c53ac779156ca..b38a0815be1460bb18d308cc6a57554e241fac22 100644
(file)
--- a/
music_assistant/controllers/stream.py
+++ b/
music_assistant/controllers/stream.py
@@
-462,6
+462,10
@@
class StreamController:
sample_size = int(sample_rate * (bit_depth / 8) * channels) # 1 second
buffer_size = sample_size * (queue.settings.crossfade_duration or 2)
+ # force small buffer for radio to prevent too much lag at start
+ if queue_track.media_type == MediaType.RADIO:
+ use_crossfade = False
+ buffer_size = sample_size
self.logger.debug(
"Start Streaming queue track: %s (%s) for queue %s",