comparison SDL_sound.h @ 417:55c6695b6038

Fixed SDLCALL nonsense. Should work with Win32/WinCE now, I think.
author Ryan C. Gordon <icculus@icculus.org>
date Thu, 26 Sep 2002 04:21:14 +0000
parents fced17b9890c
children ba94ffe34a47
comparison
equal deleted inserted replaced
416:41412aa092d1 417:55c6695b6038
75 #ifndef SDLCALL /* may not be defined with older SDL releases. */ 75 #ifndef SDLCALL /* may not be defined with older SDL releases. */
76 #define SDLCALL 76 #define SDLCALL
77 #endif 77 #endif
78 78
79 #ifdef SDL_SOUND_DLL_EXPORTS 79 #ifdef SDL_SOUND_DLL_EXPORTS
80 # define SNDDECLSPEC __declspec(dllexport) SDLCALL 80 # define SNDDECLSPEC __declspec(dllexport)
81 #else 81 #else
82 # define SNDDECLSPEC SDLCALL 82 # define SNDDECLSPEC
83 #endif 83 #endif
84 84
85 #define SOUND_VER_MAJOR 0 85 #define SOUND_VER_MAJOR 0
86 #define SOUND_VER_MINOR 1 86 #define SOUND_VER_MINOR 1
87 #define SOUND_VER_PATCH 5 87 #define SOUND_VER_PATCH 5
261 * \param ver Sound_Version structure to fill with shared library's version. 261 * \param ver Sound_Version structure to fill with shared library's version.
262 * 262 *
263 * \sa Sound_Version 263 * \sa Sound_Version
264 * \sa SOUND_VERSION 264 * \sa SOUND_VERSION
265 */ 265 */
266 SNDDECLSPEC void Sound_GetLinkedVersion(Sound_Version *ver); 266 SNDDECLSPEC void SDLCALL Sound_GetLinkedVersion(Sound_Version *ver);
267 267
268 268
269 /** 269 /**
270 * \fn Sound_Init(void) 270 * \fn Sound_Init(void)
271 * \brief Initialize SDL_sound. 271 * \brief Initialize SDL_sound.
279 * \return nonzero on success, zero on error. Specifics of the 279 * \return nonzero on success, zero on error. Specifics of the
280 * error can be gleaned from Sound_GetError(). 280 * error can be gleaned from Sound_GetError().
281 * 281 *
282 * \sa Sound_Quit 282 * \sa Sound_Quit
283 */ 283 */
284 SNDDECLSPEC int Sound_Init(void); 284 SNDDECLSPEC int SDLCALL Sound_Init(void);
285 285
286 286
287 /** 287 /**
288 * \fn Sound_Quit(void) 288 * \fn Sound_Quit(void)
289 * \brief Shutdown SDL_sound. 289 * \brief Shutdown SDL_sound.
304 * can be gleaned from Sound_GetError(). If failure, state of 304 * can be gleaned from Sound_GetError(). If failure, state of
305 * SDL_sound is undefined, and probably badly screwed up. 305 * SDL_sound is undefined, and probably badly screwed up.
306 * 306 *
307 * \sa Sound_Init 307 * \sa Sound_Init
308 */ 308 */
309 SNDDECLSPEC int Sound_Quit(void); 309 SNDDECLSPEC int SDLCALL Sound_Quit(void);
310 310
311 311
312 /** 312 /**
313 * \fn const Sound_DecoderInfo **Sound_AvailableDecoders(void) 313 * \fn const Sound_DecoderInfo **Sound_AvailableDecoders(void)
314 * \brief Get a list of sound formats supported by this version of SDL_sound. 314 * \brief Get a list of sound formats supported by this version of SDL_sound.
339 * 339 *
340 * \return READ ONLY Null-terminated array of READ ONLY structures. 340 * \return READ ONLY Null-terminated array of READ ONLY structures.
341 * 341 *
342 * \sa Sound_DecoderInfo 342 * \sa Sound_DecoderInfo
343 */ 343 */
344 SNDDECLSPEC const Sound_DecoderInfo **Sound_AvailableDecoders(void); 344 SNDDECLSPEC const Sound_DecoderInfo ** SDLCALL Sound_AvailableDecoders(void);
345 345
346 346
347 /** 347 /**
348 * \fn const char *Sound_GetError(void) 348 * \fn const char *Sound_GetError(void)
349 * \brief Get the last SDL_sound error message as a null-terminated string. 349 * \brief Get the last SDL_sound error message as a null-terminated string.
357 * 357 *
358 * \return READ ONLY string of last error message. 358 * \return READ ONLY string of last error message.
359 * 359 *
360 * \sa Sound_ClearError 360 * \sa Sound_ClearError
361 */ 361 */
362 SNDDECLSPEC const char *Sound_GetError(void); 362 SNDDECLSPEC const char * SDLCALL Sound_GetError(void);
363 363
364 364
365 /** 365 /**
366 * \fn void Sound_ClearError(void) 366 * \fn void Sound_ClearError(void)
367 * \brief Clear the current error message. 367 * \brief Clear the current error message.
368 * 368 *
369 * The next call to Sound_GetError() after Sound_ClearError() will return NULL. 369 * The next call to Sound_GetError() after Sound_ClearError() will return NULL.
370 * 370 *
371 * \sa Sound_GetError 371 * \sa Sound_GetError
372 */ 372 */
373 SNDDECLSPEC void Sound_ClearError(void); 373 SNDDECLSPEC void SDLCALL Sound_ClearError(void);
374 374
375 375
376 /** 376 /**
377 * \fn Sound_Sample *Sound_NewSample(SDL_RWops *rw, const char *ext, Sound_AudioInfo *desired, Uint32 bufferSize) 377 * \fn Sound_Sample *Sound_NewSample(SDL_RWops *rw, const char *ext, Sound_AudioInfo *desired, Uint32 bufferSize)
378 * \brief Start decoding a new sound sample. 378 * \brief Start decoding a new sound sample.
443 * \sa Sound_DecodeAll 443 * \sa Sound_DecodeAll
444 * \sa Sound_Seek 444 * \sa Sound_Seek
445 * \sa Sound_Rewind 445 * \sa Sound_Rewind
446 * \sa Sound_FreeSample 446 * \sa Sound_FreeSample
447 */ 447 */
448 SNDDECLSPEC Sound_Sample *Sound_NewSample(SDL_RWops *rw, const char *ext, 448 SNDDECLSPEC Sound_Sample * SDLCALL Sound_NewSample(SDL_RWops *rw,
449 Sound_AudioInfo *desired, 449 const char *ext,
450 Uint32 bufferSize); 450 Sound_AudioInfo *desired,
451 Uint32 bufferSize);
451 452
452 /** 453 /**
453 * \fn Sound_Sample *Sound_NewSampleFromFile(const char *filename, Sound_AudioInfo *desired, Uint32 bufferSize) 454 * \fn Sound_Sample *Sound_NewSampleFromFile(const char *filename, Sound_AudioInfo *desired, Uint32 bufferSize)
454 * \brief Start decoding a new sound sample from a file on disk. 455 * \brief Start decoding a new sound sample from a file on disk.
455 * 456 *
474 * \sa Sound_DecodeAll 475 * \sa Sound_DecodeAll
475 * \sa Sound_Seek 476 * \sa Sound_Seek
476 * \sa Sound_Rewind 477 * \sa Sound_Rewind
477 * \sa Sound_FreeSample 478 * \sa Sound_FreeSample
478 */ 479 */
479 SNDDECLSPEC Sound_Sample *Sound_NewSampleFromFile(const char *filename, 480 SNDDECLSPEC Sound_Sample * SDLCALL Sound_NewSampleFromFile(const char *fname,
480 Sound_AudioInfo *desired, 481 Sound_AudioInfo *desired,
481 Uint32 bufferSize); 482 Uint32 bufferSize);
482 483
483 /** 484 /**
484 * \fn void Sound_FreeSample(Sound_Sample *sample) 485 * \fn void Sound_FreeSample(Sound_Sample *sample)
492 * \param sample The Sound_Sample to delete. 493 * \param sample The Sound_Sample to delete.
493 * 494 *
494 * \sa Sound_NewSample 495 * \sa Sound_NewSample
495 * \sa Sound_NewSampleFromFile 496 * \sa Sound_NewSampleFromFile
496 */ 497 */
497 SNDDECLSPEC void Sound_FreeSample(Sound_Sample *sample); 498 SNDDECLSPEC void SDLCALL Sound_FreeSample(Sound_Sample *sample);
498 499
499 500
500 /** 501 /**
501 * \fn int Sound_SetBufferSize(Sound_Sample *sample, Uint32 new_size) 502 * \fn int Sound_SetBufferSize(Sound_Sample *sample, Uint32 new_size)
502 * \brief Change the current buffer size for a sample. 503 * \brief Change the current buffer size for a sample.
520 * \return non-zero if buffer size changed, zero on failure. 521 * \return non-zero if buffer size changed, zero on failure.
521 * 522 *
522 * \sa Sound_Decode 523 * \sa Sound_Decode
523 * \sa Sound_DecodeAll 524 * \sa Sound_DecodeAll
524 */ 525 */
525 SNDDECLSPEC int Sound_SetBufferSize(Sound_Sample *sample, Uint32 new_size); 526 SNDDECLSPEC int SDLCALL Sound_SetBufferSize(Sound_Sample *sample,
527 Uint32 new_size);
526 528
527 529
528 /** 530 /**
529 * \fn Uint32 Sound_Decode(Sound_Sample *sample) 531 * \fn Uint32 Sound_Decode(Sound_Sample *sample)
530 * \brief Decode more of the sound data in a Sound_Sample. 532 * \brief Decode more of the sound data in a Sound_Sample.
542 * \sa Sound_DecodeAll 544 * \sa Sound_DecodeAll
543 * \sa Sound_SetBufferSize 545 * \sa Sound_SetBufferSize
544 * \sa Sound_Seek 546 * \sa Sound_Seek
545 * \sa Sound_Rewind 547 * \sa Sound_Rewind
546 */ 548 */
547 SNDDECLSPEC Uint32 Sound_Decode(Sound_Sample *sample); 549 SNDDECLSPEC Uint32 SDLCALL Sound_Decode(Sound_Sample *sample);
548 550
549 551
550 /** 552 /**
551 * \fn Uint32 Sound_DecodeAll(Sound_Sample *sample) 553 * \fn Uint32 Sound_DecodeAll(Sound_Sample *sample)
552 * \brief Decode the remainder of the sound data in a Sound_Sample. 554 * \brief Decode the remainder of the sound data in a Sound_Sample.
578 * (EOF, error, read again). 580 * (EOF, error, read again).
579 * 581 *
580 * \sa Sound_Decode 582 * \sa Sound_Decode
581 * \sa Sound_SetBufferSize 583 * \sa Sound_SetBufferSize
582 */ 584 */
583 SNDDECLSPEC Uint32 Sound_DecodeAll(Sound_Sample *sample); 585 SNDDECLSPEC Uint32 SDLCALL Sound_DecodeAll(Sound_Sample *sample);
584 586
585 587
586 /** 588 /**
587 * \fn int Sound_Rewind(Sound_Sample *sample) 589 * \fn int Sound_Rewind(Sound_Sample *sample)
588 * \brief Rewind a sample to the start. 590 * \brief Rewind a sample to the start.
612 * \return nonzero on success, zero on error. Specifics of the 614 * \return nonzero on success, zero on error. Specifics of the
613 * error can be gleaned from Sound_GetError(). 615 * error can be gleaned from Sound_GetError().
614 * 616 *
615 * \sa Sound_Seek 617 * \sa Sound_Seek
616 */ 618 */
617 SNDDECLSPEC int Sound_Rewind(Sound_Sample *sample); 619 SNDDECLSPEC int SDLCALL Sound_Rewind(Sound_Sample *sample);
618 620
619 621
620 /** 622 /**
621 * \fn int Sound_Seek(Sound_Sample *sample, Uint32 ms) 623 * \fn int Sound_Seek(Sound_Sample *sample, Uint32 ms)
622 * \brief Seek to a different point in a sample. 624 * \brief Seek to a different point in a sample.
657 * \return nonzero on success, zero on error. Specifics of the 659 * \return nonzero on success, zero on error. Specifics of the
658 * error can be gleaned from Sound_GetError(). 660 * error can be gleaned from Sound_GetError().
659 * 661 *
660 * \sa Sound_Rewind 662 * \sa Sound_Rewind
661 */ 663 */
662 SNDDECLSPEC int Sound_Seek(Sound_Sample *sample, Uint32 ms); 664 SNDDECLSPEC int SDLCALL Sound_Seek(Sound_Sample *sample, Uint32 ms);
663
664 665
665 #ifdef __cplusplus 666 #ifdef __cplusplus
666 } 667 }
667 #endif 668 #endif
668 669