Chore: remove readrate limiting
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Sat, 25 Jan 2025 16:05:20 +0000 (17:05 +0100)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Sat, 25 Jan 2025 16:05:20 +0000 (17:05 +0100)
Remove the readrate limiter so players can buffer ahead what they want, otherwise things like crossfade may not work well. We can bring this back later as an optional toggle if we want.

Downside of disabling the readrate limiter is that when you want to schedule a next track to play in the queue, the player may already have buffered ahead.

music_assistant/controllers/streams.py

index 9641b545d7a871ce87c24d7050986b532ef6fe79..190f64953d72c37f0dd4a44e2656d30451dd716e 100644 (file)
@@ -346,8 +346,6 @@ class StreamsController(CoreController):
             input_format=pcm_format,
             output_format=output_format,
             filter_params=get_player_filter_params(self.mass, queue_player.player_id, pcm_format),
-            # we don't allow the player to buffer too much ahead so we use readrate limiting
-            extra_input_args=["-readrate", "1.1", "-readrate_initial_burst", "10"],
         ):
             try:
                 await resp.write(chunk)
@@ -445,8 +443,6 @@ class StreamsController(CoreController):
                 self.mass, queue_player.player_id, flow_pcm_format
             ),
             chunk_size=icy_meta_interval if enable_icy else None,
-            # we don't allow the player to buffer too much ahead so we use readrate limiting
-            extra_input_args=["-readrate", "1.1", "-readrate_initial_burst", "10"],
         ):
             try:
                 await resp.write(chunk)