Mercurial > SDL_sound_CoreAudio
comparison SDL_sound.h @ 223:249186e31431
Sound_Rewind() support code.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Thu, 17 Jan 2002 20:55:46 +0000 |
parents | e2cb8bfe8051 |
children | c54eae85f5f1 |
comparison
equal
deleted
inserted
replaced
222:d6b24586822a | 223:249186e31431 |
---|---|
453 * sample->flags to see what the current state of the sample is | 453 * sample->flags to see what the current state of the sample is |
454 * (EOF, error, read again). | 454 * (EOF, error, read again). |
455 */ | 455 */ |
456 extern DECLSPEC Uint32 Sound_DecodeAll(Sound_Sample *sample); | 456 extern DECLSPEC Uint32 Sound_DecodeAll(Sound_Sample *sample); |
457 | 457 |
458 | |
459 /** | |
460 * Restart a sample at the start of its waveform data, as if newly | |
461 * created with Sound_NewSample(). If successful, the next call to | |
462 * Sound_Decode[All]() will give audio data from the earliest point | |
463 * in the stream. | |
464 * | |
465 * Beware that this function will fail if the SDL_RWops that feeds the | |
466 * decoder can not be rewound via it's seek method, but this can | |
467 * theoretically be avoided by wrapping it in some sort of buffering | |
468 * SDL_RWops. | |
469 * | |
470 * This function should ONLY fail if the RWops is not seekable, or | |
471 * SDL_sound is not initialized. Both can be controlled by the application, | |
472 * and thus, it is up to the developer's paranoia to dictate whether this | |
473 * function's return value need be checked at all. | |
474 * | |
475 * If this function fails, the state of the sample is undefined, but it | |
476 * is still safe to call Sound_FreeSample() to dispose of it. | |
477 * | |
478 * On success, ERROR, EOF, and EAGAIN are cleared from sample->flags. The | |
479 * ERROR flag is set on error. | |
480 * | |
481 * @param sample The Sound_Sample to rewind. | |
482 * @return nonzero on success, zero on error. Specifics of the | |
483 * error can be gleaned from Sound_GetError(). | |
484 */ | |
485 extern DECLSPEC int Sound_Rewind(Sound_Sample *sample); | |
486 | |
487 | |
458 #ifdef __cplusplus | 488 #ifdef __cplusplus |
459 } | 489 } |
460 #endif | 490 #endif |
461 | 491 |
462 #endif /* !defined _INCLUDE_SDL_SOUND_H_ */ | 492 #endif /* !defined _INCLUDE_SDL_SOUND_H_ */ |