comparison SDL_sound.h @ 386:8c8ecd1008c9

Changed DECLSPEC definition.
author Ryan C. Gordon <icculus@icculus.org>
date Fri, 05 Jul 2002 22:34:55 +0000
parents b3ac77d08e79
children fced17b9890c
comparison
equal deleted inserted replaced
385:9efb760c4a6b 386:8c8ecd1008c9
68 68
69 #ifdef __cplusplus 69 #ifdef __cplusplus
70 extern "C" { 70 extern "C" {
71 #endif 71 #endif
72 72
73 /* !!! FIXME: Use SDLCALL instead. */
74 #ifndef DOXYGEN_SHOULD_IGNORE_THIS 73 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
74
75 #ifndef SDLCALL /* may not be defined with older SDL releases. */
76 #define SDLCALL
77 #endif
78
75 #ifdef SDL_SOUND_DLL_EXPORTS 79 #ifdef SDL_SOUND_DLL_EXPORTS
76 # undef DECLSPEC 80 # define SNDDECLSPEC __declspec(dllexport) SDLCALL
77 # define DECLSPEC __declspec(dllexport) 81 #else
82 # define SNDDECLSPEC SDLCALL
78 #endif 83 #endif
79 84
80 #define SOUND_VER_MAJOR 0 85 #define SOUND_VER_MAJOR 0
81 #define SOUND_VER_MINOR 1 86 #define SOUND_VER_MINOR 1
82 #define SOUND_VER_PATCH 5 87 #define SOUND_VER_PATCH 5
256 * \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.
257 * 262 *
258 * \sa Sound_Version 263 * \sa Sound_Version
259 * \sa SOUND_VERSION 264 * \sa SOUND_VERSION
260 */ 265 */
261 DECLSPEC void Sound_GetLinkedVersion(Sound_Version *ver); 266 SNDDECLSPEC void Sound_GetLinkedVersion(Sound_Version *ver);
262 267
263 268
264 /** 269 /**
265 * \fn Sound_Init(void) 270 * \fn Sound_Init(void)
266 * \brief Initialize SDL_sound. 271 * \brief Initialize SDL_sound.
274 * \return nonzero on success, zero on error. Specifics of the 279 * \return nonzero on success, zero on error. Specifics of the
275 * error can be gleaned from Sound_GetError(). 280 * error can be gleaned from Sound_GetError().
276 * 281 *
277 * \sa Sound_Quit 282 * \sa Sound_Quit
278 */ 283 */
279 DECLSPEC int Sound_Init(void); 284 SNDDECLSPEC int Sound_Init(void);
280 285
281 286
282 /** 287 /**
283 * \fn Sound_Quit(void) 288 * \fn Sound_Quit(void)
284 * \brief Shutdown SDL_sound. 289 * \brief Shutdown SDL_sound.
299 * can be gleaned from Sound_GetError(). If failure, state of 304 * can be gleaned from Sound_GetError(). If failure, state of
300 * SDL_sound is undefined, and probably badly screwed up. 305 * SDL_sound is undefined, and probably badly screwed up.
301 * 306 *
302 * \sa Sound_Init 307 * \sa Sound_Init
303 */ 308 */
304 DECLSPEC int Sound_Quit(void); 309 SNDDECLSPEC int Sound_Quit(void);
305 310
306 311
307 /** 312 /**
308 * \fn const Sound_DecoderInfo **Sound_AvailableDecoders(void) 313 * \fn const Sound_DecoderInfo **Sound_AvailableDecoders(void)
309 * \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.
334 * 339 *
335 * \return READ ONLY Null-terminated array of READ ONLY structures. 340 * \return READ ONLY Null-terminated array of READ ONLY structures.
336 * 341 *
337 * \sa Sound_DecoderInfo 342 * \sa Sound_DecoderInfo
338 */ 343 */
339 DECLSPEC const Sound_DecoderInfo **Sound_AvailableDecoders(void); 344 SNDDECLSPEC const Sound_DecoderInfo **Sound_AvailableDecoders(void);
340 345
341 346
342 /** 347 /**
343 * \fn const char *Sound_GetError(void) 348 * \fn const char *Sound_GetError(void)
344 * \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.
352 * 357 *
353 * \return READ ONLY string of last error message. 358 * \return READ ONLY string of last error message.
354 * 359 *
355 * \sa Sound_ClearError 360 * \sa Sound_ClearError
356 */ 361 */
357 DECLSPEC const char *Sound_GetError(void); 362 SNDDECLSPEC const char *Sound_GetError(void);
358 363
359 364
360 /** 365 /**
361 * \fn void Sound_ClearError(void) 366 * \fn void Sound_ClearError(void)
362 * \brief Clear the current error message. 367 * \brief Clear the current error message.
363 * 368 *
364 * 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.
365 * 370 *
366 * \sa Sound_GetError 371 * \sa Sound_GetError
367 */ 372 */
368 DECLSPEC void Sound_ClearError(void); 373 SNDDECLSPEC void Sound_ClearError(void);
369 374
370 375
371 /** 376 /**
372 * \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)
373 * \brief Start decoding a new sound sample. 378 * \brief Start decoding a new sound sample.
438 * \sa Sound_DecodeAll 443 * \sa Sound_DecodeAll
439 * \sa Sound_Seek 444 * \sa Sound_Seek
440 * \sa Sound_Rewind 445 * \sa Sound_Rewind
441 * \sa Sound_FreeSample 446 * \sa Sound_FreeSample
442 */ 447 */
443 DECLSPEC Sound_Sample *Sound_NewSample(SDL_RWops *rw, const char *ext, 448 SNDDECLSPEC Sound_Sample *Sound_NewSample(SDL_RWops *rw, const char *ext,
444 Sound_AudioInfo *desired, 449 Sound_AudioInfo *desired,
445 Uint32 bufferSize); 450 Uint32 bufferSize);
446 451
447 /** 452 /**
448 * \fn Sound_Sample *Sound_NewSampleFromFile(const char *filename, Sound_AudioInfo *desired, Uint32 bufferSize) 453 * \fn Sound_Sample *Sound_NewSampleFromFile(const char *filename, Sound_AudioInfo *desired, Uint32 bufferSize)
469 * \sa Sound_DecodeAll 474 * \sa Sound_DecodeAll
470 * \sa Sound_Seek 475 * \sa Sound_Seek
471 * \sa Sound_Rewind 476 * \sa Sound_Rewind
472 * \sa Sound_FreeSample 477 * \sa Sound_FreeSample
473 */ 478 */
474 DECLSPEC Sound_Sample *Sound_NewSampleFromFile(const char *filename, 479 SNDDECLSPEC Sound_Sample *Sound_NewSampleFromFile(const char *filename,
475 Sound_AudioInfo *desired, 480 Sound_AudioInfo *desired,
476 Uint32 bufferSize); 481 Uint32 bufferSize);
477 482
478 /** 483 /**
479 * \fn void Sound_FreeSample(Sound_Sample *sample) 484 * \fn void Sound_FreeSample(Sound_Sample *sample)
487 * \param sample The Sound_Sample to delete. 492 * \param sample The Sound_Sample to delete.
488 * 493 *
489 * \sa Sound_NewSample 494 * \sa Sound_NewSample
490 * \sa Sound_NewSampleFromFile 495 * \sa Sound_NewSampleFromFile
491 */ 496 */
492 DECLSPEC void Sound_FreeSample(Sound_Sample *sample); 497 SNDDECLSPEC void Sound_FreeSample(Sound_Sample *sample);
493 498
494 499
495 /** 500 /**
496 * \fn int Sound_SetBufferSize(Sound_Sample *sample, Uint32 new_size) 501 * \fn int Sound_SetBufferSize(Sound_Sample *sample, Uint32 new_size)
497 * \brief Change the current buffer size for a sample. 502 * \brief Change the current buffer size for a sample.
515 * \return non-zero if buffer size changed, zero on failure. 520 * \return non-zero if buffer size changed, zero on failure.
516 * 521 *
517 * \sa Sound_Decode 522 * \sa Sound_Decode
518 * \sa Sound_DecodeAll 523 * \sa Sound_DecodeAll
519 */ 524 */
520 DECLSPEC int Sound_SetBufferSize(Sound_Sample *sample, Uint32 new_size); 525 SNDDECLSPEC int Sound_SetBufferSize(Sound_Sample *sample, Uint32 new_size);
521 526
522 527
523 /** 528 /**
524 * \fn Uint32 Sound_Decode(Sound_Sample *sample) 529 * \fn Uint32 Sound_Decode(Sound_Sample *sample)
525 * \brief Decode more of the sound data in a Sound_Sample. 530 * \brief Decode more of the sound data in a Sound_Sample.
537 * \sa Sound_DecodeAll 542 * \sa Sound_DecodeAll
538 * \sa Sound_SetBufferSize 543 * \sa Sound_SetBufferSize
539 * \sa Sound_Seek 544 * \sa Sound_Seek
540 * \sa Sound_Rewind 545 * \sa Sound_Rewind
541 */ 546 */
542 DECLSPEC Uint32 Sound_Decode(Sound_Sample *sample); 547 SNDDECLSPEC Uint32 Sound_Decode(Sound_Sample *sample);
543 548
544 549
545 /** 550 /**
546 * \fn Uint32 Sound_DecodeAll(Sound_Sample *sample) 551 * \fn Uint32 Sound_DecodeAll(Sound_Sample *sample)
547 * \brief Decode the remainder of the sound data in a Sound_Sample. 552 * \brief Decode the remainder of the sound data in a Sound_Sample.
573 * (EOF, error, read again). 578 * (EOF, error, read again).
574 * 579 *
575 * \sa Sound_Decode 580 * \sa Sound_Decode
576 * \sa Sound_SetBufferSize 581 * \sa Sound_SetBufferSize
577 */ 582 */
578 DECLSPEC Uint32 Sound_DecodeAll(Sound_Sample *sample); 583 SNDDECLSPEC Uint32 Sound_DecodeAll(Sound_Sample *sample);
579 584
580 585
581 /** 586 /**
582 * \fn int Sound_Rewind(Sound_Sample *sample) 587 * \fn int Sound_Rewind(Sound_Sample *sample)
583 * \brief Rewind a sample to the start. 588 * \brief Rewind a sample to the start.
607 * \return nonzero on success, zero on error. Specifics of the 612 * \return nonzero on success, zero on error. Specifics of the
608 * error can be gleaned from Sound_GetError(). 613 * error can be gleaned from Sound_GetError().
609 * 614 *
610 * \sa Sound_Seek 615 * \sa Sound_Seek
611 */ 616 */
612 DECLSPEC int Sound_Rewind(Sound_Sample *sample); 617 SNDDECLSPEC int Sound_Rewind(Sound_Sample *sample);
613 618
614 619
615 /** 620 /**
616 * \fn int Sound_Seek(Sound_Sample *sample, Uint32 ms) 621 * \fn int Sound_Seek(Sound_Sample *sample, Uint32 ms)
617 * \brief Seek to a different point in a sample. 622 * \brief Seek to a different point in a sample.
652 * \return nonzero on success, zero on error. Specifics of the 657 * \return nonzero on success, zero on error. Specifics of the
653 * error can be gleaned from Sound_GetError(). 658 * error can be gleaned from Sound_GetError().
654 * 659 *
655 * \sa Sound_Rewind 660 * \sa Sound_Rewind
656 */ 661 */
657 DECLSPEC int Sound_Seek(Sound_Sample *sample, Uint32 ms); 662 SNDDECLSPEC int Sound_Seek(Sound_Sample *sample, Uint32 ms);
658 663
659 664
660 #ifdef __cplusplus 665 #ifdef __cplusplus
661 } 666 }
662 #endif 667 #endif