MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / SDL_BufferQueueFillCallback

Function SDL_BufferQueueFillCallback

deps/SDL2/src/audio/SDL_audio.c:581–595  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

579}
580
581static void SDLCALL
582SDL_BufferQueueFillCallback(void *userdata, Uint8 *stream, int len)
583{
584 /* this function always holds the mixer lock before being called. */
585 SDL_AudioDevice *device = (SDL_AudioDevice *) userdata;
586
587 SDL_assert(device != NULL); /* this shouldn't ever happen, right?! */
588 SDL_assert(device->iscapture); /* this shouldn't ever happen, right?! */
589 SDL_assert(len >= 0); /* this shouldn't ever happen, right?! */
590
591 /* note that if this needs to allocate more space and run out of memory,
592 we have no choice but to quietly drop the data and hope it works out
593 later, but you probably have bigger problems in this case anyhow. */
594 SDL_WriteToDataQueue(device->buffer_queue, stream, len);
595}
596
597int
598SDL_QueueAudio(SDL_AudioDeviceID devid, const void *data, Uint32 len)

Callers

nothing calls this directly

Calls 1

SDL_WriteToDataQueueFunction · 0.85

Tested by

no test coverage detected