Skip to content

Commit b05770a

Browse files
committed
sync write checks correct available size
1 parent d3757a8 commit b05770a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

modules/io/audioout/esp32/audioout-esp32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ void xs_audioout_writeSync_(xsMachine *the)
441441

442442
xsmcGetBufferReadable(xsArg(0), &buffer, &requested);
443443

444-
if (requested > audioOut->bytesWritable)
444+
if (requested > (audioOut->bytesWritable - audioOut->stagingOffset))
445445
xsUnknownError("insufficient space");
446446

447447
if (requested & 1) //@@ broken for stereo & 8 bit

0 commit comments

Comments
 (0)