Fix sample rate for forced crossfade streams (#284)
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Sat, 7 May 2022 18:46:08 +0000 (20:46 +0200)
committerGitHub <noreply@github.com>
Sat, 7 May 2022 18:46:08 +0000 (20:46 +0200)
music_assistant/controllers/stream.py

index 0fd791d02d1f3dc6316e4fed0679fbd6b44dd77b..b4ba59de277858dc1f989c521ca4e5df14a8441b 100644 (file)
@@ -160,9 +160,9 @@ class StreamController:
                 # task that sends the raw pcm audio to the sox/ffmpeg process
                 async for audio_chunk in self._get_queue_stream(
                     queue,
-                    sample_rate=start_streamdetails.sample_rate,
-                    bit_depth=start_streamdetails.bit_depth,
-                    channels=start_streamdetails.channels,
+                    sample_rate=sample_rate,
+                    bit_depth=bit_depth,
+                    channels=channels,
                     resample=resample,
                 ):
                     if sox_proc.closed:
@@ -322,9 +322,9 @@ class StreamController:
                     """Task that sends the raw pcm audio to the sox/ffmpeg process."""
                     async for audio_chunk in self._get_queue_stream(
                         queue,
-                        sample_rate=start_streamdetails.sample_rate,
-                        bit_depth=start_streamdetails.bit_depth,
-                        channels=start_streamdetails.channels,
+                        sample_rate=sample_rate,
+                        bit_depth=bit_depth,
+                        channels=channels,
                         resample=resample,
                     ):
                         if sox_proc.closed: