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 //audio effect
const SLEnvironmentalReverbSettings reverbSettings = SL_I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR; const SLEnvironmentalReverbSettings reverbSettings = SL_I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR;
void *buffer; void *openBuffer;
size_t bufferSize; size_t bufferSize;
uint8_t *outputBuffer; uint8_t *outputBuffer;
size_t outputBufferSize; size_t outputBufferSize;
@ -63,10 +63,10 @@ int getPCM(void **pcm, size_t *pcmSize);
//callback by player //callback by player
void bqPlayerCallback(SLAndroidSimpleBufferQueueItf bufferQueueItf, void *context) { void bqPlayerCallback(SLAndroidSimpleBufferQueueItf bufferQueueItf, void *context) {
bufferSize = 0; bufferSize = 0;
getPCM(&buffer, &bufferSize); getPCM(&openBuffer, &bufferSize);
if (NULL != buffer && 0 != bufferSize) { if (NULL != openBuffer && 0 != bufferSize) {
SLresult result; SLresult result;
result = (*bqPlayerBufferQueue)->Enqueue(bqPlayerBufferQueue, buffer, bufferSize); result = (*bqPlayerBufferQueue)->Enqueue(bqPlayerBufferQueue, openBuffer, bufferSize);
if (result < 0) { if (result < 0) {
LOGE(TAG, "Enqueue error..."); LOGE(TAG, "Enqueue error...");
} else { } else {

Loading…
Cancel
Save