SDL_AudioSpec.3
资源名称:NETVIDEO.rar [点击查看]
上传用户:sun1608
上传日期:2007-02-02
资源大小:6116k
文件大小:3k
源码类别:
流媒体/Mpeg4/MP4
开发平台:
Visual C++
- .TH "SDL_AudioSpec" "3" "Tue 11 Sep 2001, 22:58" "SDL" "SDL API Reference"
- .SH "NAME"
- SDL_AudioSpec- Audio Specification Structure
- .SH "STRUCTURE DEFINITION"
- .PP
- .nf
- f(CWtypedef 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;fR
- .fi
- .PP
- .SH "STRUCTURE DATA"
- .TP 20
- fBfreqfR
- Audio frequency in samples per second
- .TP 20
- fBformatfR
- Audio data format
- .TP 20
- fBchannelsfR
- Number of channels: 1 mono, 2 stereo
- .TP 20
- fBsilencefR
- Audio buffer silence value (calculated)
- .TP 20
- fBsamplesfR
- Audio buffer size in samples
- .TP 20
- fBsizefR
- Audio buffer size in bytes (calculated)
- .TP 20
- fBcallback(&.&.)fR
- Callback function for filling the audio buffer
- .TP 20
- fBuserdatafR
- Pointer the user data which is passed to the callback function
- .SH "DESCRIPTION"
- .PP
- The fBSDL_AudioSpecfR structure is used to describe the format of some audio data&. This structure is used by fIfBSDL_OpenAudiofPfR and fIfBSDL_LoadWAVfPfR&. While all fields are used by fBSDL_OpenAudiofP only fBfreqfR, fBformatfR, fBsamplesfR and fBchannelsfR are used by fBSDL_LoadWAVfP&. We will detail these common members here&.
- .TP 20
- fBfreqfR
- The number of samples sent to the sound device every second&. Common values are 11025, 22050 and 44100&. The higher the better&.
- .TP 20
- fBformatfR
- Specifies the size and type of each sample element
- .IP "fBAUDIO_U8fP" 10Unsigned 8-bit samples
- .IP "fBAUDIO_S8fP" 10Signed 8-bit samples
- .IP "fBAUDIO_U16fP or fBAUDIO_U16LSBfP" 10Unsigned 16-bit little-endian samples
- .IP "fBAUDIO_S16fP or fBAUDIO_S16LSBfP" 10Signed 16-bit little-endian samples
- .IP "fBAUDIO_U16MSBfP" 10Unsigned 16-bit big-endian samples
- .IP "fBAUDIO_S16MSBfP" 10Signed 16-bit big-endian samples
- .IP "fBAUDIO_U16SYSfP" 10Either fBAUDIO_U16LSBfP or fBAUDIO_U16MSBfP depending on you systems endianness
- .IP "fBAUDIO_S16SYSfP" 10Either fBAUDIO_S16LSBfP or fBAUDIO_S16MSBfP depending on you systems endianness
- .TP 20
- fBchannelsfR
- The number of seperate sound channels&. 1 is mono (single channel), 2 is stereo (dual channel)&.
- .TP 20
- fBsamplesfR
- When used with fIfBSDL_OpenAudiofPfR this refers to the size of the audio buffer in samples&. A sample a chunk of audio data of the size specified in fBformatfR mulitplied by the number of channels&. When the fBSDL_AudioSpecfR is used with fIfBSDL_LoadWAVfPfR fBsamplesfR is set to 4096&.
- .SH "SEE ALSO"
- .PP
- fIfBSDL_OpenAudiofPfR, fIfBSDL_LoadWAVfPfR
- ..." created by instant / docbook-to-man, Tue 11 Sep 2001, 22:58