diff --git a/a5docs/trunk/acodec.html b/a5docs/trunk/acodec.html index 581baffb..6e73466f 100644 --- a/a5docs/trunk/acodec.html +++ b/a5docs/trunk/acodec.html @@ -186,7 +186,7 @@

Audio codecs addon

al_init_acodec_addon

bool al_init_acodec_addon(void)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/acodec/acodec.c#L21">Source Code

This function registers all the known audio file type handlers for al_load_sample, al_init_acodec_addon

Examples:

al_is_acodec_addon_initialized

bool al_is_acodec_addon_initialized(void)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/acodec/acodec.c#L99">Source Code

Returns true if the acodec addon is initialized, otherwise returns false.

@@ -234,13 +234,13 @@

al_init_acodec_addon

id="al_get_allegro_acodec_version">al_get_allegro_acodec_version
uint32_t al_get_allegro_acodec_version(void)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/acodec/acodec.c#L13">Source Code

Returns the (compiled) version of the addon, in the same format as al_get_allegro_version.

Allegro version 5.2.11 (GIT) - - Last updated: 2024-11-28 03:30:42 UTC + - Last updated: 2024-11-30 19:56:51 UTC

diff --git a/a5docs/trunk/audio.html b/a5docs/trunk/audio.html index 7adb8ad5..df5cf10e 100644 --- a/a5docs/trunk/audio.html +++ b/a5docs/trunk/audio.html @@ -559,7 +559,7 @@

Basic Audio

ALLEGRO_SAMPLE_ID

typedef struct ALLEGRO_SAMPLE_ID ALLEGRO_SAMPLE_ID;

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/allegro5/allegro_audio.h#L151">Source Code

An ALLEGRO_SAMPLE_ID represents a sample being played via al_play_sample. It can be used to @@ -570,12 +570,12 @@

ALLEGRO_SAMPLE_ID

Examples:

al_install_audio

bool al_install_audio(void)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/audio.c#L422">Source Code

Install the audio subsystem.

Returns true on success, false on failure.

@@ -593,16 +593,16 @@

al_install_audio

Examples:

al_uninstall_audio

void al_uninstall_audio(void)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/audio.c#L441">Source Code

Uninstalls the audio subsystem.

See also: al_uninstall_audio

Examples:

al_is_audio_installed

bool al_is_audio_installed(void)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/audio.c#L456">Source Code

Returns true if al_install_audio was called @@ -627,7 +627,7 @@

al_is_audio_installed

al_reserve_samples

bool al_reserve_samples(int reserve_samples)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_sample.c#L207">Source Code

Reserves a number of sample instances, attaching them to the default mixer. If no default mixer is set when this function is called, then it @@ -653,17 +653,17 @@

al_reserve_samples

Examples:

al_play_sample

bool al_play_sample(ALLEGRO_SAMPLE *spl, float gain, float pan, float speed,
    ALLEGRO_PLAYMODE loop, ALLEGRO_SAMPLE_ID *ret_id)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_sample.c#L342">Source Code

Plays a sample on one of the sample instances created by al_reserve_samples. Returns @@ -695,16 +695,16 @@

al_play_sample

Examples:

al_stop_sample

void al_stop_sample(ALLEGRO_SAMPLE_ID *spl_id)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_sample.c#L401">Source Code

Stop the sample started by al_play_sample.

@@ -713,16 +713,16 @@

al_stop_sample

Examples:

al_stop_samples

void al_stop_samples(void)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_sample.c#L451">Source Code

Stop all samples started by al_play_sample.

@@ -730,12 +730,12 @@

al_stop_samples

Examples:

al_lock_sample_id

ALLEGRO_SAMPLE_INSTANCE* al_lock_sample_id(ALLEGRO_SAMPLE_ID *spl_id)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_sample.c#L417">Source Code

Locks a ALLEGRO_SAMPLE_ID, returning the underlying al_lock_sample_id

Examples:

al_unlock_sample_id

void al_unlock_sample_id(ALLEGRO_SAMPLE_ID *spl_id)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_sample.c#L435">Source Code

Unlocks a ALLEGRO_SAMPLE_ID, allowing @@ -786,12 +786,12 @@

al_unlock_sample_id

Examples:

al_play_audio_stream

ALLEGRO_AUDIO_STREAM *al_play_audio_stream(const char *filename)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/audio_io.c#L410">Source Code

Loads and plays an audio file, streaming from disk as it is needed. This API can only play one audio stream at a time. This requires a @@ -818,12 +818,12 @@

al_play_audio_stream

Examples:

al_play_audio_stream_f

ALLEGRO_AUDIO_STREAM *al_play_audio_stream_f(ALLEGRO_FILE *fp, const char *ident)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/audio_io.c#L433">Source Code

Loads and plays an audio file from ALLEGRO_FILE stream, streaming it is @@ -856,7 +856,7 @@

Samples

ALLEGRO_SAMPLE

