M4A = "m4a"
M4B = "m4b"
DSF = "dsf"
+ OPUS = "opus"
WAVPACK = "wv"
PCM_S16LE = "s16le" # PCM signed 16-bit little-endian
PCM_S24LE = "s24le" # PCM signed 24-bit little-endian
idx += 1
if next_item is None:
raise QueueEmpty("No more (playable) tracks left in the queue.")
- queue.index_in_buffer = next_index
queue.next_track_enqueued = True
return next_item
self.logger.debug(
"Start serving audio stream for QueueItem %s to %s", queue_item.uri, queue.display_name
)
-
+ queue.index_in_buffer = self.mass.player_queues.index_by_id(queue_item_id)
# collect player specific ffmpeg args to re-encode the source PCM stream
pcm_format = AudioFormat(
content_type=ContentType.from_bit_depth(
seek_position: int = 0,
fade_in: bool = False,
) -> AsyncGenerator[bytes, None]:
- """Get a flow stream of all tracks in the queue."""
+ """Get a flow stream of all tracks in the queue as raw PCM audio."""
# ruff: noqa: PLR0915
assert pcm_format.content_type.is_pcm()
queue_track = None
queue_track.name,
queue.display_name,
)
+ queue.index_in_buffer = self.mass.player_queues.index_by_id(queue_track.queue_item_id)
# set some basic vars
pcm_sample_size = int(pcm_format.sample_rate * (pcm_format.bit_depth / 8) * 2)
),
)
-TRACK_EXTENSIONS = ("mp3", "m4a", "m4b", "mp4", "flac", "wav", "ogg", "aiff", "wma", "dsf")
+TRACK_EXTENSIONS = ("mp3", "m4a", "m4b", "mp4", "flac", "wav", "ogg", "aiff", "wma", "dsf", "opus")
PLAYLIST_EXTENSIONS = ("m3u", "pls", "m3u8")
SUPPORTED_EXTENSIONS = TRACK_EXTENSIONS + PLAYLIST_EXTENSIONS
IMAGE_EXTENSIONS = ("jpg", "jpeg", "JPG", "JPEG", "png", "PNG", "gif", "GIF")