Skip to content

Commit 673e3bb

Browse files
committed
Limit Android I/O maximum buffersize
1 parent d8bbdbb commit 673e3bb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Superpowered/OpenSource/SuperpoweredAndroidAudioIO.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,7 @@ static void SuperpoweredAndroidAudioIO_OutputCallback(SLAndroidSimpleBufferQueue
420420

421421
SuperpoweredAndroidAudioIO::SuperpoweredAndroidAudioIO(int samplerate, int buffersize, bool enableInput, bool enableOutput, audioProcessingCallback callback, void *clientdata, int inputStreamType, int outputStreamType) {
422422
static const SLboolean requireds[2] = { SL_BOOLEAN_TRUE, SL_BOOLEAN_FALSE };
423+
if (buffersize > 1024) buffersize = 1024;
423424

424425
internals = new SuperpoweredAndroidAudioIOInternals;
425426
memset(internals, 0, sizeof(SuperpoweredAndroidAudioIOInternals));

0 commit comments

Comments
 (0)