Android/openslES: set number of buffers of DATALOCATOR to internal NUM_BUFFER
authorSylvain Becker <sylvain.becker@gmail.com>
Tue, 05 Feb 2019 15:09:41 +0100
changeset 12597b5ea5997cbf9
parent 12596 6654faf2160e
child 12598 d3acc7299a95
Android/openslES: set number of buffers of DATALOCATOR to internal NUM_BUFFER
If we increase NUM_BUFFER, Enqueue won't fail with SL_RESULT_BUFFER_INSUFFICIENT
src/audio/openslES/SDL_openslES.c
     1.1 --- a/src/audio/openslES/SDL_openslES.c	Tue Feb 05 15:05:32 2019 +0100
     1.2 +++ b/src/audio/openslES/SDL_openslES.c	Tue Feb 05 15:09:41 2019 +0100
     1.3 @@ -272,8 +272,7 @@
     1.4            this->spec.channels, (test_format & 0x1000) ? "BE" : "LE", this->spec.samples);
     1.5  
     1.6      /* configure audio source */
     1.7 -    SLDataLocator_AndroidSimpleBufferQueue loc_bufq = { SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE, 2 };
     1.8 -    /* SLDataLocator_AndroidSimpleBufferQueue loc_bufq = { SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE, OPENSLES_BUFFERS }; */
     1.9 +    SLDataLocator_AndroidSimpleBufferQueue loc_bufq = { SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE, NUM_BUFFERS };
    1.10  
    1.11      format_pcm.formatType    = SL_DATAFORMAT_PCM;
    1.12      format_pcm.numChannels   = this->spec.channels;