SDL_AudioSpec Struct Reference

#include <SDL_audio.h>


Public Member Functions

 void (SDLCALL *callback)(void *userdata

Data Fields

int freq
Uint16 format
Uint8 channels
Uint8 silence
Uint16 samples
Uint16 padding
Uint32 size
Uint8 * stream
Uint8 int len
void * userdata


Detailed Description

When filling in the desired audio spec structure,

Note:
The calculated values in this structure are calculated by SDL_OpenAudio()

Member Function Documentation

void ( SDLCALL *  callback  ) 

This function is called when the audio device needs more data.

Parameters:
[out] stream A pointer to the audio data buffer
[in] len The length of the audio buffer in bytes.
Once the callback returns, the buffer will no longer be valid. Stereo samples are stored in a LRLRLR ordering.


Field Documentation

Uint8 channels

Number of channels: 1 mono, 2 stereo

Uint16 format

Audio data format

int freq

DSP frequency -- samples per second

Uint16 padding

Necessary for some compile environments

Uint16 samples

Audio buffer size in samples (power of 2)

Uint8 silence

Audio buffer silence value (calculated)

Uint32 size

Audio buffer size in bytes (calculated)


The documentation for this struct was generated from the following file:

Generated on Mon Sep 21 21:29:50 2009 for Simple DirectMedia Layer by  doxygen 1.5.8