src/audio/openslES/SDL_openslES.c
changeset 12596 6654faf2160e
parent 12545 599ebb123f0a
child 12597 b5ea5997cbf9
equal deleted inserted replaced
12595:4ecb6ce33406 12596:6654faf2160e
   547 {
   547 {
   548     struct SDL_PrivateAudioData *audiodata = (struct SDL_PrivateAudioData *) this->hidden;
   548     struct SDL_PrivateAudioData *audiodata = (struct SDL_PrivateAudioData *) this->hidden;
   549     SLresult result;
   549     SLresult result;
   550 
   550 
   551     LOGI("======openslES_PlayDevice( )======");
   551     LOGI("======openslES_PlayDevice( )======");
       
   552 
   552     /* Queue it up */
   553     /* Queue it up */
   553 
       
   554     result = (*bqPlayerBufferQueue)->Enqueue(bqPlayerBufferQueue, audiodata->pmixbuff[audiodata->next_buffer], this->spec.size);
   554     result = (*bqPlayerBufferQueue)->Enqueue(bqPlayerBufferQueue, audiodata->pmixbuff[audiodata->next_buffer], this->spec.size);
   555     if (SL_RESULT_SUCCESS != result) {
       
   556         /* just puk here */
       
   557         /* next ! */
       
   558     }
       
   559 
   555 
   560     audiodata->next_buffer++;
   556     audiodata->next_buffer++;
   561     if (audiodata->next_buffer >= NUM_BUFFERS) {
   557     if (audiodata->next_buffer >= NUM_BUFFERS) {
   562         audiodata->next_buffer = 0;
   558         audiodata->next_buffer = 0;
       
   559     }
       
   560 
       
   561     /* If Enqueue fails, callback won't be called.
       
   562      * Post the semphore, not to run out of buffer */
       
   563     if (SL_RESULT_SUCCESS != result) {
       
   564         SDL_SemPost(audiodata->playsem);
   563     }
   565     }
   564 
   566 
   565     return;
   567     return;
   566 }
   568 }
   567 
   569