loopwave.c File Reference
`#include "SDL_config.h"`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include "SDL.h"`
Include dependency graph for loopwave.c:

Go to the source code of this file.

## Functions

static void | quit (int rc)
static void | close_audio ()
static void | open_audio ()
static void | reopen_audio ()
void | fillerup (void *unused, Uint8 *stream, int len)
int | main (int argc, char *argv[])

## Variables

struct {
SDL_AudioSpec spec
Uint8 * sound
Uint32 soundlen
int soundpos
} | wave
static SDL_AudioDeviceID | device
static int | done = 0

## Function Documentation

## close_audio()

static void close_audio | ( |  | ) |

static

Definition at line 48 of file loopwave.c.

{
if (device != 0) {
SDL_CloseAudioDevice(device);
device = 0;
}
}

References device, and SDL_CloseAudioDevice.

Referenced by main(), and reopen_audio().

## fillerup()

void fillerup | ( | void * | unused,
|  | Uint8 * | stream,
|  | int | len
| ) |  |

Definition at line 80 of file loopwave.c.

{
Uint8 *waveptr;
int waveleft;
/* Set up the pointers */
waveptr = wave.sound + wave.soundpos;
waveleft = wave.soundlen - wave.soundpos;
/* Go! */
while (waveleft <= len) {
SDL_memcpy(stream, waveptr, waveleft);
stream += waveleft;
len -= waveleft;
waveptr = wave.sound;
waveleft = wave.soundlen;
wave.soundpos = 0;
}
SDL_memcpy(stream, waveptr, len);
wave.soundpos += len;
}

References SDL_memcpy, and wave.

Referenced by main().

## main()

int main | ( | int | argc,
|  | char * | argv[]
| ) |  |

Definition at line 114 of file loopwave.c.

{
int i;
char filename[4096];
/* Enable standard application logging */
SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Load the SDL library */
if (SDL_Init(SDL_INIT_AUDIO|SDL_INIT_EVENTS) < 0) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError());
return (1);
}
if (argc > 1) {
SDL_strlcpy(filename, argv[1], sizeof(filename));
} else {
SDL_strlcpy(filename, "sample.wav", sizeof(filename));
}
/* Load the wave file into memory */
if (SDL_LoadWAV(filename, &wave.spec, &wave.sound, &wave.soundlen) == NULL) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s\n", filename, SDL_GetError());
quit(1);
}
wave.spec.callback = fillerup;
/* Show the list of available drivers */
SDL_Log("Available audio drivers:");
for (i = 0; i < SDL_GetNumAudioDrivers(); ++i) {
SDL_Log("%i: %s", i, SDL_GetAudioDriver(i));
}
SDL_Log("Using audio driver: %s\n", SDL_GetCurrentAudioDriver());
open_audio();
SDL_FlushEvents(SDL_AUDIODEVICEADDED, SDL_AUDIODEVICEREMOVED);
#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(loop, 0, 1);
#else
while (!done) {
SDL_Event event;
while (SDL_PollEvent(&event) > 0) {
if (event.type == SDL_QUIT) {
done = 1;
}
if ((event.type == SDL_AUDIODEVICEADDED && !event.adevice.iscapture) ||
(event.type == SDL_AUDIODEVICEREMOVED && !event.adevice.iscapture && event.adevice.which == device)) {
reopen_audio();
}
}
SDL_Delay(100);
}
#endif
/* Clean up on signal */
close_audio();
SDL_FreeWAV(wave.sound);
SDL_Quit();
return (0);
}

References close_audio(), device, done, sort_controllers::filename, fillerup(), i, loop(), NULL, open_audio(), quit(), reopen_audio(), SDL_AUDIODEVICEADDED, SDL_AUDIODEVICEREMOVED, SDL_Delay, SDL_FlushEvents, SDL_FreeWAV, SDL_GetAudioDriver, SDL_GetCurrentAudioDriver, SDL_GetError, SDL_GetNumAudioDrivers, SDL_Init, SDL_INIT_AUDIO, SDL_INIT_EVENTS, SDL_LoadWAV, SDL_Log, SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, SDL_LogError, SDL_LogSetPriority, SDL_PollEvent, SDL_Quit, SDL_QUIT, SDL_strlcpy, and wave.

## open_audio()

static void open_audio | ( |  | ) |

static

Definition at line 57 of file loopwave.c.

{
/* Initialize fillerup() variables */
device = SDL_OpenAudioDevice(NULL, SDL_FALSE, &wave.spec, NULL, 0);
if (!device) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't open audio: %s\n", SDL_GetError());
SDL_FreeWAV(wave.sound);
quit(2);
}
/* Let the audio run */
SDL_PauseAudioDevice(device, SDL_FALSE);
}

References device, NULL, quit(), SDL_FALSE, SDL_FreeWAV, SDL_GetError, SDL_LOG_CATEGORY_APPLICATION, SDL_LogError, SDL_OpenAudioDevice, SDL_PauseAudioDevice, and wave.

Referenced by main(), and reopen_audio().

## quit()

static void quit | ( | int | rc | ) |

static

Definition at line 41 of file loopwave.c.

{
SDL_Quit();
exit(rc);
}

References SDL_Quit.

Referenced by main(), and open_audio().

## reopen_audio()

static void reopen_audio | ( |  | ) |

static

Definition at line 72 of file loopwave.c.

{
close_audio();
open_audio();
}

References close_audio(), and open_audio().

Referenced by main().

## Variable Documentation

## device

SDL_AudioDeviceID device

static

Definition at line 37 of file loopwave.c.

Referenced by audio_lockUnlockOpenAudioDevice(), audio_openCloseAndGetAudioStatus(), audio_openCloseAudioDeviceConnected(), close_audio(), close_audio_device(), createDevice(), VULKAN_HPP_NAMESPACE::PhysicalDevice::createDevice(), VULKAN_HPP_NAMESPACE::PhysicalDevice::createDeviceUnique(), deleteDevice(), VULKAN_HPP_NAMESPACE::DispatchLoaderDynamic::DispatchLoaderDynamic(), GetDeviceForIndex(), VULKAN_HPP_NAMESPACE::DispatchLoaderDynamic::init(), IOS_AddJoystickDevice(), IOS_AddMFIJoystickDevice(), IOS_JoystickClose(), IOS_JoystickGetDeviceGUID(), IOS_JoystickGetDeviceInstanceID(), IOS_JoystickGetDeviceName(), IOS_JoystickGetDevicePlayerIndex(), IOS_JoystickOpen(), IOS_JoystickUpdate(), IOS_RemoveJoystickDevice(), is_in_audio_device_thread(), main(), open_audio(), open_audio_device(), SDL_AudioLockDevice_Default(), SDL_AudioUnlockDevice_Default(), SDL_BufferQueueDrainCallback(), SDL_BufferQueueFillCallback(), SDL_CaptureAudio(), SDL_ClearQueuedAudio(), SDL_DequeueAudio(), SDL_GetAudioDeviceStatus(), SDL_GetQueuedAudioSize(), SDL_LockAudioDevice(), SDL_MixAudio(), SDL_OpenAudioDevice(), SDL_OpenedAudioDeviceDisconnected(), SDL_PauseAudioDevice(), SDL_QueueAudio(), SDL_RemoveAudioDevice(), SDL_RunAudio(), SDL_UnlockAudioDevice(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkAcquireNextImage2KHR(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkAcquireNextImageKHR(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkAllocateCommandBuffers(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkAllocateDescriptorSets(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkAllocateMemory(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkBindAccelerationStructureMemoryNV(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkBindBufferMemory(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkBindBufferMemory2(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkBindBufferMemory2KHR(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkBindImageMemory(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkBindImageMemory2(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkBindImageMemory2KHR(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCompileDeferredNV(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateAccelerationStructureNV(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateBuffer(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateBufferView(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateCommandPool(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateComputePipelines(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateDescriptorPool(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateDescriptorSetLayout(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateDescriptorUpdateTemplate(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateDescriptorUpdateTemplateKHR(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateEvent(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateFence(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateFramebuffer(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateGraphicsPipelines(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateImage(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateImageView(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateIndirectCommandsLayoutNVX(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateObjectTableNVX(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreatePipelineCache(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreatePipelineLayout(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateQueryPool(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateRayTracingPipelinesNV(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateRenderPass(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateRenderPass2KHR(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateSampler(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateSamplerYcbcrConversion(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateSamplerYcbcrConversionKHR(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateSemaphore(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateShaderModule(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateSharedSwapchainsKHR(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateSwapchainKHR(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkCreateValidationCacheEXT(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDebugMarkerSetObjectNameEXT(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDebugMarkerSetObjectTagEXT(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDestroyAccelerationStructureNV(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDestroyBuffer(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDestroyBufferView(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDestroyCommandPool(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDestroyDescriptorPool(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDestroyDescriptorSetLayout(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDestroyDescriptorUpdateTemplate(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDestroyDescriptorUpdateTemplateKHR(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDestroyDevice(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDestroyEvent(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDestroyFence(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDestroyFramebuffer(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDestroyImage(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDestroyImageView(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDestroyIndirectCommandsLayoutNVX(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDestroyObjectTableNVX(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDestroyPipeline(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDestroyPipelineCache(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDestroyPipelineLayout(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDestroyQueryPool(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDestroyRenderPass(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDestroySampler(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDestroySamplerYcbcrConversion(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDestroySamplerYcbcrConversionKHR(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDestroySemaphore(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDestroyShaderModule(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDestroySwapchainKHR(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDestroyValidationCacheEXT(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDeviceWaitIdle(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkDisplayPowerControlEXT(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkFlushMappedMemoryRanges(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkFreeCommandBuffers(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkFreeDescriptorSets(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkFreeMemory(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetAccelerationStructureHandleNV(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetAccelerationStructureMemoryRequirementsNV(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetBufferMemoryRequirements(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetBufferMemoryRequirements2(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetBufferMemoryRequirements2KHR(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetCalibratedTimestampsEXT(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetDescriptorSetLayoutSupport(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetDescriptorSetLayoutSupportKHR(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetDeviceGroupPeerMemoryFeatures(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetDeviceGroupPeerMemoryFeaturesKHR(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetDeviceGroupPresentCapabilitiesKHR(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetDeviceGroupSurfacePresentModesKHR(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetDeviceMemoryCommitment(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetDeviceProcAddr(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetDeviceQueue(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetDeviceQueue2(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetEventStatus(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetFenceFdKHR(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetFenceStatus(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetImageDrmFormatModifierPropertiesEXT(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetImageMemoryRequirements(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetImageMemoryRequirements2(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetImageMemoryRequirements2KHR(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetImageSparseMemoryRequirements(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetImageSparseMemoryRequirements2(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetImageSparseMemoryRequirements2KHR(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetImageSubresourceLayout(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetMemoryFdKHR(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetMemoryFdPropertiesKHR(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetMemoryHostPointerPropertiesEXT(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetPastPresentationTimingGOOGLE(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetPipelineCacheData(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetQueryPoolResults(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetRayTracingShaderGroupHandlesNV(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetRefreshCycleDurationGOOGLE(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetRenderAreaGranularity(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetSemaphoreFdKHR(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetShaderInfoAMD(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetSwapchainCounterEXT(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetSwapchainImagesKHR(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetSwapchainStatusKHR(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkGetValidationCacheDataEXT(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkImportFenceFdKHR(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkImportSemaphoreFdKHR(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkInvalidateMappedMemoryRanges(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkMapMemory(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkMergePipelineCaches(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkMergeValidationCachesEXT(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkRegisterDeviceEventEXT(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkRegisterDisplayEventEXT(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkRegisterObjectsNVX(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkResetCommandPool(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkResetDescriptorPool(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkResetEvent(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkResetFences(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkSetDebugUtilsObjectNameEXT(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkSetDebugUtilsObjectTagEXT(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkSetEvent(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkSetHdrMetadataEXT(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkTrimCommandPool(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkTrimCommandPoolKHR(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkUnmapMemory(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkUnregisterObjectsNVX(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkUpdateDescriptorSets(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkUpdateDescriptorSetWithTemplate(), VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkUpdateDescriptorSetWithTemplateKHR(), and VULKAN_HPP_NAMESPACE::DispatchLoaderStatic::vkWaitForFences().

## done

int done = 0

static

Definition at line 102 of file loopwave.c.

Referenced by main().

## sound

Uint8* sound

Definition at line 32 of file loopwave.c.

## soundlen

Uint32 soundlen

Definition at line 33 of file loopwave.c.

## soundpos

int soundpos

Definition at line 34 of file loopwave.c.

## spec

SDL_AudioSpec spec

Definition at line 31 of file loopwave.c.

Referenced by DUMMYAUDIO_CaptureFromDevice(), main(), SDL_CalculateAudioSpec(), SDL_LoadWAV_RW(), and WaveLoad().

## wave

struct { ... } wave

Referenced by fillerup(), main(), and open_audio().

SDL_CloseAudioDevice
#define SDL_CloseAudioDevice
Definition: SDL_dynapi_overrides.h:97
sort_controllers.filename
string filename
Definition: sort_controllers.py:8
SDL_GetError
#define SDL_GetError
Definition: SDL_dynapi_overrides.h:113
wave
static struct @285 wave
SDL_PauseAudioDevice
#define SDL_PauseAudioDevice
Definition: SDL_dynapi_overrides.h:85
SDL_strlcpy
#define SDL_strlcpy
Definition: SDL_dynapi_overrides.h:394
SDL_PollEvent
#define SDL_PollEvent
Definition: SDL_dynapi_overrides.h:122
SDL_LOG_CATEGORY_APPLICATION
@ SDL_LOG_CATEGORY_APPLICATION
Definition: SDL_log.h:66
NULL
#define NULL
Definition: begin_code.h:167
SDL_OpenAudioDevice
#define SDL_OpenAudioDevice
Definition: SDL_dynapi_overrides.h:81
SDL_INIT_EVENTS
#define SDL_INIT_EVENTS
Definition: SDL.h:83
done
static int done
Definition: loopwave.c:102
stream
GLuint GLuint stream
Definition: SDL_opengl_glext.h:1776
fillerup
void fillerup(void *unused, Uint8 *stream, int len)
Definition: loopwave.c:80
SDL_AUDIODEVICEADDED
@ SDL_AUDIODEVICEADDED
Definition: SDL_events.h:147
SDL_FreeWAV
#define SDL_FreeWAV
Definition: SDL_dynapi_overrides.h:87
SDL_LogError
#define SDL_LogError
Definition: SDL_dynapi_overrides.h:36
len
GLenum GLsizei len
Definition: SDL_opengl_glext.h:2926
SDL_memcpy
#define SDL_memcpy
Definition: SDL_dynapi_overrides.h:387
event
struct _cl_event * event
Definition: SDL_opengl_glext.h:2649
SDL_FALSE
@ SDL_FALSE
Definition: SDL_stdinc.h:163
loop
void loop()
Definition: checkkeys.c:152
open_audio
static void open_audio()
Definition: loopwave.c:57
SDL_Log
#define SDL_Log
Definition: SDL_dynapi_overrides.h:31
reopen_audio
static void reopen_audio()
Definition: loopwave.c:72
SDL_QUIT
@ SDL_QUIT
Definition: SDL_events.h:60
SDL_LoadWAV
#define SDL_LoadWAV(file, spec, audio_buf, audio_len)
Definition: SDL_audio.h:484
SDL_Quit
#define SDL_Quit
Definition: SDL_dynapi_overrides.h:58
SDL_FlushEvents
#define SDL_FlushEvents
Definition: SDL_dynapi_overrides.h:121
SDL_Delay
#define SDL_Delay
Definition: SDL_dynapi_overrides.h:486
SDL_GetAudioDriver
#define SDL_GetAudioDriver
Definition: SDL_dynapi_overrides.h:74
SDL_GetCurrentAudioDriver
#define SDL_GetCurrentAudioDriver
Definition: SDL_dynapi_overrides.h:77
SDL_LOG_PRIORITY_INFO
@ SDL_LOG_PRIORITY_INFO
Definition: SDL_log.h:106
SDL_LogSetPriority
#define SDL_LogSetPriority
Definition: SDL_dynapi_overrides.h:236
quit
static void quit(int rc)
Definition: loopwave.c:41
SDL_Event
General event structure.
Definition: SDL_events.h:557
SDL_AUDIODEVICEREMOVED
@ SDL_AUDIODEVICEREMOVED
Definition: SDL_events.h:148
SDL_Init
#define SDL_Init
Definition: SDL_dynapi_overrides.h:54
close_audio
static void close_audio()
Definition: loopwave.c:48
device
static SDL_AudioDeviceID device
Definition: loopwave.c:37
i
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
Definition: SDL_x11sym.h:50
SDL_GetNumAudioDrivers
#define SDL_GetNumAudioDrivers
Definition: SDL_dynapi_overrides.h:73
SDL_INIT_AUDIO
#define SDL_INIT_AUDIO
Definition: SDL.h:78
Uint8
uint8_t Uint8
Definition: SDL_stdinc.h:179