8000 I2S: Don't consider _isHolding when it's an output (#1548) · OndineBio/arduino-pico@0e57979 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0e57979

Browse files
authored
I2S: Don't consider _isHolding when it's an output (earlephilhower#1548)
1 parent 20cabe8 commit 0e57979

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

libraries/I2S/src/I2S.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -204,13 +204,8 @@ int I2S::available() {
204204
} else {
205205
auto avail = _arb->available();
206206
avail *= 4; // 4 samples per 32-bits
207-
if (_bps < 24) {
208-
if (_isOutput) {
209-
// 16- and 8-bit can have holding bytes available
210-
avail += (32 - _isHolding) / 8;
211-
} else {
212-
avail += _isHolding / 8;
213-
}
207+
if (_bps < 24 && !_isOutput) {
208+
avail += _isHolding / 8;
214209
}
215210
return avail;
216211
}

0 commit comments

Comments
 (0)
0