Skip to content

Commit b51ad7d

Browse files
Fix volume shift
1 parent bd3c139 commit b51ad7d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

internal_filesystem/lib/mpos/audio/stream_wav.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,9 +594,9 @@ def play(self):
594594
raw[i] = 0
595595
elif shift > 0:
596596
try:
597-
self._i2s.shift(buf=raw, bits=16, shift=shift)
597+
self._i2s.shift(buf=raw, bits=16, shift=-shift)
598598
except Exception as e:
599-
#print(f"_i2s.shift got exception, falling back to software scaling: {e}")
599+
print(f"_i2s.shift got exception, falling back to software scaling: {e}")
600600
_scale_audio_optimized(raw, len(raw), scale_fixed)
601601
else:
602602
#print("_i2s has no shift attribute, falling back to software scaling")

0 commit comments

Comments
 (0)