comparison include/SDL_audio.h @ 1967:01e29c3e9a29

In general, fill in pointers to structures, rather than return them.
author Sam Lantinga <slouken@libsdl.org>
date Sat, 05 Aug 2006 22:34:23 +0000
parents 071b6598d48f
children ee73925ddf14
comparison
equal deleted inserted replaced
1966:6472256c21eb 1967:01e29c3e9a29
235 /* 235 /*
236 * Get the human-readable name of a specific audio device. 236 * Get the human-readable name of a specific audio device.
237 * Must be a value between 0 and (number of audio devices-1). 237 * Must be a value between 0 and (number of audio devices-1).
238 * Only valid after a successfully initializing the audio subsystem. 238 * Only valid after a successfully initializing the audio subsystem.
239 */ 239 */
240 extern DECLSPEC const char *SDLCALL SDL_GetAudioDevice(int index, int iscapture); 240 extern DECLSPEC const char *SDLCALL SDL_GetAudioDevice(int index,
241 int iscapture);
241 242
242 243
243 /* 244 /*
244 * Open a specific audio device. Passing in a device name of NULL is 245 * Open a specific audio device. Passing in a device name of NULL is
245 * equivalent to SDL_OpenAudio(). Returns 0 on error, a valid device ID 246 * equivalent to SDL_OpenAudio(). Returns 0 on error, a valid device ID
246 * on success. 247 * on success.
247 */ 248 */
248 extern DECLSPEC SDL_AudioDeviceID SDLCALL SDL_OpenAudioDevice( 249 extern DECLSPEC SDL_AudioDeviceID SDLCALL SDL_OpenAudioDevice(const char
249 const char * device, 250 *device,
250 int iscapture, 251 int iscapture,
251 const SDL_AudioSpec * desired, 252 const
252 SDL_AudioSpec * obtained); 253 SDL_AudioSpec *
254 desired,
255 SDL_AudioSpec *
256 obtained);
253 257
254 258
255 259
256 /* 260 /*
257 * Get the current audio state: 261 * Get the current audio state:
262 SDL_AUDIO_PLAYING, 266 SDL_AUDIO_PLAYING,
263 SDL_AUDIO_PAUSED 267 SDL_AUDIO_PAUSED
264 } SDL_audiostatus; 268 } SDL_audiostatus;
265 extern DECLSPEC SDL_audiostatus SDLCALL SDL_GetAudioStatus(void); 269 extern DECLSPEC SDL_audiostatus SDLCALL SDL_GetAudioStatus(void);
266 270
267 extern DECLSPEC SDL_audiostatus SDLCALL SDL_GetAudioDeviceStatus( 271 extern DECLSPEC SDL_audiostatus SDLCALL
268 SDL_AudioDeviceID dev); 272 SDL_GetAudioDeviceStatus(SDL_AudioDeviceID dev);
269 273
270 /* 274 /*
271 * This function pauses and unpauses the audio callback processing. 275 * This function pauses and unpauses the audio callback processing.
272 * It should be called with a parameter of 0 after opening the audio 276 * It should be called with a parameter of 0 after opening the audio
273 * device to start playing sound. This is so you can safely initialize 277 * device to start playing sound. This is so you can safely initialize
350 /* 354 /*
351 * This works like SDL_MixAudio, but you specify the audio format instead of 355 * This works like SDL_MixAudio, but you specify the audio format instead of
352 * using the format of audio device 1. Thus it can be used when no audio 356 * using the format of audio device 1. Thus it can be used when no audio
353 * device is open at all. 357 * device is open at all.
354 */ 358 */
355 extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst, const Uint8 * src, 359 extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
360 const Uint8 * src,
356 SDL_AudioFormat format, 361 SDL_AudioFormat format,
357 Uint32 len, int volume); 362 Uint32 len, int volume);
358 363
359 /* 364 /*
360 * The lock manipulated by these functions protects the callback function. 365 * The lock manipulated by these functions protects the callback function.