SDL_AudioCVT.3
资源名称:NETVIDEO.rar [点击查看]
上传用户:sun1608
上传日期:2007-02-02
资源大小:6116k
文件大小:3k
源码类别:
流媒体/Mpeg4/MP4
开发平台:
Visual C++
- .TH "SDL_AudioCVT" "3" "Tue 11 Sep 2001, 22:58" "SDL" "SDL API Reference"
- .SH "NAME"
- SDL_AudioCVT- Audio Conversion Structure
- .SH "STRUCTURE DEFINITION"
- .PP
- .nf
- f(CWtypedef struct{
- int needed;
- Uint16 src_format;
- Uint16 dest_format;
- double rate_incr;
- Uint8 *buf;
- int len;
- int len_cvt;
- int len_mult;
- double len_ratio;
- void (*filters[10])(struct SDL_AudioCVT *cvt, Uint16 format);
- int filter_index;
- } SDL_AudioCVT;fR
- .fi
- .PP
- .SH "STRUCTURE DATA"
- .TP 20
- fBneededfR
- Set to one if the conversion is possible
- .TP 20
- fBsrc_formatfR
- Audio format of the source
- .TP 20
- fBdest_formatfR
- Audio format of the destination
- .TP 20
- fBrate_incrfR
- Rate conversion increment
- .TP 20
- fBbuffR
- Audio buffer
- .TP 20
- fBlenfR
- Length of the original audio buffer in bytes
- .TP 20
- fBlen_cvtfR
- Length of converted audio buffer in bytes (calculated)
- .TP 20
- fBlen_multfR
- fBbuffR must be fBlenfR*fBlen_multfR bytes in size(calculated)
- .TP 20
- fBlen_ratiofR
- Final audio size is fBlenfR*fBlen_ratiofR
- .TP 20
- fBfilters[10](&.&.)fR
- Pointers to functions needed for this conversion
- .TP 20
- fBfilter_indexfR
- Current conversion function
- .SH "DESCRIPTION"
- .PP
- The fBSDL_AudioCVTfR is used to convert audio data between different formats&. A fBSDL_AudioCVTfR structure is created with the fIfBSDL_BuildAudioCVTfPfR function, while the actual conversion is done by the fIfBSDL_ConvertAudiofPfR function&.
- .PP
- Many of the fields in the fBSDL_AudioCVTfR structure should be considered private and their function will not be discussed here&.
- .IP "fBUint8 *fPfBbuffR" 10This points to the audio data that will be used in the conversion&. It is both the source and the destination, which means the converted audio data overwrites the original data&. It also means that the converted data may be larger than the original data (if you were converting from 8-bit to 16-bit, for instance), so you must ensure fBbuffR is large enough&. See below&.
- .IP "fBintfP fBlenfR" 10This is the length of the original audio data in bytes&.
- .IP "fBintfP fBlen_multfR" 10As explained above, the audio buffer needs to be big enough to store the converted data, which may be bigger than the original audio data&. The length of fBbuffR should be fBlenfR*fBlen_multfR&.
- .IP "fBdoublefP fBlen_ratiofR" 10When you have finished converting your audio data, you need to know how much of your audio buffer is valid&. fBlenfR*fBlen_ratiofR is the size of the converted audio data in bytes&. This is very similar to fBlen_multfR, however when the convert audio data is shorter than the original fBlen_multfR would be 1&. fBlen_ratiofR, on the other hand, would be a fractional number between 0 and 1&.
- .SH "SEE ALSO"
- .PP
- fIfBSDL_BuildAudioCVTfPfR, fIfBSDL_ConvertAudiofPfR, fIfBSDL_AudioSpecfRfR
- ..." created by instant / docbook-to-man, Tue 11 Sep 2001, 22:58