Audio addon

# Audio addon # Audio types ## ALLEGRO_AUDIO_DEPTH
    enum ALLEGRO_AUDIO_DEPTH {
Sample depth and type, and signedness. Mixers only use 32-bit signed float (-1..+1). The unsigned value is a bit-flag applied to the depth value. ALLEGRO_AUDIO_DEPTH_INT8 ALLEGRO_AUDIO_DEPTH_INT16 ALLEGRO_AUDIO_DEPTH_INT24 ALLEGRO_AUDIO_DEPTH_FLOAT32 ALLEGRO_AUDIO_DEPTH_UNSIGNED For convenience: ALLEGRO_AUDIO_DEPTH_UINT8 ALLEGRO_AUDIO_DEPTH_UINT16 ALLEGRO_AUDIO_DEPTH_UINT24 ## ALLEGRO_AUDIO_DRIVER_ENUM
    enum ALLEGRO_AUDIO_DRIVER_ENUM {
The sound driver to use. It is highly recommended to use ALLEGRO_AUDIO_DRIVER_AUTODETECT whenever possible. ALLEGRO_AUDIO_DRIVER_AUTODETECT ALLEGRO_AUDIO_DRIVER_OPENAL ALLEGRO_AUDIO_DRIVER_ALSA ALLEGRO_AUDIO_DRIVER_DSOUND ALLEGRO_AUDIO_DRIVER_OSS ## ALLEGRO_AUDIO_PAN_NONE
    #define ALLEGRO_AUDIO_PAN_NONE      (-1000.0f)
Special value for the ALLEGRO_AUDIOPROP_PAN property. Use this value to play samples at their original volume with panning disabled. ## ALLEGRO_AUDIO_PROPERTY
    enum ALLEGRO_AUDIO_PROPERTY {
Flags to pass to the various al_*_get_* and al_*_set_* functions. Not all types will apply to all functions. ALLEGRO_AUDIOPROP_DEPTH ALLEGRO_AUDIOPROP_CHANNELS ALLEGRO_AUDIOPROP_FREQUENCY ALLEGRO_AUDIOPROP_PLAYING ALLEGRO_AUDIOPROP_ATTACHED ALLEGRO_AUDIOPROP_LENGTH ALLEGRO_AUDIOPROP_BUFFER ALLEGRO_AUDIOPROP_LOOPMODE ALLEGRO_AUDIOPROP_SPEED ALLEGRO_AUDIOPROP_POSITION ALLEGRO_AUDIOPROP_GAIN ALLEGRO_AUDIOPROP_PAN ALLEGRO_AUDIOPROP_FRAGMENTS ALLEGRO_AUDIOPROP_USED_FRAGMENTS ALLEGRO_AUDIOPROP_QUALITY ALLEGRO_AUDIOPROP_TIME ## ALLEGRO_CHANNEL_CONF
    enum ALLEGRO_CHANNEL_CONF {
Speaker configuration (mono, stereo, 2.1, 3, etc). ALLEGRO_CHANNEL_CONF_1 ALLEGRO_CHANNEL_CONF_2 ALLEGRO_CHANNEL_CONF_3 ALLEGRO_CHANNEL_CONF_4 ALLEGRO_CHANNEL_CONF_5_1 ALLEGRO_CHANNEL_CONF_6_1 ALLEGRO_CHANNEL_CONF_7_1 ## ALLEGRO_MIXER
    typedef struct ALLEGRO_MIXER ALLEGRO_MIXER;
A mixer is a type of stream which mixes together attached streams into a single buffer. ## ALLEGRO_MIXER_QUALITY
    enum ALLEGRO_MIXER_QUALITY {
ALLEGRO_MIXER_QUALITY_POINT ALLEGRO_MIXER_QUALITY_LINEAR ## ALLEGRO_PLAYMODE
    enum ALLEGRO_PLAYMODE {
Sample and stream looping mode. ALLEGRO_PLAYMODE_ONCE ALLEGRO_PLAYMODE_LOOP ALLEGRO_PLAYMODE_BIDIR ## ALLEGRO_SAMPLE_ID
    typedef struct {
An ALLEGRO_SAMPLE_ID represents a sample being played via al_play_sample. It can be used to later stop the sample with al_stop_sample. ## ALLEGRO_SAMPLE
    typedef struct ALLEGRO_SAMPLE ALLEGRO_SAMPLE;
An ALLEGRO_SAMPLE object stores the data necessary for playing pre-defined digital audio. It holds information pertaining to data length, frequency, channel configuration, etc. You can have an ALLEGRO_SAMPLE object playing multiple times simultaneously. The object holds a user-specified PCM data buffer, of the format the object is created with. ## ALLEGRO_SAMPLE_INSTANCE
    typedef struct ALLEGRO_SAMPLE_INSTANCE ALLEGRO_SAMPLE_INSTANCE;
An ALLEGRO_SAMPLE_INSTANCE object represents a playable instance of a predefined sound effect. It holds information pertaining to the looping mode, loop start/end points, playing position, etc. An instance uses the data from an ALLEGRO_SAMPLE object. Multiple instances may be created from the same ALLEGRO_SAMPLE. An ALLEGRO_SAMPLE must not be destroyed while there are instances which reference it. To be played, an ALLEGRO_SAMPLE_INSTANCE object must be attached to an ALLEGRO_VOICE object, or to an ALLEGRO_MIXER object which is itself attached to an ALLEGRO_VOICE object (or to another ALLEGRO_MIXER object which is attached to an ALLEGRO_VOICE object, etc). An ALLEGRO_SAMPLE_INSTANCE object uses the following fields: XXX much of this will probably change soon ALLEGRO_AUDIOPROP_DEPTH (enum) - Gets the bit depth format the object was created with. This may not be changed after the object is created. ALLEGRO_AUDIOPROP_CHANNELS (enum) - Gets the channel configuration the object was created with. This may not be changed after the object is created. ALLEGRO_AUDIOPROP_FREQUENCY (long) - Gets the frequency (in hz) the object was created with. This may not be changed after the object is created. To change playback speed, see ALLEGRO_AUDIOPROP_SPEED. ALLEGRO_AUDIOPROP_PLAYING (bool) - Gets or sets the object's playing status. By default, it is stopped. Note that simply setting it true does not cause the object to play. It must also be attached to a voice, directly or indirectly (eg. sample->voice, sample->mixer->voice, sample->mixer->...->voice). ALLEGRO_AUDIOPROP_ATTACHED (bool) - Gets the object's attachment status (true if it is attached to a something, false if not). Setting this to false detaches the object from whatever it is attached to. You may not directly set this to true. ALLEGRO_AUDIOPROP_LENGTH (long) - Gets or sets the length of the object's data buffer, in samples-per-channel. When changing the length, you must make sure the current buffer is large enough. You may not change the length while the object is set to play. ALLEGRO_AUDIOPROP_BUFFER (ptr) - Gets or sets the object's data buffer. You may not get or set this if the object is set to play. ALLEGRO_AUDIOPROP_LOOPMODE (enum) - Gets or sets the object's looping mode. Setting this may fail if the object is attached to a voice and the audio driver does not support the requested looping mode. ALLEGRO_AUDIOPROP_SPEED (float) - Gets or sets the object's playing speed. Negative values will cause the object to play backwards. If the value is set too close to 0, this will fail to set. ALLEGRO_AUDIOPROP_POSITION (long) - Gets or sets the object's playing position. The value is in samples-per-channel. ALLEGRO_AUDIOPROP_GAIN (float) - Gets or sets the object's gain. The gain is only applied when mixing the sample into a parent mixer. Has no effect if the object is attached directly to a voice. ALLEGRO_AUDIOPROP_PAN (float) - Gets or sets the object's panning (-1.0 to 1.0, from left to right). The panning is only applied when mixing the sample into a parent mixer. Has no effect if the object is attached directly to a voice. To maintain a constant sound power level, when a sound is played in the middle, it will be output equally from both front speakers but reduced in level by 3 dB (about 0.707 of the original). To play a sound centred and at its original level, set its ALLEGRO_AUDIOPROP_PAN property to ALLEGRO_AUDIO_PAN_NONE. ## ALLEGRO_STREAM
    typedef struct ALLEGRO_STREAM ALLEGRO_STREAM;
An ALLEGRO_STREAM object is used to stream generated audio to the sound device, in real-time. As with ALLEGRO_SAMPLE_INSTANCE objects, they store information necessary for playback, so you may not play one multiple times simultaneously. They also need to be attached to an ALLEGRO_VOICE object, or to an ALLEGRO_MIXER object which, eventually, reaches an ALLEGRO_VOICE object. While playing, you must periodically supply new buffer data by first checking ALLEGRO_AUDIOPROP_USED_FRAGMENTS, then refilling the buffers via ALLEGRO_AUDIOPROP_BUFFER. If you're late with supplying new data, the object will be silenced until new data is provided. You must call al_drain_stream when you're finished supplying the stream. ALLEGRO_STREAM objects use the following fields: ALLEGRO_AUDIOPROP_DEPTH (enum) - Same as ALLEGRO_SAMPLE ALLEGRO_AUDIOPROP_CHANNELS (enum) - Same as ALLEGRO_SAMPLE ALLEGRO_AUDIOPROP_FREQUENCY (enum) - Same as ALLEGRO_SAMPLE ALLEGRO_AUDIOPROP_ATTACHED (bool) - Same as ALLEGRO_SAMPLE ALLEGRO_AUDIOPROP_PLAYING (bool) - Same as ALLEGRO_SAMPLE, with the exception that ALLEGRO_STREAM objects are set to play by default. ALLEGRO_AUDIOPROP_LOOPMODE (enum) - Same as ALLEGRO_SAMPLE ALLEGRO_AUDIOPROP_SPEED (float) - Same as ALLEGRO_SAMPLE, with the added caveat that negative values aren't allowed. ALLEGRO_AUDIOPROP_GAIN (float) - Same as ALLEGRO_SAMPLE. ALLEGRO_AUDIOPROP_PAN (float) - Same as ALLEGRO_SAMPLE. ALLEGRO_AUDIOPROP_LENGTH (long) - This gets the length, in samples-per-channel, of the individual buffer fragments. You may not set this after the object is created. ALLEGRO_AUDIOPROP_BUFFER (ptr) - This gets the next buffer fragment that needs to be filled. After the buffer is filled, this field must be set to the same pointer value to let the object know the new data is ready. ALLEGRO_AUDIOPROP_FRAGMENTS (long) - This gets the total number of buffer fragments the object was created with. You may not set this after the object is created. ALLEGRO_AUDIOPROP_USED_FRAGMENTS (long) - This gets the number of buffer fragments that are waiting to be refilled. This value is decreased when ALLEGRO_AUDIOPROP_BUFFER is used to retrieve a waiting buffer fragment. You may not set this value. ## ALLEGRO_VOICE
    typedef struct ALLEGRO_VOICE ALLEGRO_VOICE;
A voice structure that you'd attach a mixer or sample to. Ideally there would be one ALLEGRO_VOICE per system/hardware voice. # Setting up ## al_install_audio
    int al_install_audio(ALLEGRO_AUDIO_DRIVER_ENUM mode)
Parameters: mode - see ALLEGRO_AUDIO_DRIVER_ENUM Returns zero on success, non-zero on failure. XXX the return value seems a bit out of place See also: al_reserve_samples. ## al_uninstall_audio
    void al_uninstall_audio(void)
## al_reserve_samples
    bool al_reserve_samples(int reserve_samples)
Reserves 'reserve_samples' number of samples attached to the default mixer. al_install_audio must have been called first. If no default mixer is set, then this function will create a voice with an attached mixer. Returns true on success, false on error. # Voice functions ## al_create_voice
    ALLEGRO_VOICE *al_create_voice(unsigned long freq,
       ALLEGRO_AUDIO_DEPTH depth, ALLEGRO_CHANNEL_CONF chan_conf)
Creates a voice struct and allocates a voice from the digital sound driver. The sound driver's allocate_voice function should change the voice's frequency, depth, chan_conf, and settings fields to match what is actually allocated. If it cannot create a voice with exact settings it will fail. Use a mixer in such a case. ## al_destroy_voice
    void al_destroy_voice(ALLEGRO_VOICE *voice)
Destroys the voice and deallocates it from the digital driver. Does nothing if the voice is NULL. ## al_detach_voice
    void al_detach_voice(ALLEGRO_VOICE *voice)
Detaches the sample or mixer stream from the voice. ## al_attach_stream_to_voice
    int al_attach_stream_to_voice(ALLEGRO_VOICE *voice, ALLEGRO_STREAM *stream)
Attaches an audio stream to a voice. The same rules as al_attach_sample_to_voice apply. This may fail if the driver can't create a voice with the buffer count and buffer size the stream uses. ## al_get_voice_bool
    int al_get_voice_bool(const ALLEGRO_VOICE *voice,
       ALLEGRO_AUDIO_PROPERTY setting, bool *val)
## al_get_voice_enum
    int al_get_voice_enum(const ALLEGRO_VOICE *voice,
       ALLEGRO_AUDIO_PROPERTY setting, int *val)
## al_get_voice_long
    int al_get_voice_long(const ALLEGRO_VOICE *voice,
       ALLEGRO_AUDIO_PROPERTY setting, unsigned long *val)
## al_set_voice_bool
    int al_set_voice_bool(ALLEGRO_VOICE *voice,
       ALLEGRO_AUDIO_PROPERTY setting, bool val)
## al_set_voice_enum
    int al_set_voice_enum(ALLEGRO_VOICE *voice,
       ALLEGRO_AUDIO_PROPERTY setting, int val)
## al_set_voice_long
    int al_set_voice_long(ALLEGRO_VOICE *voice,
       ALLEGRO_AUDIO_PROPERTY setting, unsigned long val)
## al_attach_mixer_to_voice
    int al_attach_mixer_to_voice(ALLEGRO_VOICE *voice, ALLEGRO_MIXER *mixer)
Attaches a mixer to a voice. The same rules as al_attach_sample_to_voice apply, with the exception of the depth requirement. ## al_attach_sample_to_voice
    int al_attach_sample_to_voice(ALLEGRO_VOICE *voice, ALLEGRO_SAMPLE_INSTANCE *spl)
Attaches a sample to a voice, and allows it to play. The sample's volume and loop mode will be ignored, and it must have the same frequency and depth (including signed-ness) as the voice. This function may fail if the selected driver doesn't support preloading sample data. # Sample functions ## al_create_sample
    ALLEGRO_SAMPLE *al_create_sample(void *buf, unsigned long samples,
       unsigned long freq, ALLEGRO_AUDIO_DEPTH depth,
       ALLEGRO_CHANNEL_CONF chan_conf, bool free_buf)
Create a sample data structure from the supplied buffer. If `free_buf` is true then the buffer will be freed as well when the sample data structure is destroyed. ## al_destroy_sample
    void al_destroy_sample(ALLEGRO_SAMPLE *spl)
Free the sample data structure. If it was created with the `free_buf` parameter set to true, then the buffer will be freed as well. You must destroy any ALLEGRO_SAMPLE_INSTANCE structures which reference this ALLEGRO_SAMPLE beforehand. ## al_play_sample
    bool al_play_sample(ALLEGRO_SAMPLE *spl, float gain, float pan, float speed,
       int loop, ALLEGRO_SAMPLE_ID *ret_id)
Plays a sample over the default mixer. al_reserve_samples must have previously been called. Returns true on success, false on failure. Playback may fail because all the reserved samples are currently used. ## al_stop_sample
    void al_stop_sample(ALLEGRO_SAMPLE_ID *spl_id)
Stop the sample started by al_play_sample. ## al_stop_samples
    void al_stop_samples(void)
Stop all samples started by al_play_sample. ## al_create_sample_instance
    ALLEGRO_SAMPLE_INSTANCE *al_create_sample_instance(ALLEGRO_SAMPLE *sample_data)
Creates a sample stream, using the supplied data. This must be attached to a voice or mixer before it can be played. The argument may be NULL. You can then set the data later with al_set_sample. ## al_destroy_sample_instance
    void al_destroy_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl)
Detaches the sample stream from anything it may be attached to and frees it (the sample data is not freed!). ## al_play_sample_instance
    int al_play_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl)
Play an instance of a sample data. Returns true on success, false on failure. ## al_stop_sample_instance
    int al_stop_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl)
## al_get_sample_instance_bool
    int al_get_sample_instance_bool(const ALLEGRO_SAMPLE_INSTANCE *spl,
       ALLEGRO_AUDIO_PROPERTY setting, bool *val)
## al_get_sample_instance_enum
    int al_get_sample_instance_enum(const ALLEGRO_SAMPLE_INSTANCE *spl,
       ALLEGRO_AUDIO_PROPERTY setting, int *val)
## al_get_sample_instance_float
    int al_get_sample_instance_float(const ALLEGRO_SAMPLE_INSTANCE *spl,
       ALLEGRO_AUDIO_PROPERTY setting, float *val)
## al_get_sample_instance_long
    int al_get_sample_instance_long(const ALLEGRO_SAMPLE_INSTANCE *spl,
       ALLEGRO_AUDIO_PROPERTY setting, unsigned long *val)
## al_get_sample_instance_ptr
    int al_get_sample_instance_ptr(const ALLEGRO_SAMPLE_INSTANCE *spl,
       ALLEGRO_AUDIO_PROPERTY setting, void **val)
## al_get_sample
    ALLEGRO_SAMPLE *al_get_sample(ALLEGRO_SAMPLE_INSTANCE *spl)
## al_set_sample_instance_bool
    int al_set_sample_instance_bool(ALLEGRO_SAMPLE_INSTANCE *spl,
       ALLEGRO_AUDIO_PROPERTY setting, bool val)
## al_set_sample_instance_enum
    int al_set_sample_instance_enum(ALLEGRO_SAMPLE_INSTANCE *spl,
       ALLEGRO_AUDIO_PROPERTY setting, int val)
## al_set_sample_instance_float
    int al_set_sample_instance_float(ALLEGRO_SAMPLE_INSTANCE *spl,
       ALLEGRO_AUDIO_PROPERTY setting, float val)
## al_set_sample_instance_long
    int al_set_sample_instance_long(ALLEGRO_SAMPLE_INSTANCE *spl,
       ALLEGRO_AUDIO_PROPERTY setting, unsigned long val)
## al_set_sample_instance_ptr
    int al_set_sample_instance_ptr(ALLEGRO_SAMPLE_INSTANCE *spl,
       ALLEGRO_AUDIO_PROPERTY setting, void *val)
## al_set_sample
    int al_set_sample(ALLEGRO_SAMPLE_INSTANCE *spl, ALLEGRO_SAMPLE *data)
Change the sample data that a sample plays. This can be quite an involved process. First, the sample is stopped if it is not already. Next, if data is NULL, the sample is detached from its parent (if any). If data is not NULL, the sample may be detached and reattached to its parent (if any). This is not necessary if the old sample data and new sample data have the same frequency, depth and channel configuration. Reattaching may not always succeed. On success, the sample remains stopped. The playback position and loop end points are reset to their default values. The loop mode remains unchanged. Returns zero on success, non-zero on failure. On failure, the sample will be stopped and detached from its parent. # Mixer functions ## al_create_mixer
    ALLEGRO_MIXER *al_create_mixer(unsigned long freq,
       ALLEGRO_AUDIO_DEPTH depth, ALLEGRO_CHANNEL_CONF chan_conf)
Creates a mixer stream, to attach sample streams or other mixers to. It will mix into a buffer at the requested frequency and channel count. Only floating point mixing is currently supported. ## al_destroy_mixer
    void al_destroy_mixer(ALLEGRO_MIXER *mixer)
Destroys the mixer stream. ## al_get_default_mixer
    ALLEGRO_MIXER *al_get_default_mixer(void)
Return the default mixer. ## al_set_default_mixer
    bool al_set_default_mixer(ALLEGRO_MIXER *mixer)
Sets the default mixer. All samples started with al_play_sample will be stopped. If you are using your own mixer, this should be called before al_reserve_samples. Returns true on success, false on error. ## al_restore_default_mixer
    bool al_restore_default_mixer(void)
Restores Allegro's default mixer. All samples started with al_play_sample will be stopped. Returns true on success, false on error. ## al_attach_mixer_to_mixer
    int al_attach_mixer_to_mixer(ALLEGRO_MIXER *mixer, ALLEGRO_MIXER *stream)
Attaches a mixer onto another mixer. The same rules as with al_attach_sample_to_mixer apply, with the added caveat that both mixers must be the same frequency. ## al_attach_sample_to_mixer
    int al_attach_sample_to_mixer(ALLEGRO_MIXER *mixer, ALLEGRO_SAMPLE_INSTANCE *spl)
## al_attach_stream_to_mixer
    int al_attach_stream_to_mixer(ALLEGRO_MIXER *mixer, ALLEGRO_STREAM *stream)
## al_get_mixer_bool
    int al_get_mixer_bool(const ALLEGRO_MIXER *mixer,
       ALLEGRO_AUDIO_PROPERTY setting, bool *val)
## al_get_mixer_enum
    int al_get_mixer_enum(const ALLEGRO_MIXER *mixer,
       ALLEGRO_AUDIO_PROPERTY setting, int *val)
## al_get_mixer_long
    int al_get_mixer_long(const ALLEGRO_MIXER *mixer,
       ALLEGRO_AUDIO_PROPERTY setting, unsigned long *val)
## al_set_mixer_bool
    int al_set_mixer_bool(ALLEGRO_MIXER *mixer,
       ALLEGRO_AUDIO_PROPERTY setting, bool val)
## al_set_mixer_enum
    int al_set_mixer_enum(ALLEGRO_MIXER *mixer,
       ALLEGRO_AUDIO_PROPERTY setting, int val)
## al_set_mixer_long
    int al_set_mixer_long(ALLEGRO_MIXER *mixer,
       ALLEGRO_AUDIO_PROPERTY setting, unsigned long val)
## al_set_mixer_postprocess_callback
    int al_set_mixer_postprocess_callback(ALLEGRO_MIXER *mixer,
       postprocess_callback_t postprocess_callback, void *pp_callback_userdata)
Sets a post-processing filter function that's called after the attached streams have been mixed. The buffer's format will be whatever the mixer was created with. The sample count and user-data pointer is also passed. # Stream functions ## al_create_stream
    ALLEGRO_STREAM *al_create_stream(size_t buffer_count, unsigned long samples,
       unsigned long freq, ALLEGRO_AUDIO_DEPTH depth,
       ALLEGRO_CHANNEL_CONF chan_conf)
Creates an audio stream, using the supplied values. The stream will be set to play by default. ## al_destroy_stream
    void al_destroy_stream(ALLEGRO_STREAM *stream)
## al_drain_stream
    void al_drain_stream(ALLEGRO_STREAM *stream)
Called by the user if sample data is not going to be passed to the stream any longer. This function waits for all pending buffers to finish playing. Stream's playing state will change to false. ## al_rewind_stream
    bool al_rewind_stream(ALLEGRO_STREAM *stream)
Set the streaming file playing position to the beginning. Returns true on success. Currently this can only be called on streams created with acodec's al_stream_from_file. ## al_get_stream_bool
    int al_get_stream_bool(const ALLEGRO_STREAM *stream,
       ALLEGRO_AUDIO_PROPERTY setting, bool *val)
## al_get_stream_enum
    int al_get_stream_enum(const ALLEGRO_STREAM *stream,
       ALLEGRO_AUDIO_PROPERTY setting, int *val)
## al_get_stream_float
    int al_get_stream_float(const ALLEGRO_STREAM *stream,
       ALLEGRO_AUDIO_PROPERTY setting, float *val)
## al_get_stream_long
    int al_get_stream_long(const ALLEGRO_STREAM *stream,
       ALLEGRO_AUDIO_PROPERTY setting, unsigned long *val)
## al_get_stream_ptr
    int al_get_stream_ptr(const ALLEGRO_STREAM *stream,
       ALLEGRO_AUDIO_PROPERTY setting, void **val)
## al_set_stream_bool
    int al_set_stream_bool(ALLEGRO_STREAM *stream,
       ALLEGRO_AUDIO_PROPERTY setting, bool val)
## al_set_stream_enum
    int al_set_stream_enum(ALLEGRO_STREAM *stream,
       ALLEGRO_AUDIO_PROPERTY setting, int val)
## al_set_stream_float
    int al_set_stream_float(ALLEGRO_STREAM *stream,
       ALLEGRO_AUDIO_PROPERTY setting, float val)
## al_set_stream_long
    int al_set_stream_long(ALLEGRO_STREAM *stream,
       ALLEGRO_AUDIO_PROPERTY setting, unsigned long val)
## al_set_stream_ptr
    int al_set_stream_ptr(ALLEGRO_STREAM *stream,
       ALLEGRO_AUDIO_PROPERTY setting, void *val)
## al_seek_stream
    bool al_seek_stream(ALLEGRO_STREAM *stream, double time)
Set the streaming file playing position to time. Returns true on success. Currently this can only be called on streams created with acodec's al_stream_from_file. ## al_get_stream_position
    double al_get_stream_position(ALLEGRO_STREAM *stream)
Return the position of the stream in seconds. Currently this can only be called on streams created with acodec's al_stream_from_file. ## al_get_stream_length
    double al_get_stream_length(ALLEGRO_STREAM *stream)
Return the position of the stream in seconds. Currently this can only be called on streams created with acodec's al_stream_from_file. ## al_set_stream_loop
    bool al_set_stream_loop(ALLEGRO_STREAM *stream, double start, double end)
Return the position of the stream in seconds. Currently this can only be called on streams created with acodec's al_stream_from_file.

Last updated: 2009-05-04 10:18:43 UTC