Differences between current version and predecessor to the previous major change of SDL_ConvertAudio(3).
Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 2 | Last edited on Monday, June 3, 2002 6:53:41 pm | by perry | |
Older page: | version 1 | Last edited on Monday, June 3, 2002 6:53:41 pm | by perry | Revert |
@@ -1,6 +1,6 @@
-SDL_ConvertAudio
-!!!SDL_ConvertAudio
+SDL_!
ConvertAudio
+!!!SDL_!
ConvertAudio
NAME
SYNOPSIS
DESCRIPTION
EXAMPLES
@@ -8,21 +8,21 @@
----
!!NAME
-SDL_ConvertAudio- Convert audio data to a desired audio format.
+SDL_!
ConvertAudio- Convert audio data to a desired audio format.
!!SYNOPSIS
__#include __
-__int SDL_ConvertAudio__(__SDL_AudioCVT
+__int SDL_!
ConvertAudio__(__SDL_AudioCVT
*cvt__);
!!DESCRIPTION
-__SDL_ConvertAudio__ takes one parameter, __cvt__,
+__SDL_!
ConvertAudio__ takes one parameter, __cvt__,
which was previously initilized. Initilizing a
__SDL_AudioCVT__ is a two step process. First of all, the
structure must be passed to __SDL_BuildAudioCVT__ along
with source and destination format parameters. Secondly, the
@@ -34,11 +34,11 @@
__len__*__len_mult__ bytes in length.
Once the __SDL_AudioCVT__structure is initilized then we
-can pass it to __SDL_ConvertAudio__, which will convert
+can pass it to __SDL_!
ConvertAudio__, which will convert
the audio data pointer to by __cvt__-__buf__. If
-__SDL_ConvertAudio__ returned ____ then the
+__SDL_!
ConvertAudio__ returned ____ then the
conversion was completed successfully, otherwise __-1__
is returned.
@@ -51,20 +51,20 @@
/* Converting some WAV data to hardware format */
void my_audio_callback(void *userdata, Uint8 *stream, int len);
-SDL_AudioSpec *desired, *obtained;
-SDL_AudioSpec wav_spec;
+SDL_!
AudioSpec *desired, *obtained;
+SDL_!
AudioSpec wav_spec;
SDL_AudioCVT wav_cvt;
Uint32 wav_len;
Uint8 *wav_buf;
int ret;
/* Allocated audio specs */
-desired=(SDL_AudioSpec *)malloc(sizeof(SDL_AudioSpec));
-obtained=(SDL_AudioSpec *)malloc(sizeof(SDL_AudioSpec));
+desired=(SDL_!
AudioSpec *)malloc(sizeof(SDL_!
AudioSpec));
+obtained=(SDL_!
AudioSpec *)malloc(sizeof(SDL_!
AudioSpec));
/* Set desired format */
desired-
!!SEE ALSO
__SDL_BuildAudioCVT__, __SDL_AudioCVT__
----