Skip to content

Commit fa19d11

Browse files
BREAKING: PWMAudio availableForWrite report bytes (#3090)
availableForWrite should always report bytes free, but PWMAudio was returning number of ARB words (i.e. 1/4 the actual space).
1 parent e6f7833 commit fa19d11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/PWMAudio/src/PWMAudio.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ int PWMAudio::availableForWrite() {
219219
if (!_running) {
220220
return 0;
221221
}
222-
return _arb->available();
222+
return _arb->available() * 4; // ARB reports in 32b words
223223
}
224224

225225
size_t PWMAudio::write(int16_t val, bool sync) {

0 commit comments

Comments
 (0)