typedef struct ALLEGRO_SAMPLE ALLEGRO_SAMPLE;

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/allegro5/allegro_audio.h#L146">Source Code

An ALLEGRO_SAMPLE object stores the data necessary for playing pre-defined digital audio. It holds a user-specified PCM data buffer and @@ -868,18 +868,18 @@

ALLEGRO_SAMPLE

Examples:

al_create_sample

ALLEGRO_SAMPLE *al_create_sample(void *buf, unsigned int samples,
    unsigned int freq, ALLEGRO_AUDIO_DEPTH depth,
    ALLEGRO_CHANNEL_CONF chan_conf, bool free_buf)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_sample.c#L135">Source Code

Create a sample data structure from the supplied buffer. If free_buf is true then the buffer will be freed with al_create_sample

Examples:

al_load_sample

ALLEGRO_SAMPLE *al_load_sample(const char *filename)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/audio_io.c#L306">Source Code

Loads a few different audio file formats based on their extension.

@@ -937,16 +937,16 @@

al_load_sample

Examples:

al_load_sample_f

ALLEGRO_SAMPLE *al_load_sample_f(ALLEGRO_FILE* fp, const char *ident)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/audio_io.c#L336">Source Code

Loads an audio file from an ALLEGRO_FILE stream into an al_load_sample_f

al_save_sample

bool al_save_sample(const char *filename, ALLEGRO_SAMPLE *spl)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/audio_io.c#L457">Source Code

Writes a sample into a file. Currently, wav is the only supported format, and the extension must be “.wav”.

@@ -988,7 +988,7 @@

al_save_sample

al_save_sample_f

bool al_save_sample_f(ALLEGRO_FILE *fp, const char *ident, ALLEGRO_SAMPLE *spl)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/audio_io.c#L484">Source Code

Writes a sample into a ALLEGRO_FILE filestream. Currently, @@ -1006,7 +1006,7 @@

al_save_sample_f

al_destroy_sample

void al_destroy_sample(ALLEGRO_SAMPLE *spl)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_sample.c#L188">Source Code

Free the sample data structure. If it was created with the free_buf parameter set to true, then the buffer will be @@ -1021,16 +1021,16 @@

al_destroy_sample

Examples:

al_get_sample_channels

ALLEGRO_CHANNEL_CONF al_get_sample_channels(const ALLEGRO_SAMPLE *spl)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_sample.c#L494">Source Code

Return the channel configuration of the sample.

See also: al_get_sample_channels

al_get_sample_depth

ALLEGRO_AUDIO_DEPTH al_get_sample_depth(const ALLEGRO_SAMPLE *spl)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_sample.c#L484">Source Code

Return the audio depth of the sample.

See also: al_get_sample_depth

al_get_sample_frequency

unsigned int al_get_sample_frequency(const ALLEGRO_SAMPLE *spl)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_sample.c#L464">Source Code

Return the frequency (in Hz) of the sample.

See also: al_get_sample_frequency

al_get_sample_length

unsigned int al_get_sample_length(const ALLEGRO_SAMPLE *spl)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_sample.c#L474">Source Code

Return the length of the sample in sample values.

See also: al_get_sample_length

al_get_sample_data

void *al_get_sample_data(const ALLEGRO_SAMPLE *spl)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_sample.c#L504">Source Code

Return a pointer to the raw sample data.

See also: al_get_sample_data

Examples:

Advanced Audio

For more fine-grained control over audio output, here’s a short @@ -1182,7 +1182,7 @@

Sample instances

ALLEGRO_SAMPLE_INSTANCE

typedef struct ALLEGRO_SAMPLE_INSTANCE ALLEGRO_SAMPLE_INSTANCE;

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/allegro5/allegro_audio.h#L161">Source Code

An ALLEGRO_SAMPLE_INSTANCE object represents a playable instance of a predefined sound effect. It holds information about how the effect @@ -1202,16 +1202,16 @@

ALLEGRO_SAMPLE_INSTANCE

Examples:

al_create_sample_instance

ALLEGRO_SAMPLE_INSTANCE *al_create_sample_instance(ALLEGRO_SAMPLE *sample_data)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_instance.c#L152">Source Code

Creates a sample instance, using the supplied sample data. The instance must be attached to a mixer (or voice) in order to actually @@ -1223,16 +1223,16 @@

al_create_sample_instance

Examples:

al_destroy_sample_instance

void al_destroy_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_instance.c#L195">Source Code

Detaches the sample instance from anything it may be attached to and frees it (the sample data, i.e. its ALLEGRO_SAMPLE, is not @@ -1242,16 +1242,16 @@

al_destroy_sample_instance

Examples:

al_play_sample_instance

bool al_play_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_instance.c#L218">Source Code

Play the sample instance. Returns true on success, false on failure.

@@ -1260,16 +1260,16 @@

al_play_sample_instance

Examples:

al_stop_sample_instance

bool al_stop_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_instance.c#L228">Source Code

Stop an sample instance playing.

See also: al_stop_sample_instance

Examples:

al_get_sample_instance_channels

ALLEGRO_CHANNEL_CONF al_get_sample_instance_channels(
    const ALLEGRO_SAMPLE_INSTANCE *spl)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_instance.c#L324">Source Code

Return the channel configuration of the sample instance’s sample data.

@@ -1297,14 +1297,14 @@

al_stop_sample_instance

Examples:

al_get_sample_instance_depth

ALLEGRO_AUDIO_DEPTH al_get_sample_instance_depth(const ALLEGRO_SAMPLE_INSTANCE *spl)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_instance.c#L314">Source Code

Return the audio depth of the sample instance’s sample data.

See also: al_get_sample_instance_depth

Examples:

al_get_sample_instance_frequency

unsigned int al_get_sample_instance_frequency(const ALLEGRO_SAMPLE_INSTANCE *spl)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_instance.c#L238">Source Code

Return the frequency (in Hz) of the sample instance’s sample data.

Examples:

al_get_sample_instance_length

unsigned int al_get_sample_instance_length(const ALLEGRO_SAMPLE_INSTANCE *spl)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_instance.c#L248">Source Code

Return the length of the sample instance in sample values. This property may differ from the length of the instance’s sample data.

@@ -1342,16 +1342,16 @@

al_get_sample_instance_depth

Examples:

al_set_sample_instance_length

bool al_set_sample_instance_length(ALLEGRO_SAMPLE_INSTANCE *spl,
    unsigned int val)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_instance.c#L392">Source Code

Set the length of the sample instance in sample values. This can be used to play only parts of the underlying sample. Be careful not to @@ -1363,13 +1363,13 @@

al_get_sample_instance_depth

Examples:

al_get_sample_instance_position

unsigned int al_get_sample_instance_position(const ALLEGRO_SAMPLE_INSTANCE *spl)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_instance.c#L258">Source Code

Get the playback position of a sample instance.

See also: al_get_sample_instance_depth

Examples:

al_set_sample_instance_position

bool al_set_sample_instance_position(ALLEGRO_SAMPLE_INSTANCE *spl,
    unsigned int val)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_instance.c#L370">Source Code

Set the playback position of a sample instance.

Returns true on success, false on failure.

@@ -1393,14 +1393,14 @@

al_get_sample_instance_depth

Examples:

al_get_sample_instance_speed

float al_get_sample_instance_speed(const ALLEGRO_SAMPLE_INSTANCE *spl)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_instance.c#L273">Source Code

Return the relative playback speed of the sample instance.

See also: al_get_sample_instance_speed

al_set_sample_instance_speed

bool al_set_sample_instance_speed(ALLEGRO_SAMPLE_INSTANCE *spl, float val)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_instance.c#L411">Source Code

Set the relative playback speed of the sample instance. 1.0 means normal speed.

@@ -1419,14 +1419,14 @@

al_set_sample_instance_speed

Examples:

al_get_sample_instance_gain

float al_get_sample_instance_gain(const ALLEGRO_SAMPLE_INSTANCE *spl)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_instance.c#L283">Source Code

Return the playback gain of the sample instance.

See also: al_get_sample_instance_gain

Examples:

al_set_sample_instance_gain

bool al_set_sample_instance_gain(ALLEGRO_SAMPLE_INSTANCE *spl, float val)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_instance.c#L452">Source Code

Set the playback gain of the sample instance.

Returns true on success, false on failure. Will fail if the sample @@ -1449,16 +1449,16 @@

al_set_sample_instance_gain

Examples:

al_get_sample_instance_pan

float al_get_sample_instance_pan(const ALLEGRO_SAMPLE_INSTANCE *spl)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_instance.c#L293">Source Code

Get the pan value of the sample instance.

See also: al_get_sample_instance_pan

al_set_sample_instance_pan

bool al_set_sample_instance_pan(ALLEGRO_SAMPLE_INSTANCE *spl, float val)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_instance.c#L483">Source Code

Set the pan value on a sample instance. A value of -1.0 means to play the sample only through the left speaker; +1.0 means only through the @@ -1487,14 +1487,14 @@

al_set_sample_instance_pan

Examples:

al_get_sample_instance_time

float al_get_sample_instance_time(const ALLEGRO_SAMPLE_INSTANCE *spl)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_instance.c#L303">Source Code

Return the length of the sample instance in seconds, assuming a playback speed of 1.0.

@@ -1503,17 +1503,17 @@

al_get_sample_instance_time

Examples:

al_get_sample_instance_playmode

ALLEGRO_PLAYMODE al_get_sample_instance_playmode(const ALLEGRO_SAMPLE_INSTANCE *spl)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_instance.c#L335">Source Code

Return the playback mode of the sample instance.

See also: ALLEGRO_PLAYMODE, @@ -1524,7 +1524,7 @@

al_get_sample_instance_time

bool al_set_sample_instance_playmode(ALLEGRO_SAMPLE_INSTANCE *spl,
    ALLEGRO_PLAYMODE val)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_instance.c#L518">Source Code

Set the playback mode of the sample instance.

Returns true on success, false on failure.

@@ -1534,17 +1534,17 @@

al_get_sample_instance_time

Examples:

al_get_sample_instance_playing

bool al_get_sample_instance_playing(const ALLEGRO_SAMPLE_INSTANCE *spl)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_instance.c#L345">Source Code

Return true if the sample instance is in the playing state. This may be true even if the instance is not attached to anything.

@@ -1553,13 +1553,13 @@

al_get_sample_instance_time

Examples:

al_set_sample_instance_playing

bool al_set_sample_instance_playing(ALLEGRO_SAMPLE_INSTANCE *spl, bool val)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_instance.c#L547">Source Code

Change whether the sample instance is playing.

The instance does not need to be attached to anything (since: @@ -1570,15 +1570,15 @@

al_get_sample_instance_time

Examples:

al_get_sample_instance_attached

bool al_get_sample_instance_attached(const ALLEGRO_SAMPLE_INSTANCE *spl)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_instance.c#L360">Source Code

Return whether the sample instance is attached to something.

See also: al_get_sample_instance_time

al_detach_sample_instance

bool al_detach_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_instance.c#L575">Source Code

Detach the sample instance from whatever it’s attached to, if anything.

@@ -1604,12 +1604,12 @@

al_detach_sample_instance

Examples:

al_get_sample

ALLEGRO_SAMPLE *al_get_sample(ALLEGRO_SAMPLE_INSTANCE *spl)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_instance.c#L652">Source Code

Return the sample data that the sample instance plays.

Note this returns a pointer to an internal structure, not @@ -1624,16 +1624,16 @@

al_get_sample

Examples:

al_set_sample

bool al_set_sample(ALLEGRO_SAMPLE_INSTANCE *spl, ALLEGRO_SAMPLE *data)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_instance.c#L587">Source Code

Change the sample data that a sample instance plays. This can be quite an involved process.

@@ -1653,17 +1653,17 @@

al_set_sample

Examples:

al_set_sample_instance_channel_matrix

bool al_set_sample_instance_channel_matrix(ALLEGRO_SAMPLE_INSTANCE *spl, const float *matrix)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_instance.c#L662">Source Code

Set the matrix used to mix the channels coming from this instance into the mixer it is attached to. Normally Allegro derives the values of @@ -1695,13 +1695,13 @@

al_set_sample

Examples:

Audio streams

ALLEGRO_AUDIO_STREAM

typedef struct ALLEGRO_AUDIO_STREAM ALLEGRO_AUDIO_STREAM;

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/allegro5/allegro_audio.h#L166">Source Code

An ALLEGRO_AUDIO_STREAM object is used to stream generated audio to the sound device, in real-time. This is done by reading from a buffer, @@ -1756,18 +1756,18 @@

ALLEGRO_AUDIO_STREAM

Examples:

al_create_audio_stream

ALLEGRO_AUDIO_STREAM *al_create_audio_stream(size_t fragment_count,
    unsigned int frag_samples, unsigned int freq, ALLEGRO_AUDIO_DEPTH depth,
    ALLEGRO_CHANNEL_CONF chan_conf)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L49">Source Code

Creates an ALLEGRO_AUDIO_STREAM. The @@ -1821,17 +1821,17 @@

al_create_audio_stream

Examples:

al_load_audio_stream

ALLEGRO_AUDIO_STREAM *al_load_audio_stream(const char *filename,
    size_t buffer_count, unsigned int samples)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/audio_io.c#L357">Source Code

Loads an audio file from disk as it is needed.

Unlike regular streams, the one returned by this function need not be @@ -1855,17 +1855,17 @@

al_load_audio_stream

Examples:

al_load_audio_stream_f

ALLEGRO_AUDIO_STREAM *al_load_audio_stream_f(ALLEGRO_FILE* fp, const char *ident,
    size_t buffer_count, unsigned int samples)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/audio_io.c#L388">Source Code

Loads an audio file from ALLEGRO_FILE stream as it is @@ -1895,7 +1895,7 @@

al_load_audio_stream_f

al_destroy_audio_stream

void al_destroy_audio_stream(ALLEGRO_AUDIO_STREAM *stream)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L145">Source Code

Destroy an audio stream which was created with al_create_audio_stream or @@ -1910,18 +1910,18 @@

al_destroy_audio_stream

Examples:

al_get_audio_stream_event_source

ALLEGRO_EVENT_SOURCE *al_get_audio_stream_event_source(
    ALLEGRO_AUDIO_STREAM *stream)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L916">Source Code

Retrieve the associated event source.

See al_destroy_audio_stream

Examples:

al_drain_audio_stream

void al_drain_audio_stream(ALLEGRO_AUDIO_STREAM *stream)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L165">Source Code

You should call this to finalise an audio stream that you will no longer be feeding, to wait for all pending buffers to finish playing. @@ -1951,16 +1951,16 @@

al_drain_audio_stream

Examples:

al_rewind_audio_stream

bool al_rewind_audio_stream(ALLEGRO_AUDIO_STREAM *stream)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L824">Source Code

Set the streaming file playing position to the beginning. Returns true on success. Currently this can only be called on streams created @@ -1972,20 +1972,20 @@

al_rewind_audio_stream

Examples:

al_get_audio_stream_frequency

unsigned int al_get_audio_stream_frequency(const ALLEGRO_AUDIO_STREAM *stream)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L184">Source Code

Return the stream frequency (in Hz).

al_get_audio_stream_channels

ALLEGRO_CHANNEL_CONF al_get_audio_stream_channels(
    const ALLEGRO_AUDIO_STREAM *stream)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L258">Source Code

Return the stream channel configuration.

See also: al_get_audio_stream_depth

ALLEGRO_AUDIO_DEPTH al_get_audio_stream_depth(
    const ALLEGRO_AUDIO_STREAM *stream)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L269">Source Code

Return the stream audio depth.

See also: al_get_audio_stream_depth

al_get_audio_stream_length

unsigned int al_get_audio_stream_length(const ALLEGRO_AUDIO_STREAM *stream)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L194">Source Code

Return the stream length in samples.

Examples:

al_get_audio_stream_speed

float al_get_audio_stream_speed(const ALLEGRO_AUDIO_STREAM *stream)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L228">Source Code

Return the relative playback speed of the stream.

See also: al_get_audio_stream_speed

al_set_audio_stream_speed

bool al_set_audio_stream_speed(ALLEGRO_AUDIO_STREAM *stream, float val)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L360">Source Code

Set the relative playback speed of the stream. 1.0 means normal speed.

@@ -2032,7 +2032,7 @@

al_set_audio_stream_speed

al_get_audio_stream_gain

float al_get_audio_stream_gain(const ALLEGRO_AUDIO_STREAM *stream)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L238">Source Code

Return the playback gain of the stream.

See also: al_get_audio_stream_gain

Examples:

al_set_audio_stream_gain

bool al_set_audio_stream_gain(ALLEGRO_AUDIO_STREAM *stream, float val)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L397">Source Code

Set the playback gain of the stream.

Returns true on success, false on failure. Will fail if the audio @@ -2055,14 +2055,14 @@

al_set_audio_stream_gain

Examples:

al_get_audio_stream_pan

float al_get_audio_stream_pan(const ALLEGRO_AUDIO_STREAM *stream)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L248">Source Code

Get the pan value of the stream.

See also: al_get_audio_stream_pan

al_set_audio_stream_pan

bool al_set_audio_stream_pan(ALLEGRO_AUDIO_STREAM *stream, float val)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L427">Source Code

Set the pan value on an audio stream. A value of -1.0 means to play the stream only through the left speaker; +1.0 means only through the @@ -2087,12 +2087,12 @@

al_set_audio_stream_pan

Examples:

al_get_audio_stream_playing

bool al_get_audio_stream_playing(const ALLEGRO_AUDIO_STREAM *stream)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L291">Source Code

Return true if the stream is playing.

See also: al_get_audio_stream_playing

Examples:

al_set_audio_stream_playing

bool al_set_audio_stream_playing(ALLEGRO_AUDIO_STREAM *stream, bool val)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L541">Source Code

Change whether the stream is playing.

Returns true on success, false on failure.

@@ -2118,17 +2118,17 @@

al_set_audio_stream_playing

Examples:

al_get_audio_stream_playmode

ALLEGRO_PLAYMODE al_get_audio_stream_playmode(
    const ALLEGRO_AUDIO_STREAM *stream)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L280">Source Code

Return the playback mode of the stream.

See also: ALLEGRO_PLAYMODE, @@ -2138,7 +2138,7 @@

al_set_audio_stream_playmode

bool al_set_audio_stream_playmode(ALLEGRO_AUDIO_STREAM *stream,
    ALLEGRO_PLAYMODE val)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L461">Source Code

Set the playback mode of the stream.

Returns true on success, false on failure.

@@ -2148,16 +2148,16 @@

al_set_audio_stream_playmode

Examples:

al_get_audio_stream_attached

bool al_get_audio_stream_attached(const ALLEGRO_AUDIO_STREAM *stream)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L301">Source Code

Return whether the stream is attached to something.

See also: al_get_audio_stream_attached

al_detach_audio_stream

bool al_detach_audio_stream(ALLEGRO_AUDIO_STREAM *stream)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L577">Source Code

Detach the stream from whatever it’s attached to, if anything.

See also: al_detach_audio_stream

Examples:

al_get_audio_stream_played_samples

uint64_t al_get_audio_stream_played_samples(const ALLEGRO_AUDIO_STREAM *stream)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L310">Source Code

Get the number of samples consumed by the parent since the audio stream was started.

@@ -2195,7 +2195,7 @@

al_detach_audio_stream

al_get_audio_stream_fragment

void *al_get_audio_stream_fragment(const ALLEGRO_AUDIO_STREAM *stream)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L331">Source Code

When using Allegro’s audio streaming, you will use this function to continuously provide new sample data to a stream.

@@ -2232,16 +2232,16 @@

al_get_audio_stream_fragment

Examples:

al_set_audio_stream_fragment

bool al_set_audio_stream_fragment(ALLEGRO_AUDIO_STREAM *stream, void *val)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L589">Source Code

This function needs to be called for every successful call of al_get_audio_stream_fragment @@ -2252,17 +2252,17 @@

al_set_audio_stream_fragment

Examples:

al_get_audio_stream_fragments

unsigned int al_get_audio_stream_fragments(const ALLEGRO_AUDIO_STREAM *stream)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L204">Source Code

Returns the number of fragments this stream uses. This is the same value as passed to al_set_audio_stream_fragment

unsigned int al_get_available_audio_stream_fragments(
    const ALLEGRO_AUDIO_STREAM *stream)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L214">Source Code

Returns the number of available fragments in the stream, that is, fragments which are not currently filled with data for playback.

@@ -2286,7 +2286,7 @@

al_set_audio_stream_fragment

al_seek_audio_stream_secs

bool al_seek_audio_stream_secs(ALLEGRO_AUDIO_STREAM *stream, double time)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L842">Source Code

Set the streaming file playing position to time. Returns true on success. Currently this can only be called on streams created with al_seek_audio_stream_secs

Examples:

al_get_audio_stream_position_secs

double al_get_audio_stream_position_secs(ALLEGRO_AUDIO_STREAM *stream)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L860">Source Code

Return the position of the stream in seconds. Currently this can only be called on streams created with al_seek_audio_stream_secs

Examples:

al_get_audio_stream_length_secs

double al_get_audio_stream_length_secs(ALLEGRO_AUDIO_STREAM *stream)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L877">Source Code

Return the length of the stream in seconds, if known. Otherwise returns zero.

@@ -2343,14 +2343,14 @@

al_seek_audio_stream_secs

Examples:

al_set_audio_stream_loop_secs

bool al_set_audio_stream_loop_secs(ALLEGRO_AUDIO_STREAM *stream,
    double start, double end)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_stream.c#L894">Source Code

Sets the loop points for the stream in seconds. Currently this can only be called on streams created with al_seek_audio_stream_secs

Examples:

al_set_audio_stream_channel_matrix

@@ -2380,7 +2380,7 @@

al_register_sample_loader

bool al_register_sample_loader(const char *ext,
    ALLEGRO_SAMPLE *(*loader)(const char *filename))

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/audio_io.c#L115">Source Code

Register a handler for al_load_sample. The given function @@ -2400,7 +2400,7 @@

al_register_sample_loader_f

bool al_register_sample_loader_f(const char *ext,
    ALLEGRO_SAMPLE *(*loader)(ALLEGRO_FILE* fp))

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/audio_io.c#L142">Source Code

Register a handler for al_load_sample_f. The given @@ -2418,7 +2418,7 @@

al_register_sample_saver

bool al_register_sample_saver(const char *ext,
    bool (*saver)(const char *filename, ALLEGRO_SAMPLE *spl))

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/audio_io.c#L169">Source Code

Register a handler for al_save_sample. The given function @@ -2439,7 +2439,7 @@

al_register_sample_saver_f

class="sourceCode c">bool al_register_sample_saver_f(const char *ext, bool (*saver)(ALLEGRO_FILE* fp, ALLEGRO_SAMPLE *spl))

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/audio_io.c#L196">Source Code

Register a handler for al_save_sample_f. The given @@ -2460,7 +2460,7 @@

al_register_sample_saver_f

ALLEGRO_AUDIO_STREAM *(*stream_loader)(const char *filename, size_t buffer_count, unsigned int samples))

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/audio_io.c#L223">Source Code

Register a handler for al_load_audio_stream and al_register_sample_saver_f ALLEGRO_AUDIO_STREAM *(*stream_loader)(ALLEGRO_FILE* fp, size_t buffer_count, unsigned int samples))

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/audio_io.c#L251">Source Code

Register a handler for al_load_audio_stream_f and @@ -2503,7 +2503,7 @@

al_register_sample_saver_f

class="sourceCode c">bool al_register_sample_identifier(const char *ext, bool (*identifier)(ALLEGRO_FILE* fp))

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/audio_io.c#L279">Source Code

Register an identify handler for al_identify_sample. The given @@ -2528,7 +2528,7 @@

al_identify_sample

char const *al_identify_sample(char const *filename)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/audio_io.c#L516">Source Code

This works exactly as al_identify_sample_f but you @@ -2544,7 +2544,7 @@

al_identify_sample_f

char const *al_identify_sample_f(ALLEGRO_FILE *fp)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/audio_io.c#L505">Source Code

Tries to guess the audio file type of the open ALLEGRO_FILE by reading the first few bytes. By default Allegro cannot recognize any @@ -2574,7 +2574,7 @@

ALLEGRO_AUDIO_RECORDER

typedef struct ALLEGRO_AUDIO_RECORDER ALLEGRO_AUDIO_RECORDER;

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/allegro5/allegro_audio.h#L186">Source Code

An opaque datatype that represents a recording device.

Since: 5.1.1

@@ -2585,15 +2585,15 @@

ALLEGRO_AUDIO_RECORDER

Examples:

ALLEGRO_AUDIO_RECORDER_EVENT

typedef struct ALLEGRO_AUDIO_RECORDER_EVENT ALLEGRO_AUDIO_RECORDER_EVENT;

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/allegro5/allegro_audio.h#L58">Source Code

Structure that holds the audio recorder event data. Every event type will contain:

@@ -2615,9 +2615,9 @@

ALLEGRO_AUDIO_RECORDER_EVENT

Examples:

al_create_audio_recorder

al_create_audio_recorder
    unsigned int samples, unsigned int frequency,
    ALLEGRO_AUDIO_DEPTH depth, ALLEGRO_CHANNEL_CONF chan_conf)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/recorder.c#L18">Source Code

Creates an audio recorder using the system’s default recording device. (So if the returned device does not work, try updating the @@ -2662,15 +2662,15 @@

al_create_audio_recorder

Examples:

al_start_audio_recorder

bool al_start_audio_recorder(ALLEGRO_AUDIO_RECORDER *r)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/recorder.c#L89">Source Code

Begin recording into the fragment buffer. Once a complete fragment has been captured (as specified in al_start_audio_recorder

Examples:

al_stop_audio_recorder

void al_stop_audio_recorder(ALLEGRO_AUDIO_RECORDER *r)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/recorder.c#L103">Source Code

Stop capturing audio data. Note that the audio recorder is still active and consuming resources, so if you are finished recording you @@ -2715,7 +2715,7 @@

al_stop_audio_recorder

bool al_is_audio_recorder_recording(ALLEGRO_AUDIO_RECORDER *r)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/recorder.c#L115">Source Code

Returns true if the audio recorder is currently capturing data and generating events.

@@ -2728,7 +2728,7 @@

al_get_audio_recorder_event

ALLEGRO_AUDIO_RECORDER_EVENT *al_get_audio_recorder_event(ALLEGRO_EVENT *event)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/recorder.c#L128">Source Code

Returns the event as an ALLEGRO_AUDIO_RECORDER_EVENT.

@@ -2740,16 +2740,16 @@

al_get_audio_recorder_event

Examples:

al_get_audio_recorder_event_source

ALLEGRO_EVENT_SOURCE *al_get_audio_recorder_event_source(ALLEGRO_AUDIO_RECORDER *r)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/recorder.c#L136">Source Code

Returns the event source for the recorder that generates the various recording events.

@@ -2761,15 +2761,15 @@

al_get_audio_recorder_event

Examples:

al_destroy_audio_recorder

void al_destroy_audio_recorder(ALLEGRO_AUDIO_RECORDER *r)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/recorder.c#L143">Source Code

Destroys the audio recorder and frees all resources associated with it. It is safe to destroy a recorder that is recording.

@@ -2783,29 +2783,29 @@

al_destroy_audio_recorder

Examples:

Audio devices

ALLEGRO_AUDIO_DEVICE

typedef struct ALLEGRO_AUDIO_DEVICE ALLEGRO_AUDIO_DEVICE;

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/allegro5/allegro_audio.h#L180">Source Code

An opaque datatype that represents an audio device.

Examples:

al_get_num_audio_output_devices

int al_get_num_audio_output_devices()

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/audio.c#L201">Source Code

Get the number of available audio output devices on the system.

Since: 5.2.8

@@ -2813,40 +2813,40 @@

ALLEGRO_AUDIO_DEVICE

Examples:

al_get_audio_output_device

const ALLEGRO_AUDIO_DEVICE* al_get_audio_output_device(int index)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/audio.c#L218">Source Code

Get the output audio device of the specified index.

Since: 5.2.8

Examples:

al_get_audio_device_name

const char* al_get_audio_device_name(const ALLEGRO_AUDIO_DEVICE * device)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/audio.c#L238">Source Code

Get the user friendly display name of the device.

Since: 5.2.8

Examples:

Voices

ALLEGRO_VOICE

typedef struct ALLEGRO_VOICE ALLEGRO_VOICE;

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/allegro5/allegro_audio.h#L176">Source Code

A voice represents an audio device on the system, which may be a real device, or an abstract device provided by the operating system. To play @@ -2858,18 +2858,18 @@

ALLEGRO_VOICE

Examples:

al_create_voice

ALLEGRO_VOICE *al_create_voice(unsigned int freq,
    ALLEGRO_AUDIO_DEPTH depth, ALLEGRO_CHANNEL_CONF chan_conf)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_voice.c#L65">Source Code

Creates a voice structure and allocates a voice from the digital sound driver. The passed frequency (in Hz), sample format and channel @@ -2890,17 +2890,17 @@

al_create_voice

Examples:

al_destroy_voice

void al_destroy_voice(ALLEGRO_VOICE *voice)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_voice.c#L106">Source Code

Destroys the voice and deallocates it from the digital driver. Does nothing if the voice is NULL.

@@ -2909,17 +2909,17 @@

al_destroy_voice

Examples:

al_detach_voice

void al_detach_voice(ALLEGRO_VOICE *voice)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_voice.c#L370">Source Code

Detaches the mixer, sample instance or audio stream from the voice.

@@ -2935,7 +2935,7 @@

al_detach_voice

class="sourceCode c">bool al_attach_audio_stream_to_voice(ALLEGRO_AUDIO_STREAM *stream, ALLEGRO_VOICE *voice)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_voice.c#L251">Source Code

Attaches an audio stream to a voice. The same rules as al_attach_sample_instance_to_voice @@ -2953,15 +2953,15 @@

al_detach_voice

Examples:

al_attach_mixer_to_voice

bool al_attach_mixer_to_voice(ALLEGRO_MIXER *mixer, ALLEGRO_VOICE *voice)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_voice.c#L319">Source Code

Attaches a mixer to a voice. It must have the same frequency and channel configuration, but the depth may be different.

@@ -2972,11 +2972,11 @@

al_attach_mixer_to_voice

Examples:

al_attach_sample_instance_to_voice

@@ -2984,7 +2984,7 @@

al_attach_mixer_to_voice

class="sourceCode c">bool al_attach_sample_instance_to_voice(ALLEGRO_SAMPLE_INSTANCE *spl, ALLEGRO_VOICE *voice)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_voice.c#L126">Source Code

Attaches a sample instance to a voice, and allows it to play. The instance’s gain and loop mode will be ignored, and it must have the same @@ -3000,22 +3000,22 @@

al_attach_mixer_to_voice

Examples:

al_get_voice_frequency

unsigned int al_get_voice_frequency(const ALLEGRO_VOICE *voice)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_voice.c#L404">Source Code

Return the frequency of the voice (in Hz), e.g. 44100.

al_get_voice_channels

ALLEGRO_CHANNEL_CONF al_get_voice_channels(const ALLEGRO_VOICE *voice)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_voice.c#L432">Source Code

Return the channel configuration of the voice.

See also: al_get_voice_depth

ALLEGRO_AUDIO_DEPTH al_get_voice_depth(const ALLEGRO_VOICE *voice)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_voice.c#L442">Source Code

Return the audio depth of the voice.

See also: al_get_voice_playing

bool al_get_voice_playing(const ALLEGRO_VOICE *voice)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_voice.c#L452">Source Code

Return true if the voice is currently playing.

See also: al_get_voice_playing

Examples:

al_set_voice_playing

bool al_set_voice_playing(ALLEGRO_VOICE *voice, bool val)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_voice.c#L497">Source Code

Change whether a voice is playing or not. This can only work if the voice has a non-streaming object attached to it, e.g. a sample instance. @@ -3058,13 +3058,13 @@

al_set_voice_playing

Examples:

al_get_voice_position

unsigned int al_get_voice_position(const ALLEGRO_VOICE *voice)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_voice.c#L414">Source Code

When the voice has a non-streaming object attached to it, e.g. a sample, returns the voice’s current sample position. Otherwise, returns @@ -3075,7 +3075,7 @@

al_set_voice_position

bool al_set_voice_position(ALLEGRO_VOICE *voice, unsigned int val)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_voice.c#L478">Source Code

Set the voice position. This can only work if the voice has a non-streaming object attached to it, e.g. a sample instance.

@@ -3086,7 +3086,7 @@

al_voice_has_attachments

bool al_voice_has_attachments(const ALLEGRO_VOICE* voice)

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/kcm_voice.c#L469">Source Code

Returns true if the voice has something attached to it.

See also: ALLEGRO_MIXER

typedef struct ALLEGRO_MIXER ALLEGRO_MIXER;

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/allegro5/allegro_audio.h#L171">Source Code

A mixer mixes together attached streams into a single buffer. In the process, it converts channel configurations, sample frequencies and @@ -3116,17 +3116,17 @@

ALLEGRO_MIXER

Examples:

ALLEGRO_MIXER_QUALITY

enum ALLEGRO_MIXER_QUALITY

Source +href="https://github.com/liballeg/allegro5/blob/77c905b1d3b5359cb38401bf6819848300230009/addons/audio/allegro5/allegro_audio.h#L132">Source Code