#include "CrabClaw/types.h"Data Structures | |
| struct | cc_vorbis_stream |
| An Ogg Vorbis music stream. More... | |
Defines | |
| #define | CC_VORBIS_PLAYBACK_FINISHED -2 |
| Finished playback Vorbis stream status. | |
| #define | CC_VORBIS_PLAYBACK_PAUSED -1 |
| Paused Vorbis stream status. | |
| #define | CC_VORBIS_PLAYBACK_PLAYING 1 |
| Playing Vorbis stream status. | |
| #define | CC_VORBIS_PLAYBACK_STOPPED 0 |
| Stopped Vorbis stream status. | |
Typedefs | |
| typedef struct cc_vorbis_stream | cc_vorbis_stream_t |
| An Ogg Vorbis music stream. | |
Functions | |
| int | cc_vorbis_destroy (cc_vorbis_stream_t *str) |
| Destroy an Ogg Vorbis stream. | |
| int | cc_vorbis_pause (cc_vorbis_stream_t *str) |
| Pause an Ogg Vorbis stream. | |
| int | cc_vorbis_restart (cc_vorbis_stream_t *str) |
| Restart an Ogg Vorbis stream. | |
| int | cc_vorbis_start (const char *fn, int loop, double loop_pt, cc_vorbis_stream_t *str) |
| Start a new Ogg Vorbis stream from a given file. | |
| int | cc_vorbis_stop (cc_vorbis_stream_t *str) |
| Stop a currently playing Ogg Vorbis stream. | |
| #define CC_VORBIS_PLAYBACK_FINISHED -2 |
Finished playback Vorbis stream status.
When an Ogg Vorbis stream is finished playing (if it does not loop), the stream's playing attribute will be this value.
| #define CC_VORBIS_PLAYBACK_PAUSED -1 |
Paused Vorbis stream status.
When an Ogg Vorbis stream is paused, the stream's playing attribute will be this value.
| #define CC_VORBIS_PLAYBACK_PLAYING 1 |
Playing Vorbis stream status.
When an Ogg Vorbis stream is playing, the stream's playing attribute will be this value.
| #define CC_VORBIS_PLAYBACK_STOPPED 0 |
Stopped Vorbis stream status.
When an Ogg Vorbis stream is in the stopped state, the stream's playing attribute will be this value.
| typedef struct cc_vorbis_stream cc_vorbis_stream_t |
An Ogg Vorbis music stream.
This object is used by a user program to register some sort of music to be playing. Specifically, this object is ued when loading Ogg Vorbis sound files. It is imperative that user programs do not modify any of the elements of this structure (everything should be treated as read-only).
| int cc_vorbis_destroy | ( | cc_vorbis_stream_t * | str | ) |
Destroy an Ogg Vorbis stream.
This function cleans up the given stream, freeing any memory or resources currently in use by the stream. The stream is not useable after calling this function.
| str | The stream to destroy. |
| int cc_vorbis_pause | ( | cc_vorbis_stream_t * | str | ) |
Pause an Ogg Vorbis stream.
This function pauses the given stream. The stream maintains its current position in playback, allowing a cc_vorbis_restart to resume playback from the current position at a later time.
| str | The stream to pause. |
| int cc_vorbis_restart | ( | cc_vorbis_stream_t * | str | ) |
Restart an Ogg Vorbis stream.
This function restarts the given stream, placing it back into the CC_VORBIS_PLAYBACK_PLAYING state. If the stream is paused, it will resume playing from the point where it was paused. If the stream is stopped or finished, playback will resume from the beginning.
| str | The stream to restart. |
| int cc_vorbis_start | ( | const char * | fn, | |
| int | loop, | |||
| double | loop_pt, | |||
| cc_vorbis_stream_t * | str | |||
| ) |
Start a new Ogg Vorbis stream from a given file.
This function starts a new sound stream with the provided file. The stream will start playing immediately.
| fn | The file to load the sound from. | |
| loop | If set to 1, the sound will loop when it reaches the end. | |
| loop_pt | The point in the sound to loop to when using loop mode. This is expressed in seconds. | |
| str | The stream to load into. |
| int cc_vorbis_stop | ( | cc_vorbis_stream_t * | str | ) |
Stop a currently playing Ogg Vorbis stream.
This function stops the given stream, and places it into the CC_VORBIS_PLAYBACK_STOPPED state. This does not retain any information about the current point in playback that the stream is at. In order to do that, use cc_vorbis_pause instead of this function.
| str | The stream to stop. |