Penguin
Diff: SDL_OpenAudio(3)
EditPageHistoryDiffInfoLikePages

Differences between current version and predecessor to the previous major change of SDL_OpenAudio(3).

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 3 Last edited on Tuesday, December 23, 2003 10:29:50 am by OneTimeUser
Older page: version 1 Last edited on Monday, June 3, 2002 6:53:46 pm by perry Revert
@@ -1,6 +1,6 @@
-SDL_OpenAudio  
-!!!SDL_OpenAudio 
+SDL_! OpenAudio  
+!!!SDL_! OpenAudio 
 NAME 
 SYNOPSIS 
 DESCRIPTION 
 EXAMPLES 
@@ -8,17 +8,17 @@
 ---- 
 !!NAME 
  
  
-SDL_OpenAudio- Opens the audio device with the desired parameters. 
+SDL_! OpenAudio- Opens the audio device with the desired parameters. 
 !!SYNOPSIS 
  
  
 __#include __ 
  
  
-__int SDL_OpenAudio__(__SDL_AudioSpec *desired,  
-SDL_AudioSpec *obtained__); 
+__int SDL_! OpenAudio__(__SDL_! AudioSpec *desired,  
+SDL_! AudioSpec *obtained__); 
 !!DESCRIPTION 
  
  
 This function opens the audio device with the __desired__ 
@@ -31,16 +31,16 @@
 returns -1 if it failed to open the audio device, or 
 couldn't set up the audio thread. 
  
  
-To open the audio device a __desired SDL_AudioSpec__ must 
+To open the audio device a __desired SDL_! AudioSpec__ must 
 be created. 
  
  
-SDL_AudioSpec *desired; 
+SDL_! AudioSpec *desired; 
 
 
-desired=(SDL_AudioSpec *)malloc(sizeof(SDL_AudioSpec)); 
+desired=(SDL_! AudioSpec *)malloc(sizeof(SDL_! AudioSpec)); 
 You must then fill this structure with your desired audio specifications. 
  
  
 __desired__-__freq__ 
@@ -55,33 +55,33 @@
 __desired__-__callback__ 
  
  
 void callback(void *userdata, Uint8 *stream, int len); 
-__userdata__ is the pointer stored in __userdata__ field of the __SDL_AudioSpec__. __stream__ is a pointer to the audio buffer you want to fill with information and __len__ is the length of the audio buffer in bytes. 
+__userdata__ is the pointer stored in __userdata__ field of the __SDL_! AudioSpec__. __stream__ is a pointer to the audio buffer you want to fill with information and __len__ is the length of the audio buffer in bytes. 
  
  
 __desired__-__userdata__ 
  
  
-__SDL_OpenAudio__ reads these fields from the __desired  
-SDL_AudioSpec__ structure pass to the function and 
+__SDL_! OpenAudio__ reads these fields from the __desired  
+SDL_! AudioSpec__ structure pass 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 
+SDL_! AudioSpec__ is your working specification, otherwise  
+the __obtained SDL_! AudioSpec__ becomes the working 
 specification and the __desirec__ 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_OpenAudio__ calculates the __size__ and 
+__SDL_! OpenAudio__ 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 
@@ -89,29 +89,29 @@
  
  
 The audio device starts out playing __silence__ when it's 
 opened, and should be enabled for playing by calling 
-__SDL_PauseAudio__''(''____) when you are ready 
+__SDL_! PauseAudio__''(''____) 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. 
 !!EXAMPLES 
  
  
-/* Prototype of our callback function */  
-void my_audio_callback(void *userdata, Uint8 *stream, int len);  
-/* Open the audio device */  
-SDL_AudioSpec *desired, *obtained;  
-SDL_AudioSpec *hardware_spec;  
-/* Allocate a desired SDL_AudioSpec */  
-desired=(SDL_AudioSpec *)malloc(sizeof(SDL_AudioSpec));  
-/* Allocate space for the obtained SDL_AudioSpec */  
-obtained=(SDL_AudioSpec *)malloc(sizeof(SDL_AudioSpec));  
-/* 22050Hz - FM Radio quality */  
-desired- 
+ /* Prototype of our callback function */  
+ void my_audio_callback(void *userdata, Uint8 *stream, int len);  
+ /* Open the audio device */  
+ SDL_! AudioSpec *desired, *obtained;  
+ SDL_! AudioSpec *hardware_spec;  
+ /* Allocate a desired SDL_! AudioSpec */  
+ desired=(SDL_! AudioSpec *)malloc(sizeof(SDL_! AudioSpec));  
+ /* Allocate space for the obtained SDL_! AudioSpec */  
+ obtained=(SDL_! AudioSpec *)malloc(sizeof(SDL_! AudioSpec));  
+ /* 22050Hz - FM Radio quality */  
+ desired- 
 !!SEE ALSO 
  
  
-__SDL_AudioSpec__, __SDL_LockAudio__,  
-__SDL_UnlockAudio__, __SDL_PauseAudio__ 
+__SDL_! AudioSpec__, __SDL_! LockAudio__,  
+__SDL_! UnlockAudio__, __SDL_! PauseAudio__ 
 ---- 
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.