You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running into strange behavior running librespot-org/librespot#660 on the Rodio backend and Alsa host. On the current cpal master, output is opened four times. Last time is with incorrect parameters causing incorrect playback.
Regardless of the --format setting librespot is launched with (F32 or S16):
First time opening is with FloatLE, 44100 Hz and 2 channels (as expected).
Second time is FloatLE, 4294967295 Hz and 2 channels.
Third time is FloatLE, 44100 Hz and 2 channels.
Fourth time is FloatLE, 4000 Hz and 2 channels.
This behavior is triggered by lines 194-201 in stream.rs of Rodio:
self.new_output_stream_with_format(default_format).unwrap_or_else(|err| {// look through all supported formats to see if another workssupported_output_formats(self).filter_map(|format| self.new_output_stream_with_format(format).ok()).next().ok_or(err).expect("build_output_stream failed with all supported formats")
The first three iterations trigger the unwrap_or_else closure because cpal fails to prepare the Alsa stream. This line fails:
I am stumped why this fails. This is Alsa on a Raspberry Pi 3 Model B+, running 32-bit Raspian 10 (Linux 5.10.17-v7+) over I2S to an external DAC. aplay --dump-hw-params gives:
Indeed this is reflected as SupportedStreamConfig. Using the native Alsa backend in librespot works just fine for all formats F32, S32, S24, S24_3 and S16 so the Alsa soundcard itself is working fine.
Applying #520 by @alexmoon fixes one issue, being that the output is now opened once and correctly, but introduces another issue: after opening, no sound is played and the librespot player thread hangs when writing.
Again I've been banging my head trying to get this down for several nights of debugging now. Any suggestions?
The text was updated successfully, but these errors were encountered:
I'm running into strange behavior running librespot-org/librespot#660 on the Rodio backend and Alsa host. On the current cpal
master
, output is opened four times. Last time is with incorrect parameters causing incorrect playback.Regardless of the
--format
settinglibrespot
is launched with (F32 or S16):First time opening is with
FloatLE
, 44100 Hz and 2 channels (as expected).Second time is
FloatLE
, 4294967295 Hz and 2 channels.Third time is
FloatLE
, 44100 Hz and 2 channels.Fourth time is
FloatLE
, 4000 Hz and 2 channels.This behavior is triggered by lines 194-201 in
stream.rs
of Rodio:The first three iterations trigger the
unwrap_or_else
closure because cpal fails to prepare the Alsa stream. This line fails:cpal/src/host/alsa/mod.rs
Line 260 in fbc0f71
I am stumped why this fails. This is Alsa on a Raspberry Pi 3 Model B+, running 32-bit Raspian 10 (Linux 5.10.17-v7+) over I2S to an external DAC.
aplay --dump-hw-params
gives:Indeed this is reflected as
SupportedStreamConfig
. Using the native Alsa backend inlibrespot
works just fine for all formats F32, S32, S24, S24_3 and S16 so the Alsa soundcard itself is working fine.Applying #520 by @alexmoon fixes one issue, being that the output is now opened once and correctly, but introduces another issue: after opening, no sound is played and the
librespot
player thread hangs when writing.Again I've been banging my head trying to get this down for several nights of debugging now. Any suggestions?
The text was updated successfully, but these errors were encountered: