rename global variable

pull/190/head
xufuji456 3 years ago
parent eaf59a17e6
commit 1c7ef1e05c
  1. 8
      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 {

Loading…
Cancel
Save