Skip to content

Commit 43aa042

Browse files
Reapply #1548 (#1582)
1 parent cc5d177 commit 43aa042

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
@@ -263,13 +263,8 @@ int I2S::available() {
263263
} else {
264264
auto avail = _arb->available();
265265
avail *= 4; // 4 samples per 32-bits
266-
if (_bps < 24) {
267-
if (_isOutput) {
268-
// 16- and 8-bit can have holding bytes available
269-
avail += (32 - _isHolding) / 8;
270-
} else {
271-
avail += _isHolding / 8;
272-
}
266+
if (_bps < 24 && !_isOutput) {
267+
avail += _isHolding / 8;
273268
}
274269
return avail;
275270
}

0 commit comments

Comments
 (0)