From 1c7ef1e05c9379316cf311b53a7c26658346616c Mon Sep 17 00:00:00 2001 From: xufuji456 <839789740@qq.com> Date: Mon, 21 Jun 2021 23:49:47 +0800 Subject: [PATCH] rename global variable --- app/src/main/cpp/openSL_audio_player.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/cpp/openSL_audio_player.cpp b/app/src/main/cpp/openSL_audio_player.cpp index cf97784..4080337 100644 --- a/app/src/main/cpp/openSL_audio_player.cpp +++ b/app/src/main/cpp/openSL_audio_player.cpp @@ -41,7 +41,7 @@ SLVolumeItf bqPlayerVolume; //audio effect const SLEnvironmentalReverbSettings reverbSettings = SL_I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR; -void *buffer; +void *openBuffer; size_t bufferSize; uint8_t *outputBuffer; size_t outputBufferSize; @@ -63,10 +63,10 @@ int getPCM(void **pcm, size_t *pcmSize); //callback by player void bqPlayerCallback(SLAndroidSimpleBufferQueueItf bufferQueueItf, void *context) { bufferSize = 0; - getPCM(&buffer, &bufferSize); - if (NULL != buffer && 0 != bufferSize) { + getPCM(&openBuffer, &bufferSize); + if (NULL != openBuffer && 0 != bufferSize) { SLresult result; - result = (*bqPlayerBufferQueue)->Enqueue(bqPlayerBufferQueue, buffer, bufferSize); + result = (*bqPlayerBufferQueue)->Enqueue(bqPlayerBufferQueue, openBuffer, bufferSize); if (result < 0) { LOGE(TAG, "Enqueue error..."); } else {