From b2a65ee5842c6807e07cc5c1cb33140f2b6d190e Mon Sep 17 00:00:00 2001 From: Federico Chiaravalli Date: Tue, 14 May 2019 18:11:23 +0200 Subject: [PATCH] Fixed wrong buffer queue in android opensl Fixed typo in comment --- miniaudio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miniaudio.h b/miniaudio.h index 3d7a23a9..c1f74d4a 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -395,7 +395,7 @@ OPTIONS MA_LOG_LEVEL_WARNING MA_LOG_LEVEL_ERROR -#define MA_DEBUT_OUTPUT +#define MA_DEBUG_OUTPUT Enable printf() debug output. #define MA_COINIT_VALUE @@ -22583,7 +22583,7 @@ ma_result ma_device_start__opensl(ma_device* pDevice) periodSizeInBytes = (pDevice->capture.internalBufferSizeInFrames / pDevice->capture.internalPeriods) * ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels); for (iPeriod = 0; iPeriod < pDevice->capture.internalPeriods; ++iPeriod) { - resultSL = MA_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueuePlayback)->Enqueue((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueueCapture, pDevice->opensl.pBufferCapture + (periodSizeInBytes * iPeriod), periodSizeInBytes); + resultSL = MA_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueueCapture)->Enqueue((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueueCapture, pDevice->opensl.pBufferCapture + (periodSizeInBytes * iPeriod), periodSizeInBytes); if (resultSL != SL_RESULT_SUCCESS) { MA_OPENSL_RECORD(pDevice->opensl.pAudioRecorder)->SetRecordState((SLRecordItf)pDevice->opensl.pAudioRecorder, SL_RECORDSTATE_STOPPED); return ma_post_error(pDevice, MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to enqueue buffer for capture device.", MA_FAILED_TO_START_BACKEND_DEVICE);