dsdreamer wrote:
> So when I play some high resolution FLAC files at 96kHz, or some others
> at 192kHz they always start up in this garbled mode, with the feedback
> format set to 17.15 instead of 16.16. It is still true that switching
> off the player (e.g., pressing capital Q on the controlling Jive
> instance) and then pressing play always fixes the sound.
The following small patch fixes the above issue for me.
Code:
--------------------
[fedora@wandquad squeezelite]$ git diff output_alsa.c
diff --git a/output_alsa.c b/output_alsa.c
index f033928..7d810a1 100644
--- a/output_alsa.c
+++ b/output_alsa.c
@@ -510,7 +510,7 @@ static void *output_thread(void *arg) {
continue;
}
- if (avail < alsa.period_size) {
+ //if (avail < alsa.period_size) {
if (start) {
if (alsa.mmap && ((err = snd_pcm_start(pcmp)) < 0)) {
if ((err = snd_pcm_recover(pcmp, err, 1)) < 0) {
@@ -536,7 +536,7 @@ static void *output_thread(void *arg) {
}
avail = snd_pcm_avail_update(pcmp);
}
- }
+ // }
// restrict avail in writei mode as write_buf is restricted to period_size
if (!alsa.mmap) {
--------------------
The first time this thread executes after a change in sampling rate,
avail is 4x greater than alsa.period_size, and hence none of the code
inside that big if statement gets called. The above patch comments out
the if statement entirely. This one simple change allows me to play
music at all sample rates supported by the DAC, whereas without it I get
garbled sound at all rates except that which squeezelite starts at
(44.1kHz normally).
----------------------
"Dreamer, easy in the chair that really fits you..."
------------------------------------------------------------------------
dsdreamer's Profile: http://forums.slimdevices.com/member.php?userid=12588
View this thread: http://forums.slimdevices.com/showthread.php?t=99395
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix