Lines Matching refs:audiodata
190 struct SDL_PrivateAudioData *audiodata = (struct SDL_PrivateAudioData *) context; in bqRecorderCallback() local
193 SDL_SemPost(audiodata->playsem); in bqRecorderCallback()
199 struct SDL_PrivateAudioData *audiodata = this->hidden; in openslES_DestroyPCMRecorder() local
218 if (audiodata->playsem) { in openslES_DestroyPCMRecorder()
219 SDL_DestroySemaphore(audiodata->playsem); in openslES_DestroyPCMRecorder()
220 audiodata->playsem = NULL; in openslES_DestroyPCMRecorder()
223 if (audiodata->mixbuff) { in openslES_DestroyPCMRecorder()
224 SDL_free(audiodata->mixbuff); in openslES_DestroyPCMRecorder()
231 struct SDL_PrivateAudioData *audiodata = this->hidden; in openslES_CreatePCMRecorder() local
315 audiodata->playsem = SDL_CreateSemaphore(0); in openslES_CreatePCMRecorder()
316 if (!audiodata->playsem) { in openslES_CreatePCMRecorder()
322 audiodata->mixbuff = (Uint8 *) SDL_malloc(NUM_BUFFERS * this->spec.size); in openslES_CreatePCMRecorder()
323 if (audiodata->mixbuff == NULL) { in openslES_CreatePCMRecorder()
329 audiodata->pmixbuff[i] = audiodata->mixbuff + i * this->spec.size; in openslES_CreatePCMRecorder()
341 …result = (*recorderBufferQueue)->Enqueue(recorderBufferQueue, audiodata->pmixbuff[i], this->spec.s… in openslES_CreatePCMRecorder()
368 struct SDL_PrivateAudioData *audiodata = (struct SDL_PrivateAudioData *) context; in bqPlayerCallback() local
371 SDL_SemPost(audiodata->playsem); in bqPlayerCallback()
377 struct SDL_PrivateAudioData *audiodata = this->hidden; in openslES_DestroyPCMPlayer() local
398 if (audiodata->playsem) { in openslES_DestroyPCMPlayer()
399 SDL_DestroySemaphore(audiodata->playsem); in openslES_DestroyPCMPlayer()
400 audiodata->playsem = NULL; in openslES_DestroyPCMPlayer()
403 if (audiodata->mixbuff) { in openslES_DestroyPCMPlayer()
404 SDL_free(audiodata->mixbuff); in openslES_DestroyPCMPlayer()
411 struct SDL_PrivateAudioData *audiodata = this->hidden; in openslES_CreatePCMPlayer() local
557 audiodata->playsem = SDL_CreateSemaphore(NUM_BUFFERS - 1); in openslES_CreatePCMPlayer()
558 if (!audiodata->playsem) { in openslES_CreatePCMPlayer()
564 audiodata->mixbuff = (Uint8 *) SDL_malloc(NUM_BUFFERS * this->spec.size); in openslES_CreatePCMPlayer()
565 if (audiodata->mixbuff == NULL) { in openslES_CreatePCMPlayer()
571 audiodata->pmixbuff[i] = audiodata->mixbuff + i * this->spec.size; in openslES_CreatePCMPlayer()
610 struct SDL_PrivateAudioData *audiodata = this->hidden; in openslES_WaitDevice() local
615 SDL_SemWait(audiodata->playsem); in openslES_WaitDevice()
621 struct SDL_PrivateAudioData *audiodata = this->hidden; in openslES_PlayDevice() local
627 …result = (*bqPlayerBufferQueue)->Enqueue(bqPlayerBufferQueue, audiodata->pmixbuff[audiodata->next_… in openslES_PlayDevice()
629 audiodata->next_buffer++; in openslES_PlayDevice()
630 if (audiodata->next_buffer >= NUM_BUFFERS) { in openslES_PlayDevice()
631 audiodata->next_buffer = 0; in openslES_PlayDevice()
637 SDL_SemPost(audiodata->playsem); in openslES_PlayDevice()
656 struct SDL_PrivateAudioData *audiodata = this->hidden; in openslES_GetDeviceBuf() local
659 return audiodata->pmixbuff[audiodata->next_buffer]; in openslES_GetDeviceBuf()
665 struct SDL_PrivateAudioData *audiodata = this->hidden; in openslES_CaptureFromDevice() local
669 SDL_SemWait(audiodata->playsem); in openslES_CaptureFromDevice()
673 SDL_memcpy(buffer, audiodata->pmixbuff[audiodata->next_buffer], this->spec.size); in openslES_CaptureFromDevice()
676 …result = (*recorderBufferQueue)->Enqueue(recorderBufferQueue, audiodata->pmixbuff[audiodata->next_… in openslES_CaptureFromDevice()
682 audiodata->next_buffer++; in openslES_CaptureFromDevice()
683 if (audiodata->next_buffer >= NUM_BUFFERS) { in openslES_CaptureFromDevice()
684 audiodata->next_buffer = 0; in openslES_CaptureFromDevice()