X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pages%2FSDL-Audio.html-inc;h=1b87ea2636de8e02648026b7a7193ac399a9108a;hb=55bbf7a209993f4172fd7e6555dda0947b844089;hp=96c2266e66426d4f2038021e6ad25d697f5e052d;hpb=0d76f1af1aacc92532799566647c800c76e73778;p=sdlgit%2FSDL-Site.git diff --git a/pages/SDL-Audio.html-inc b/pages/SDL-Audio.html-inc index 96c2266..1b87ea2 100644 --- a/pages/SDL-Audio.html-inc +++ b/pages/SDL-Audio.html-inc @@ -23,12 +23,12 @@

NAME

Top

-

SDL::Audio -- SDL Bindings for Audio

+

SDL::Audio - SDL Bindings for Audio

CATEGORY

Top

-

TODO, Core, Audio

+

Core, Audio

METHODS

Top

@@ -64,7 +64,7 @@ -
The desired audio format. See SDL::AudioSpec
+
The desired audio format. See SDL::AudioSpec
    $desired->format
 
@@ -100,7 +100,7 @@
 	

SDL::Audio::open reads these fields from the desired SDL::AudioSpec structure passed to the function and attempts to find an audio configuration matching your desired. As mentioned above, if the obtained parameter is NULL then SDL with convert from your desired audio settings to the hardware settings as it plays.

-

If obtained is NULL then the desired SDL::AudioSpec is your working specification, otherwise the obtained SDL::AudioSpec becomes the working specification and the desired specification can be deleted. The data in the working specification is used when building SDL::AudioCVT's for converting loaded data to the hardware format.

+

If obtained is NULL then the desired SDL::AudioSpec is your working specification, otherwise the obtained SDL::AudioSpec becomes the working specification and the desired specification can be deleted. The data in the working specification is used when building SDL::AudioCVT's for converting loaded data to the hardware format.

SDL::Audio::open calculates the size and silence fields for both the $desired and $obtained specifications. The size field stores the total size of the audio buffer in bytes, while the silence stores the value used to represent silence in the audio buffer

The audio device starts out playing silence when it's opened, and should be enabled for playing by calling SDL::Audio::pause(0) when you are ready for your audio callback function to be called. Since the audio driver may modify the requested size of the audio buffer, you should allocate any local mixing buffers after you open the audio device.