Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
SDL_AudioSpec(3)
Edit
PageHistory
Diff
Info
LikePages
SDL_!AudioSpec !!!SDL_!AudioSpec NAME STRUCTURE DEFINITION STRUCTURE DATA DESCRIPTION SEE ALSO ---- !!NAME SDL_!AudioSpec- Audio Specification Structure !!STRUCTURE DEFINITION typedef struct{ int freq; Uint16 format; Uint8 channels; Uint8 silence; Uint16 samples; Uint32 size; void (*callback)(void *userdata, Uint8 *stream, int len); void *userdata; } SDL_!AudioSpec; !!STRUCTURE DATA __freq__ Audio frequency in samples per second __format__ Audio data format __channels__ Number of channels: 1 mono, 2 stereo __silence__ Audio buffer silence value (calculated) __samples__ Audio buffer size in samples __size__ Audio buffer size in bytes (calculated) __callback(..)__ Callback function for filling the audio buffer __userdata__ Pointer the user data which is passed to the callback function !!DESCRIPTION The __SDL_!AudioSpec__ structure is used to describe the format of some audio data. This structure is used by __SDL_!OpenAudio__ and __SDL_LoadWAV__. While all fields are used by __SDL_!OpenAudio__ only __freq__, __format__, __samples__ and __channels__ are used by __SDL_LoadWAV__. We will detail these common members here. __freq__ The number of samples sent to the sound device every second. Common values are 11025, 22050 and 44100. The higher the better. __format__ Specifies the size and type of each sample element __AUDIO_U8__ __AUDIO_S8__ __AUDIO_U16__ or __AUDIO_U16LSB__ __AUDIO_S16__ or __AUDIO_S16LSB__ __AUDIO_U16MSB__ __AUDIO_S16MSB__ __AUDIO_U16SYS__ __AUDIO_S16SYS__ __channels__ The number of seperate sound channels. 1 is mono (single channel), 2 is stereo (dual channel). __samples__ When used with __SDL_!OpenAudio__ this refers to the size of the audio buffer in samples. A sample a chunk of audio data of the size specified in __format__ mulitplied by the number of channels. When the __SDL_!AudioSpec__ is used with __SDL_LoadWAV samples__ is set to 4096. !!SEE ALSO __SDL_!OpenAudio__, __SDL_LoadWAV__ ----
One page links to
SDL_AudioSpec(3)
:
SDLManPages
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.