--- /srv/reproducible-results/rbuild-debian/r-b-build.aqGUUDhu/b1/allegro5_5.2.10.1+dfsg-1_i386.changes
+++ /srv/reproducible-results/rbuild-debian/r-b-build.aqGUUDhu/b2/allegro5_5.2.10.1+dfsg-1_i386.changes
├── Files
│ @@ -1,9 +1,9 @@
│
│ - 60716dc8230050d46954996d8be821ff 1400540 doc optional allegro5-doc_5.2.10.1+dfsg-1_all.deb
│ + 5fcf23c4133debf74eaae9f5bb89baba 1408704 doc optional allegro5-doc_5.2.10.1+dfsg-1_all.deb
│ 1092523e273263426abe3153aa510aaa 19380 libdevel optional liballegro-acodec5-dev_5.2.10.1+dfsg-1_i386.deb
│ ce22528f045b9e931b7a602d0e19cc48 53724 debug optional liballegro-acodec5.2t64-dbgsym_5.2.10.1+dfsg-1_i386.deb
│ f85662f6349ee07110aea85ba66f3830 40676 libs optional liballegro-acodec5.2t64_5.2.10.1+dfsg-1_i386.deb
│ 53ff3b0fad5f7bb46d71af2356ed3131 22156 libdevel optional liballegro-audio5-dev_5.2.10.1+dfsg-1_i386.deb
│ 075b7dd654a05f98fbdbdefda5bf65e0 91664 debug optional liballegro-audio5.2t64-dbgsym_5.2.10.1+dfsg-1_i386.deb
│ 54be11ae91720ce3eadbb2ec1529fbe8 64308 libs optional liballegro-audio5.2t64_5.2.10.1+dfsg-1_i386.deb
│ 4dcd9560aea0bf0cb8720646b820ae5c 20432 libdevel optional liballegro-dialog5-dev_5.2.10.1+dfsg-1_i386.deb
├── allegro5-doc_5.2.10.1+dfsg-1_all.deb
│ ├── file list
│ │ @@ -1,3 +1,3 @@
│ │ -rw-r--r-- 0 0 0 4 2025-01-09 13:52:42.000000 debian-binary
│ │ --rw-r--r-- 0 0 0 31656 2025-01-09 13:52:42.000000 control.tar.xz
│ │ --rw-r--r-- 0 0 0 1368692 2025-01-09 13:52:42.000000 data.tar.xz
│ │ +-rw-r--r-- 0 0 0 31692 2025-01-09 13:52:42.000000 control.tar.xz
│ │ +-rw-r--r-- 0 0 0 1376820 2025-01-09 13:52:42.000000 data.tar.xz
│ ├── control.tar.xz
│ │ ├── control.tar
│ │ │ ├── ./control
│ │ │ │ @@ -1,13 +1,13 @@
│ │ │ │ Package: allegro5-doc
│ │ │ │ Source: allegro5
│ │ │ │ Version: 2:5.2.10.1+dfsg-1
│ │ │ │ Architecture: all
│ │ │ │ Maintainer: Debian Games Team These functions are declared in the following header file. Link with
│ │ │ │ allegro_acodec. This function registers all the known audio file type handlers for al_load_sample, al_save_sample, al_load_audio_stream,
│ │ │ │ @@ -220,15 +221,16 @@
│ │ │ │ Returns true if the acodec addon is initialized, otherwise returns
│ │ │ │ false. Since: 5.2.6 If you want to play large audio files (e.g. background music) without
│ │ │ │ loading the whole file at once you can use al_play_audio_stream (after
│ │ │ │ calling al_reserve_samples).
│ │ │ │ This will load and play an 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. The underlying
│ │ │ │ @@ -570,15 +571,16 @@
│ │ │ │ href="audio.html#al_lock_sample_id">al_lock_sample_id. Examples: Install the audio subsystem. Returns true on success, false on failure. Note: most users will call ex_audio_devices.c
│ │ │ │ Uninstalls the audio subsystem. See also: al_install_audio Examples: Returns true if al_install_audio was called
│ │ │ │ previously and returned successfully. 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
│ │ │ │ will create one and attach it to the default voice. If no default voice
│ │ │ │ has been set, it, too, will be created. Plays a sample on one of the sample instances created by al_reserve_samples. Returns
│ │ │ │ true on success, false on failure. Playback may fail because all the
│ │ │ │ reserved sample instances are currently used. Stop the sample started by al_play_sample. See also: al_stop_samples Stop all samples started by al_play_sample. See also: al_stop_sample Examples: Locks a ALLEGRO_SAMPLE_ID,
│ │ │ │ returning the underlying ALLEGRO_SAMPLE_INSTANCE.
│ │ │ │ This allows you to adjust the various properties of the instance (such
│ │ │ │ @@ -760,15 +770,16 @@
│ │ │ │ Examples: Unlocks a ALLEGRO_SAMPLE_ID, allowing
│ │ │ │ future calls to al_play_sample
│ │ │ │ to reuse it if possible. Note that after the id is unlocked, the
│ │ │ │ Examples: 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
│ │ │ │ default mixer to be set, which is typically done via al_reserve_samples, but can
│ │ │ │ @@ -818,15 +830,16 @@
│ │ │ │
│ │ │ │ Examples: Loads and plays an audio file from ALLEGRO_FILE stream, streaming it is
│ │ │ │ needed. This API can only play one audio stream at a time. This requires
│ │ │ │ a default mixer to be set, which is typically done via Since: 5.2.8 Unstable
│ │ │ │ API: New API. An ALLEGRO_SAMPLE object stores the data necessary for playing
│ │ │ │ pre-defined digital audio. It holds a user-specified PCM data buffer and
│ │ │ │ information about its format (data length, depth, frequency, channel
│ │ │ │ configuration). You can have the same ALLEGRO_SAMPLE playing multiple
│ │ │ │ @@ -874,15 +888,18 @@
│ │ │ │ href="https://github.com/liballeg/allegro5/blob/master/examples/ex_acodec_multi.c#L21">ex_acodec_multi.c Create a sample data structure from the supplied buffer. If
│ │ │ │ Loads a few different audio file formats based on their
│ │ │ │ extension. Note that this stores the entire file in memory at once, which may be
│ │ │ │ time consuming. To read the file as it is needed, use ex_acodec_multi.c
│ │ │ │ Loads an audio file from an ALLEGRO_FILE stream into an ALLEGRO_SAMPLE. The file type is
│ │ │ │ determined by the passed ‘ident’ parameter, which is a file name
│ │ │ │ @@ -966,15 +985,16 @@
│ │ │ │ file formats by default. You must use the allegro_acodec addon, or
│ │ │ │ register your own format handler. See also: al_register_sample_loader_f,
│ │ │ │ al_init_acodec_addon Writes a sample into a file. Currently, wav is the only supported
│ │ │ │ format, and the extension must be “.wav”. Returns true on success, false on error.#include <allegro5/allegro_acodec.h>
al_init_acodec_addon
│ │ │ │ -bool al_init_acodec_addon(void)
bool al_init_acodec_addon(void)
│ │ │ │ +bool al_init_acodec_addon(void)
al_is_acodec_addon_initialized
│ │ │ │ -bool al_is_acodec_addon_initialized(void)
bool al_is_acodec_addon_initialized(void)
│ │ │ │ +bool al_is_acodec_addon_initialized(void)
│ │ │ │ │ ************ aall__iinniitt__aaccooddeecc__aaddddoonn ************
│ │ │ │ │ bool al_init_acodec_addon(void)
│ │ │ │ │ +bool al_init_acodec_addon(void)
│ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e
│ │ │ │ │ This function registers all the known audio file type handlers for
│ │ │ │ │ _a_l___l_o_a_d___s_a_m_p_l_e, _a_l___s_a_v_e___s_a_m_p_l_e, _a_l___l_o_a_d___a_u_d_i_o___s_t_r_e_a_m, etc.
│ │ │ │ │ Depending on what libraries are available, the full set of recognised
│ │ │ │ │ extensions is: .wav, .flac, .ogg, .opus, .it, .mod, .s3m, .xm, .voc.
│ │ │ │ │ LLiimmiittaattiioonnss::
│ │ │ │ │ * Saving is only supported for wav files.
│ │ │ │ │ @@ -70,14 +71,15 @@
│ │ │ │ │ Return true on success.
│ │ │ │ │ Examples:
│ │ │ │ │ * _e_x___s_t_r_e_a_m___f_i_l_e_._c
│ │ │ │ │ * _e_x___a_c_o_d_e_c___m_u_l_t_i_._c
│ │ │ │ │ * _e_x___k_c_m___d_i_r_e_c_t_._c
│ │ │ │ │ ************ aall__iiss__aaccooddeecc__aaddddoonn__iinniittiiaalliizzeedd ************
│ │ │ │ │ bool al_is_acodec_addon_initialized(void)
│ │ │ │ │ +bool al_is_acodec_addon_initialized(void)
│ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e
│ │ │ │ │ Returns true if the acodec addon is initialized, otherwise returns false.
│ │ │ │ │ Since: 5.2.6
│ │ │ │ │ ************ aall__ggeett__aalllleeggrroo__aaccooddeecc__vveerrssiioonn ************
│ │ │ │ │ uint32_t al_get_allegro_acodec_version(void)
│ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e
│ │ │ │ │ Returns the (compiled) version of the addon, in the same format as
│ │ │ ├── ./usr/share/doc/allegro5-doc/refman/audio.html
│ │ │ │ @@ -554,15 +554,16 @@
│ │ │ │
ALLEGRO_AUDIO_STREAM
. Note that
│ │ │ │ the basic API only supports one such audio stream playing at once.ALLEGRO_SAMPLE_ID
│ │ │ │ -typedef struct ALLEGRO_SAMPLE_ID ALLEGRO_SAMPLE_ID;
typedef struct ALLEGRO_SAMPLE_ID ALLEGRO_SAMPLE_ID;
│ │ │ │ +typedef struct ALLEGRO_SAMPLE_ID ALLEGRO_SAMPLE_ID;
│ │ │ │
│ │ │ │ al_install_audio
│ │ │ │ -bool al_install_audio(void)
bool al_install_audio(void)
│ │ │ │ +bool al_install_audio(void)
│ │ │ │
│ │ │ │ al_uninstall_audio
│ │ │ │ -void al_uninstall_audio(void)
void al_uninstall_audio(void)
│ │ │ │ +void al_uninstall_audio(void)
al_is_audio_installed
│ │ │ │ -bool al_is_audio_installed(void)
bool al_is_audio_installed(void)
│ │ │ │ +bool al_is_audio_installed(void)
al_reserve_samples
│ │ │ │ -bool al_reserve_samples(int reserve_samples)
bool al_reserve_samples(int reserve_samples)
│ │ │ │ +bool al_reserve_samples(int reserve_samples)
al_play_sample
│ │ │ │ bool al_play_sample(ALLEGRO_SAMPLE *spl, float gain, float pan, float speed,
│ │ │ │ -, ALLEGRO_SAMPLE_ID *ret_id) ALLEGRO_PLAYMODE loop
al_stop_sample
│ │ │ │ -void al_stop_sample(ALLEGRO_SAMPLE_ID *spl_id)
void al_stop_sample(ALLEGRO_SAMPLE_ID *spl_id)
│ │ │ │ +void al_stop_sample(ALLEGRO_SAMPLE_ID *spl_id)
al_stop_samples
│ │ │ │ -void al_stop_samples(void)
void al_stop_samples(void)
│ │ │ │ +void al_stop_samples(void)
│ │ │ │
│ │ │ │ al_lock_sample_id
│ │ │ │ -* al_lock_sample_id(ALLEGRO_SAMPLE_ID *spl_id) ALLEGRO_SAMPLE_INSTANCE
* al_lock_sample_id(ALLEGRO_SAMPLE_ID *spl_id)
│ │ │ │ + ALLEGRO_SAMPLE_INSTANCE* al_lock_sample_id(ALLEGRO_SAMPLE_ID *spl_id) ALLEGRO_SAMPLE_INSTANCE
│ │ │ │
│ │ │ │ al_unlock_sample_id
│ │ │ │ -void al_unlock_sample_id(ALLEGRO_SAMPLE_ID *spl_id)
void al_unlock_sample_id(ALLEGRO_SAMPLE_ID *spl_id)
│ │ │ │ +void al_unlock_sample_id(ALLEGRO_SAMPLE_ID *spl_id)
│ │ │ │
│ │ │ │ al_play_audio_stream
│ │ │ │ -*al_play_audio_stream(const char *filename) ALLEGRO_AUDIO_STREAM
*al_play_audio_stream(const char *filename)
│ │ │ │ + ALLEGRO_AUDIO_STREAM *al_play_audio_stream(const char *filename) ALLEGRO_AUDIO_STREAM
│ │ │ │
│ │ │ │ al_play_audio_stream_f
│ │ │ │ -*al_play_audio_stream_f(ALLEGRO_FILE *fp, const char *ident) ALLEGRO_AUDIO_STREAM
*al_play_audio_stream_f(ALLEGRO_FILE *fp, const char *ident)
│ │ │ │ + ALLEGRO_AUDIO_STREAM *al_play_audio_stream_f(ALLEGRO_FILE *fp, const char *ident) ALLEGRO_AUDIO_STREAM
│ │ │ │
│ │ │ │ Samples
│ │ │ │ ALLEGRO_SAMPLE
│ │ │ │ -typedef struct ALLEGRO_SAMPLE ALLEGRO_SAMPLE;
typedef struct ALLEGRO_SAMPLE ALLEGRO_SAMPLE;
│ │ │ │ +typedef struct ALLEGRO_SAMPLE ALLEGRO_SAMPLE;
al_create_sample
│ │ │ │ *al_create_sample(void *buf, unsigned int samples,
│ │ │ │ ALLEGRO_SAMPLE unsigned int freq, ALLEGRO_AUDIO_DEPTH depth,
│ │ │ │ - , bool free_buf) ALLEGRO_CHANNEL_CONF chan_conf
free_buf
is true then the buffer will be freed with al_free when the sample data structure is
│ │ │ │ destroyed. For portability (especially Windows), the buffer should have
│ │ │ │ @@ -912,15 +929,16 @@
│ │ │ │ href="https://github.com/liballeg/allegro5/blob/master/examples/ex_acodec_multi.c#L83">ex_acodec_multi.c
│ │ │ │ al_load_sample
│ │ │ │ -*al_load_sample(const char *filename) ALLEGRO_SAMPLE
*al_load_sample(const char *filename)
│ │ │ │ + ALLEGRO_SAMPLE *al_load_sample(const char *filename) ALLEGRO_SAMPLE
al_load_sample_f
│ │ │ │ -*al_load_sample_f(ALLEGRO_FILE* fp, const char *ident) ALLEGRO_SAMPLE
*al_load_sample_f(ALLEGRO_FILE* fp, const char *ident)
│ │ │ │ + ALLEGRO_SAMPLE *al_load_sample_f(ALLEGRO_FILE* fp, const char *ident) ALLEGRO_SAMPLE
al_save_sample
│ │ │ │ -bool al_save_sample(const char *filename, ALLEGRO_SAMPLE *spl)
bool al_save_sample(const char *filename, ALLEGRO_SAMPLE *spl)
│ │ │ │ +bool al_save_sample(const char *filename, ALLEGRO_SAMPLE *spl)
│ │ │ │ @@ -983,15 +1003,16 @@
│ │ │ │ register your own format handler.
See also: al_save_sample_f, │ │ │ │ al_register_sample_saver, │ │ │ │ al_init_acodec_addon
│ │ │ │bool al_save_sample_f(ALLEGRO_FILE *fp, const char *ident, ALLEGRO_SAMPLE *spl)
bool al_save_sample_f(ALLEGRO_FILE *fp, const char *ident, ALLEGRO_SAMPLE *spl)
│ │ │ │ +bool al_save_sample_f(ALLEGRO_FILE *fp, const char *ident, ALLEGRO_SAMPLE *spl)
Writes a sample into a ALLEGRO_FILE filestream. Currently, │ │ │ │ wav is the only supported format, and the extension must be “.wav”.
│ │ │ │Returns true on success, false on error. The file remains open │ │ │ │ @@ -1001,15 +1022,16 @@ │ │ │ │ file formats by default. You must use the allegro_acodec addon, or │ │ │ │ register your own format handler.
│ │ │ │ │ │ │ │See also: al_save_sample, al_register_sample_saver_f, │ │ │ │ al_init_acodec_addon
│ │ │ │void al_destroy_sample(ALLEGRO_SAMPLE *spl)
void al_destroy_sample(ALLEGRO_SAMPLE *spl)
│ │ │ │ +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 with al_free.
This function will stop any sample instances which may be playing the │ │ │ │ @@ -1025,61 +1047,66 @@ │ │ │ │ href="https://github.com/liballeg/allegro5/blob/master/examples/ex_acodec_multi.c#L86">ex_acodec_multi.c │ │ │ │
(const ALLEGRO_SAMPLE *spl) ALLEGRO_CHANNEL_CONF al_get_sample_channels
(const ALLEGRO_SAMPLE *spl)
│ │ │ │ + ALLEGRO_CHANNEL_CONF al_get_sample_channels(const ALLEGRO_SAMPLE *spl) ALLEGRO_CHANNEL_CONF al_get_sample_channels
Return the channel configuration of the sample.
│ │ │ │See also: ALLEGRO_CHANNEL_CONF, al_get_sample_depth, al_get_sample_frequency, │ │ │ │ al_get_sample_length, al_get_sample_data
│ │ │ │(const ALLEGRO_SAMPLE *spl) ALLEGRO_AUDIO_DEPTH al_get_sample_depth
(const ALLEGRO_SAMPLE *spl)
│ │ │ │ + ALLEGRO_AUDIO_DEPTH al_get_sample_depth(const ALLEGRO_SAMPLE *spl) ALLEGRO_AUDIO_DEPTH al_get_sample_depth
Return the audio depth of the sample.
│ │ │ │See also: ALLEGRO_AUDIO_DEPTH, al_get_sample_channels, al_get_sample_frequency, │ │ │ │ al_get_sample_length, al_get_sample_data
│ │ │ │unsigned int al_get_sample_frequency(const ALLEGRO_SAMPLE *spl)
unsigned int al_get_sample_frequency(const ALLEGRO_SAMPLE *spl)
│ │ │ │ +unsigned int al_get_sample_frequency(const ALLEGRO_SAMPLE *spl)
Return the frequency (in Hz) of the sample.
│ │ │ │See also: al_get_sample_channels, al_get_sample_depth, al_get_sample_length, al_get_sample_data
│ │ │ │unsigned int al_get_sample_length(const ALLEGRO_SAMPLE *spl)
unsigned int al_get_sample_length(const ALLEGRO_SAMPLE *spl)
│ │ │ │ +unsigned int al_get_sample_length(const ALLEGRO_SAMPLE *spl)
Return the length of the sample in sample values.
│ │ │ │See also: al_get_sample_channels, al_get_sample_depth, al_get_sample_frequency, │ │ │ │ al_get_sample_data
│ │ │ │void *al_get_sample_data(const ALLEGRO_SAMPLE *spl)
void *al_get_sample_data(const ALLEGRO_SAMPLE *spl)
│ │ │ │ +void *al_get_sample_data(const ALLEGRO_SAMPLE *spl)
Return a pointer to the raw sample data.
│ │ │ │See also: al_get_sample_channels, al_get_sample_depth, al_set_default_mixer.
│ │ │ │typedef struct ALLEGRO_SAMPLE_INSTANCE ALLEGRO_SAMPLE_INSTANCE;
typedef struct ALLEGRO_SAMPLE_INSTANCE 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 about how the effect │ │ │ │ should be played: These playback parameters consist of the looping mode, │ │ │ │ loop start/end points, playing position, speed, gain, pan and the │ │ │ │ @@ -1206,15 +1234,16 @@ │ │ │ │ href="https://github.com/liballeg/allegro5/blob/master/examples/ex_acodec_multi.c#L22">ex_acodec_multi.c │ │ │ │
*al_create_sample_instance(ALLEGRO_SAMPLE *sample_data) ALLEGRO_SAMPLE_INSTANCE
*al_create_sample_instance(ALLEGRO_SAMPLE *sample_data)
│ │ │ │ + ALLEGRO_SAMPLE_INSTANCE *al_create_sample_instance(ALLEGRO_SAMPLE *sample_data) ALLEGRO_SAMPLE_INSTANCE
Creates a sample instance, using the supplied sample data. The │ │ │ │ instance must be attached to a mixer (or voice) in order to actually │ │ │ │ produce output.
│ │ │ │The argument may be NULL. You can then set the sample data later with │ │ │ │ @@ -1227,15 +1256,16 @@ │ │ │ │ href="https://github.com/liballeg/allegro5/blob/master/examples/ex_acodec_multi.c#L83">ex_acodec_multi.c │ │ │ │
void al_destroy_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl)
void al_destroy_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl)
│ │ │ │ +void al_destroy_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl)
Detaches the sample instance from anything it may be attached to and │ │ │ │ frees it (the sample data, i.e. its ALLEGRO_SAMPLE, is not │ │ │ │ freed!).
│ │ │ │See also: ex_acodec_multi.c │ │ │ │
bool al_play_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl)
bool al_play_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl)
│ │ │ │ +bool al_play_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl)
Play the sample instance. Returns true on success, false on │ │ │ │ failure.
│ │ │ │See also: al_stop_sample_instance
│ │ │ │ @@ -1264,15 +1295,16 @@ │ │ │ │ href="https://github.com/liballeg/allegro5/blob/master/examples/ex_acodec_multi.c#L107">ex_acodec_multi.c │ │ │ │bool al_stop_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl)
bool al_stop_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl)
│ │ │ │ +bool al_stop_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl)
Stop an sample instance playing.
│ │ │ │See also: al_play_sample_instance
│ │ │ │Examples:
│ │ │ │ @@ -1283,15 +1315,17 @@ │ │ │ │ href="https://github.com/liballeg/allegro5/blob/master/examples/ex_kcm_direct.c#L88">ex_kcm_direct.c │ │ │ │(
│ │ │ │ - ALLEGRO_CHANNEL_CONF al_get_sample_instance_channelsconst ALLEGRO_SAMPLE_INSTANCE *spl)
Return the channel configuration of the sample instance’s sample │ │ │ │ data.
│ │ │ │See also: ALLEGRO_CHANNEL_CONF.
│ │ │ │ @@ -1299,42 +1333,45 @@ │ │ │ │(const ALLEGRO_SAMPLE_INSTANCE *spl) ALLEGRO_AUDIO_DEPTH al_get_sample_instance_depth
(const ALLEGRO_SAMPLE_INSTANCE *spl)
│ │ │ │ + ALLEGRO_AUDIO_DEPTH al_get_sample_instance_depth(const ALLEGRO_SAMPLE_INSTANCE *spl) ALLEGRO_AUDIO_DEPTH al_get_sample_instance_depth
Return the audio depth of the sample instance’s sample data.
│ │ │ │See also: ALLEGRO_AUDIO_DEPTH.
│ │ │ │Examples:
│ │ │ │unsigned int al_get_sample_instance_frequency(const ALLEGRO_SAMPLE_INSTANCE *spl)
unsigned int al_get_sample_instance_frequency(const ALLEGRO_SAMPLE_INSTANCE *spl)
│ │ │ │ +unsigned int al_get_sample_instance_frequency(const ALLEGRO_SAMPLE_INSTANCE *spl)
Return the frequency (in Hz) of the sample instance’s sample │ │ │ │ data.
│ │ │ │Examples:
│ │ │ │unsigned int al_get_sample_instance_length(const ALLEGRO_SAMPLE_INSTANCE *spl)
unsigned int al_get_sample_instance_length(const ALLEGRO_SAMPLE_INSTANCE *spl)
│ │ │ │ +unsigned int al_get_sample_instance_length(const ALLEGRO_SAMPLE_INSTANCE *spl)
Return the length of the sample instance in sample values. This │ │ │ │ property may differ from the length of the instance’s sample data.
│ │ │ │See also: al_set_sample_instance_length, │ │ │ │ @@ -1346,15 +1383,17 @@ │ │ │ │ href="https://github.com/liballeg/allegro5/blob/master/examples/ex_audio_props.cpp#L196">ex_audio_props.cpp │ │ │ │
bool al_set_sample_instance_length(ALLEGRO_SAMPLE_INSTANCE *spl,
│ │ │ │ -unsigned int val)
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 │ │ │ │ exceed the actual length of the sample data, though.
│ │ │ │Return true on success, false on failure. Will fail if the sample │ │ │ │ @@ -1364,30 +1403,33 @@ │ │ │ │
Examples:
│ │ │ │unsigned int al_get_sample_instance_position(const ALLEGRO_SAMPLE_INSTANCE *spl)
unsigned int al_get_sample_instance_position(const ALLEGRO_SAMPLE_INSTANCE *spl)
│ │ │ │ +unsigned int al_get_sample_instance_position(const ALLEGRO_SAMPLE_INSTANCE *spl)
Get the playback position of a sample instance.
│ │ │ │See also: al_set_sample_instance_position
│ │ │ │Examples:
│ │ │ │bool al_set_sample_instance_position(ALLEGRO_SAMPLE_INSTANCE *spl,
│ │ │ │ -unsigned int val)
Set the playback position of a sample instance.
│ │ │ │Returns true on success, false on failure.
│ │ │ │See also: al_get_sample_instance_position
│ │ │ │ @@ -1395,23 +1437,25 @@ │ │ │ │float al_get_sample_instance_speed(const ALLEGRO_SAMPLE_INSTANCE *spl)
float al_get_sample_instance_speed(const ALLEGRO_SAMPLE_INSTANCE *spl)
│ │ │ │ +float al_get_sample_instance_speed(const ALLEGRO_SAMPLE_INSTANCE *spl)
Return the relative playback speed of the sample instance.
│ │ │ │See also: al_set_sample_instance_speed
│ │ │ │bool al_set_sample_instance_speed(ALLEGRO_SAMPLE_INSTANCE *spl, float val)
bool al_set_sample_instance_speed(ALLEGRO_SAMPLE_INSTANCE *spl, float val)
│ │ │ │ +bool al_set_sample_instance_speed(ALLEGRO_SAMPLE_INSTANCE *spl, float val)
Set the relative playback speed of the sample instance. 1.0 means │ │ │ │ normal speed.
│ │ │ │Return true on success, false on failure. Will fail if the sample │ │ │ │ instance is attached directly to a voice.
│ │ │ │ @@ -1421,28 +1465,30 @@ │ │ │ │float al_get_sample_instance_gain(const ALLEGRO_SAMPLE_INSTANCE *spl)
float al_get_sample_instance_gain(const ALLEGRO_SAMPLE_INSTANCE *spl)
│ │ │ │ +float al_get_sample_instance_gain(const ALLEGRO_SAMPLE_INSTANCE *spl)
Return the playback gain of the sample instance.
│ │ │ │See also: al_set_sample_instance_gain
│ │ │ │Examples:
│ │ │ │bool al_set_sample_instance_gain(ALLEGRO_SAMPLE_INSTANCE *spl, float val)
bool al_set_sample_instance_gain(ALLEGRO_SAMPLE_INSTANCE *spl, float val)
│ │ │ │ +bool al_set_sample_instance_gain(ALLEGRO_SAMPLE_INSTANCE *spl, float val)
Set the playback gain of the sample instance.
│ │ │ │Returns true on success, false on failure. Will fail if the sample │ │ │ │ instance is attached directly to a voice.
│ │ │ │See also: ex_mixer_chain.c │ │ │ │
float al_get_sample_instance_pan(const ALLEGRO_SAMPLE_INSTANCE *spl)
float al_get_sample_instance_pan(const ALLEGRO_SAMPLE_INSTANCE *spl)
│ │ │ │ +float al_get_sample_instance_pan(const ALLEGRO_SAMPLE_INSTANCE *spl)
Get the pan value of the sample instance.
│ │ │ │See also: al_set_sample_instance_pan.
│ │ │ │bool al_set_sample_instance_pan(ALLEGRO_SAMPLE_INSTANCE *spl, float val)
bool al_set_sample_instance_pan(ALLEGRO_SAMPLE_INSTANCE *spl, float val)
│ │ │ │ +bool al_set_sample_instance_pan(ALLEGRO_SAMPLE_INSTANCE *spl, float val)
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 │ │ │ │ right speaker; 0.0 means the sample is centre balanced. A special value │ │ │ │ ALLEGRO_AUDIO_PAN_NONE │ │ │ │ @@ -1489,15 +1537,16 @@ │ │ │ │
float al_get_sample_instance_time(const ALLEGRO_SAMPLE_INSTANCE *spl)
float al_get_sample_instance_time(const ALLEGRO_SAMPLE_INSTANCE *spl)
│ │ │ │ +float al_get_sample_instance_time(const ALLEGRO_SAMPLE_INSTANCE *spl)
Return the length of the sample instance in seconds, assuming a │ │ │ │ playback speed of 1.0.
│ │ │ │See also: al_get_sample_instance_length
│ │ │ │ @@ -1508,26 +1557,29 @@ │ │ │ │(const ALLEGRO_SAMPLE_INSTANCE *spl) ALLEGRO_PLAYMODE al_get_sample_instance_playmode
(const ALLEGRO_SAMPLE_INSTANCE *spl)
│ │ │ │ + ALLEGRO_PLAYMODE al_get_sample_instance_playmode(const ALLEGRO_SAMPLE_INSTANCE *spl) ALLEGRO_PLAYMODE al_get_sample_instance_playmode
Return the playback mode of the sample instance.
│ │ │ │See also: ALLEGRO_PLAYMODE, │ │ │ │ al_set_sample_instance_playmode
│ │ │ │bool al_set_sample_instance_playmode(ALLEGRO_SAMPLE_INSTANCE *spl,
│ │ │ │ -) ALLEGRO_PLAYMODE val
Set the playback mode of the sample instance.
│ │ │ │Returns true on success, false on failure.
│ │ │ │See also: ALLEGRO_PLAYMODE, │ │ │ │ ex_mixer_chain.c │ │ │ │
bool al_get_sample_instance_playing(const ALLEGRO_SAMPLE_INSTANCE *spl)
bool al_get_sample_instance_playing(const ALLEGRO_SAMPLE_INSTANCE *spl)
│ │ │ │ +bool al_get_sample_instance_playing(const ALLEGRO_SAMPLE_INSTANCE *spl)
Return true if the sample instance is in the playing state. This may │ │ │ │ be true even if the instance is not attached to anything.
│ │ │ │See also: al_set_sample_instance_playing
│ │ │ │Examples:
│ │ │ │bool al_set_sample_instance_playing(ALLEGRO_SAMPLE_INSTANCE *spl, bool val)
bool al_set_sample_instance_playing(ALLEGRO_SAMPLE_INSTANCE *spl, bool val)
│ │ │ │ +bool al_set_sample_instance_playing(ALLEGRO_SAMPLE_INSTANCE *spl, bool val)
Change whether the sample instance is playing.
│ │ │ │The instance does not need to be attached to anything (since: │ │ │ │ 5.1.8).
│ │ │ │Returns true on success, false on failure.
│ │ │ │ @@ -1573,27 +1627,29 @@ │ │ │ │bool al_get_sample_instance_attached(const ALLEGRO_SAMPLE_INSTANCE *spl)
bool al_get_sample_instance_attached(const ALLEGRO_SAMPLE_INSTANCE *spl)
│ │ │ │ +bool al_get_sample_instance_attached(const ALLEGRO_SAMPLE_INSTANCE *spl)
Return whether the sample instance is attached to something.
│ │ │ │See also: al_attach_sample_instance_to_mixer, │ │ │ │ al_attach_sample_instance_to_voice, │ │ │ │ al_detach_sample_instance
│ │ │ │bool al_detach_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl)
bool al_detach_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl)
│ │ │ │ +bool al_detach_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl)
Detach the sample instance from whatever it’s attached to, if │ │ │ │ anything.
│ │ │ │Returns true on success.
│ │ │ │See also: al_get_sample_instance_attached
│ │ │ │Examples:
│ │ │ │*al_get_sample(ALLEGRO_SAMPLE_INSTANCE *spl) ALLEGRO_SAMPLE
*al_get_sample(ALLEGRO_SAMPLE_INSTANCE *spl)
│ │ │ │ + ALLEGRO_SAMPLE *al_get_sample(ALLEGRO_SAMPLE_INSTANCE *spl) ALLEGRO_SAMPLE
Return the sample data that the sample instance plays.
│ │ │ │Note this returns a pointer to an internal structure, not │ │ │ │ the ALLEGRO_SAMPLE that you may │ │ │ │ have passed to al_set_sample. │ │ │ │ @@ -1628,15 +1685,16 @@ │ │ │ │ href="https://github.com/liballeg/allegro5/blob/master/examples/ex_acodec_multi.c#L109">ex_acodec_multi.c │ │ │ │
bool al_set_sample(ALLEGRO_SAMPLE_INSTANCE *spl, ALLEGRO_SAMPLE *data)
bool al_set_sample(ALLEGRO_SAMPLE_INSTANCE *spl, ALLEGRO_SAMPLE *data)
│ │ │ │ +bool al_set_sample(ALLEGRO_SAMPLE_INSTANCE *spl, ALLEGRO_SAMPLE *data)
Change the sample data that a sample instance 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 │ │ │ │ @@ -1658,15 +1716,16 @@ │ │ │ │
bool al_set_sample_instance_channel_matrix(ALLEGRO_SAMPLE_INSTANCE *spl, const float *matrix)
bool al_set_sample_instance_channel_matrix(ALLEGRO_SAMPLE_INSTANCE *spl, const float *matrix)
│ │ │ │ +bool al_set_sample_instance_channel_matrix(ALLEGRO_SAMPLE_INSTANCE *spl, const float *matrix)
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 │ │ │ │ this matrix from the gain and pan settings, as well as the channel │ │ │ │ configurations of this instance and the mixer it is attached to, but │ │ │ │ @@ -1696,15 +1755,16 @@ │ │ │ │
Examples:
│ │ │ │typedef struct ALLEGRO_AUDIO_STREAM ALLEGRO_AUDIO_STREAM;
typedef struct ALLEGRO_AUDIO_STREAM ALLEGRO_AUDIO_STREAM;
│ │ │ │ +typedef struct ALLEGRO_AUDIO_STREAM ALLEGRO_AUDIO_STREAM;
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, │ │ │ │ which is split into a number of fragments. Whenever a fragment has │ │ │ │ finished playing, the user can refill it with new data.
│ │ │ │ @@ -1762,15 +1822,18 @@ │ │ │ │ href="https://github.com/liballeg/allegro5/blob/master/examples/ex_stream_file.c#L79">ex_stream_file.c │ │ │ │*al_create_audio_stream(size_t fragment_count,
│ │ │ │ ALLEGRO_AUDIO_STREAM unsigned int frag_samples, unsigned int freq, ALLEGRO_AUDIO_DEPTH depth,
│ │ │ │ - ) ALLEGRO_CHANNEL_CONF chan_conf
Creates an ALLEGRO_AUDIO_STREAM. The │ │ │ │ stream will be set to play by default. It will feed audio data from a │ │ │ │ buffer, which is split into a number of fragments.
│ │ │ │ @@ -1826,15 +1889,17 @@ │ │ │ │*al_load_audio_stream(const char *filename,
│ │ │ │ - ALLEGRO_AUDIO_STREAM size_t buffer_count, unsigned int samples)
Loads an audio file from disk as it is needed.
│ │ │ │Unlike regular streams, the one returned by this function need not be │ │ │ │ fed by the user; the library will automatically read more of the file as │ │ │ │ it is needed. The stream will contain buffer_count buffers with │ │ │ │ @@ -1860,15 +1925,17 @@ │ │ │ │
*al_load_audio_stream_f(ALLEGRO_FILE* fp, const char *ident,
│ │ │ │ - ALLEGRO_AUDIO_STREAM size_t buffer_count, unsigned int samples)
Loads an audio file from ALLEGRO_FILE stream as it is │ │ │ │ needed.
│ │ │ │Unlike regular streams, the one returned by this function need not be │ │ │ │ @@ -1890,15 +1957,16 @@ │ │ │ │ register your own format handler.
│ │ │ │ │ │ │ │See also: al_load_audio_stream, al_register_audio_stream_loader_f, │ │ │ │ al_init_acodec_addon
│ │ │ │void al_destroy_audio_stream(ALLEGRO_AUDIO_STREAM *stream)
void al_destroy_audio_stream(ALLEGRO_AUDIO_STREAM *stream)
│ │ │ │ +void al_destroy_audio_stream(ALLEGRO_AUDIO_STREAM *stream)
Destroy an audio stream which was created with al_create_audio_stream or │ │ │ │ al_load_audio_stream.
│ │ │ ││ │ │ │ @@ -1916,15 +1984,17 @@ │ │ │ │ href="https://github.com/liballeg/allegro5/blob/master/examples/ex_stream_file.c#L124">ex_stream_file.c │ │ │ ││ │ │ │ex_resample_test.c │ │ │ │ │ │ │ │al_get_audio_stream_event_source
│ │ │ ││ │ │ │ + ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ +ALLEGRO_EVENT_SOURCE *al_get_audio_stream_event_source( │ │ │ │ + ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ │ │ │*al_get_audio_stream_event_source( │ │ │ │ - ALLEGRO_EVENT_SOURCE *stream) ALLEGRO_AUDIO_STREAM
Retrieve the associated event source.
│ │ │ │See al_get_audio_stream_fragment │ │ │ │ for a description of the ex_saw.c │ │ │ │
ex_stream_file.c │ │ │ │ex_resample_test.c │ │ │ │ │ │ │ │al_drain_audio_stream
│ │ │ │ -│ │ │ │ +void al_drain_audio_stream(ALLEGRO_AUDIO_STREAM *stream)
│ │ │ │ │ │ │ │void al_drain_audio_stream(ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ +void al_drain_audio_stream(ALLEGRO_AUDIO_STREAM *stream)
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. │ │ │ │ The stream’s playing state will change to false.
│ │ │ │See also: ex_saw.c │ │ │ │
ex_resample_test.c │ │ │ │ex_record.c │ │ │ │ │ │ │ │al_rewind_audio_stream
│ │ │ │ -│ │ │ │ +bool al_rewind_audio_stream(ALLEGRO_AUDIO_STREAM *stream)
│ │ │ │ │ │ │ │bool al_rewind_audio_stream(ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ +bool al_rewind_audio_stream(ALLEGRO_AUDIO_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 al_load_audio_stream, │ │ │ │ al_play_audio_stream, Examples:
│ │ │ ││ │ │ │
│ │ │ │- ex_stream_seek.c
│ │ │ │al_get_audio_stream_frequency
│ │ │ │ -│ │ │ │ +unsigned int al_get_audio_stream_frequency(const ALLEGRO_AUDIO_STREAM *stream)
│ │ │ │ │ │ │ │unsigned int al_get_audio_stream_frequency(const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ +unsigned int al_get_audio_stream_frequency(const ALLEGRO_AUDIO_STREAM *stream)
Return the stream frequency (in Hz).
│ │ │ │al_get_audio_stream_channels
│ │ │ ││ │ │ │ + const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ +ALLEGRO_CHANNEL_CONF al_get_audio_stream_channels( │ │ │ │ + const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ │ │ │( │ │ │ │ - ALLEGRO_CHANNEL_CONF al_get_audio_stream_channelsconst ALLEGRO_AUDIO_STREAM *stream)
Return the stream channel configuration.
│ │ │ │See also: ALLEGRO_CHANNEL_CONF.
│ │ │ │al_get_audio_stream_depth
│ │ │ ││ │ │ │ + const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ +ALLEGRO_AUDIO_DEPTH al_get_audio_stream_depth( │ │ │ │ + const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ │ │ │( │ │ │ │ - ALLEGRO_AUDIO_DEPTH al_get_audio_stream_depthconst ALLEGRO_AUDIO_STREAM *stream)
Return the stream audio depth.
│ │ │ │See also: ALLEGRO_AUDIO_DEPTH.
│ │ │ │al_get_audio_stream_length
│ │ │ │ -│ │ │ │ +unsigned int al_get_audio_stream_length(const ALLEGRO_AUDIO_STREAM *stream)
│ │ │ │ │ │ │ │unsigned int al_get_audio_stream_length(const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ +unsigned int al_get_audio_stream_length(const ALLEGRO_AUDIO_STREAM *stream)
Return the stream length in samples.
│ │ │ │Examples:
│ │ │ ││ │ │ │
│ │ │ │- ex_stream_seek.c
│ │ │ │al_get_audio_stream_speed
│ │ │ │ -│ │ │ │ +float al_get_audio_stream_speed(const ALLEGRO_AUDIO_STREAM *stream)
│ │ │ │ │ │ │ │float al_get_audio_stream_speed(const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ +float al_get_audio_stream_speed(const ALLEGRO_AUDIO_STREAM *stream)
Return the relative playback speed of the stream.
│ │ │ │See also: al_set_audio_stream_speed.
│ │ │ │al_set_audio_stream_speed
│ │ │ │ -│ │ │ │ +bool al_set_audio_stream_speed(ALLEGRO_AUDIO_STREAM *stream, float val)
│ │ │ │ │ │ │ │bool al_set_audio_stream_speed(ALLEGRO_AUDIO_STREAM *stream, float val) │ │ │ │ +bool al_set_audio_stream_speed(ALLEGRO_AUDIO_STREAM *stream, float val)
Set the relative playback speed of the stream. 1.0 means normal │ │ │ │ speed.
│ │ │ │Return true on success, false on failure. Will fail if the audio │ │ │ │ stream is attached directly to a voice.
│ │ │ │See also: al_get_audio_stream_speed.
│ │ │ │al_get_audio_stream_gain
│ │ │ │ -│ │ │ │ +float al_get_audio_stream_gain(const ALLEGRO_AUDIO_STREAM *stream)
│ │ │ │ │ │ │ │float al_get_audio_stream_gain(const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ +float al_get_audio_stream_gain(const ALLEGRO_AUDIO_STREAM *stream)
Return the playback gain of the stream.
│ │ │ │See also: al_set_audio_stream_gain.
│ │ │ │Examples:
│ │ │ ││ │ │ │
│ │ │ │- ex_audio_chain.cpp
│ │ │ │al_set_audio_stream_gain
│ │ │ │ -│ │ │ │ +bool al_set_audio_stream_gain(ALLEGRO_AUDIO_STREAM *stream, float val)
│ │ │ │ │ │ │ │bool al_set_audio_stream_gain(ALLEGRO_AUDIO_STREAM *stream, float val) │ │ │ │ +bool al_set_audio_stream_gain(ALLEGRO_AUDIO_STREAM *stream, float val)
Set the playback gain of the stream.
│ │ │ │Returns true on success, false on failure. Will fail if the audio │ │ │ │ stream is attached directly to a voice.
│ │ │ │See also: │ │ │ │
│ │ │ │ex_synth.cpp │ │ │ │ex_audio_chain.cpp │ │ │ │ │ │ │ │al_get_audio_stream_pan
│ │ │ │ -│ │ │ │ +float al_get_audio_stream_pan(const ALLEGRO_AUDIO_STREAM *stream)
│ │ │ │ │ │ │ │float al_get_audio_stream_pan(const ALLEGRO_AUDIO_STREAM *streamR *mixer, ALLEGRO_MIXER_QUALITY new_quality) │ │ │ │ +float al_get_audio_stream_pan(const ALLEGRO_AUDIO_STREAM *stream)
Get the pan value of the stream.
│ │ │ │See also: al_set_audio_stream_pan.
│ │ │ │al_set_audio_stream_pan
│ │ │ │ -│ │ │ │ +bool al_set_audio_stream_pan(ALLEGRO_AUDIO_STREAM *stream, float val)
│ │ │ │ │ │ │ │bool al_set_audio_stream_pan(ALLEGRO_AUDIO_STREAM *stream, float val) │ │ │ │ +bool al_set_audio_stream_pan(ALLEGRO_AUDIO_STREAM *stream, float val)
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 │ │ │ │ right speaker; 0.0 means the sample is centre balanced. A special value │ │ │ │ ALLEGRO_AUDIO_PAN_NONE │ │ │ │ @@ -2087,15 +2171,16 @@ │ │ │ │ href="audio.html#allegro_audio_pan_none">ALLEGRO_AUDIO_PAN_NONE
Examples:
│ │ │ ││ │ │ │
│ │ │ │- ex_synth.cpp
│ │ │ │al_get_audio_stream_playing
│ │ │ │ -│ │ │ │ +bool al_get_audio_stream_playing(const ALLEGRO_AUDIO_STREAM *stream)
│ │ │ │ │ │ │ │bool al_get_audio_stream_playing(const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ +bool al_get_audio_stream_playing(const ALLEGRO_AUDIO_STREAM *stream)
Return true if the stream is playing.
│ │ │ │See also: al_set_audio_stream_playing.
│ │ │ │Examples:
│ │ │ │ @@ -2104,15 +2189,16 @@ │ │ │ │ href="https://github.com/liballeg/allegro5/blob/master/examples/ex_record.c#L274">ex_record.c │ │ │ │ex_stream_seek.c │ │ │ │ex_audio_chain.cpp │ │ │ │ │ │ │ │al_set_audio_stream_playing
│ │ │ │ -│ │ │ │ +bool al_set_audio_stream_playing(ALLEGRO_AUDIO_STREAM *stream, bool val)
│ │ │ │ │ │ │ │bool al_set_audio_stream_playing(ALLEGRO_AUDIO_STREAM *stream, bool val) │ │ │ │ +bool al_set_audio_stream_playing(ALLEGRO_AUDIO_STREAM *stream, bool val)
Change whether the stream is playing.
│ │ │ │Returns true on success, false on failure.
│ │ │ │See also: al_get_audio_stream_playing
│ │ │ │ @@ -2123,25 +2209,29 @@ │ │ │ │ex_record.c │ │ │ │ex_stream_seek.c │ │ │ │ │ │ │ │al_get_audio_stream_playmode
│ │ │ ││ │ │ │ + const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ +ALLEGRO_PLAYMODE al_get_audio_stream_playmode( │ │ │ │ + const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ │ │ │( │ │ │ │ - ALLEGRO_PLAYMODE al_get_audio_stream_playmodeconst ALLEGRO_AUDIO_STREAM *stream)
Return the playback mode of the stream.
│ │ │ │See also: ALLEGRO_PLAYMODE, │ │ │ │ al_set_audio_stream_playmode.
│ │ │ │al_set_audio_stream_playmode
│ │ │ ││ │ │ │ + ALLEGRO_PLAYMODE val) │ │ │ │ +bool al_set_audio_stream_playmode(ALLEGRO_AUDIO_STREAM *stream, │ │ │ │ + ALLEGRO_PLAYMODE val) │ │ │ │ │ │ │ │bool al_set_audio_stream_playmode(ALLEGRO_AUDIO_STREAM *stream, │ │ │ │ -) ALLEGRO_PLAYMODE val
Set the playback mode of the stream.
│ │ │ │Returns true on success, false on failure.
│ │ │ │See also: ALLEGRO_PLAYMODE, │ │ │ │ ex_stream_file.c │ │ │ │
ex_mixer_pp.c │ │ │ │ex_stream_seek.c │ │ │ │ │ │ │ │al_get_audio_stream_attached
│ │ │ │ -│ │ │ │ +bool al_get_audio_stream_attached(const ALLEGRO_AUDIO_STREAM *stream)
│ │ │ │ │ │ │ │bool al_get_audio_stream_attached(const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ +bool al_get_audio_stream_attached(const ALLEGRO_AUDIO_STREAM *stream)
Return whether the stream is attached to something.
│ │ │ │See also: al_attach_audio_stream_to_mixer, │ │ │ │ al_attach_audio_stream_to_voice, │ │ │ │ al_detach_audio_stream.
│ │ │ │al_detach_audio_stream
│ │ │ │ -│ │ │ │ +bool al_detach_audio_stream(ALLEGRO_AUDIO_STREAM *stream)
│ │ │ │ │ │ │ │bool al_detach_audio_stream(ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ +bool al_detach_audio_stream(ALLEGRO_AUDIO_STREAM *stream)
Detach the stream from whatever it’s attached to, if anything.
│ │ │ │See also: al_attach_audio_stream_to_mixer, │ │ │ │ Examples:
│ │ │ ││ │ │ │
│ │ │ │- ex_audio_chain.cpp
│ │ │ │al_get_audio_stream_played_samples
│ │ │ │ -│ │ │ │ +uint64_t al_get_audio_stream_played_samples(const ALLEGRO_AUDIO_STREAM *stream)
│ │ │ │ │ │ │ │uint64_t al_get_audio_stream_played_samples(const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ +uint64_t al_get_audio_stream_played_samples(const ALLEGRO_AUDIO_STREAM *stream)
Get the number of samples consumed by the parent since the audio │ │ │ │ stream was started.
│ │ │ │Since: 5.1.8
│ │ │ │al_get_audio_stream_fragment
│ │ │ │ -│ │ │ │ +void *al_get_audio_stream_fragment(const ALLEGRO_AUDIO_STREAM *stream)
│ │ │ │ │ │ │ │void *al_get_audio_stream_fragment(const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ +void *al_get_audio_stream_fragment(const ALLEGRO_AUDIO_STREAM *stream)
When using Allegro’s audio streaming, you will use this function to │ │ │ │ continuously provide new sample data to a stream.
│ │ │ │If the stream is ready for new data, the function will return the │ │ │ │ address of an internal buffer to be filled with audio data. The length │ │ │ │ @@ -2236,15 +2330,16 @@ │ │ │ │ href="https://github.com/liballeg/allegro5/blob/master/examples/ex_saw.c#L39">ex_saw.c │ │ │ │
ex_resample_test.c │ │ │ │ex_synth.cpp │ │ │ │ │ │ │ │al_set_audio_stream_fragment
│ │ │ │ -│ │ │ │ +bool al_set_audio_stream_fragment(ALLEGRO_AUDIO_STREAM *stream, void *val)
│ │ │ │ │ │ │ │bool al_set_audio_stream_fragment(ALLEGRO_AUDIO_STREAM *stream, void *val) │ │ │ │ +bool al_set_audio_stream_fragment(ALLEGRO_AUDIO_STREAM *stream, void *val)
This function needs to be called for every successful call of al_get_audio_stream_fragment │ │ │ │ to indicate that the buffer (pointed to by
│ │ │ │ @@ -2257,39 +2352,43 @@ │ │ │ │val
) is filled │ │ │ │ with new data.ex_resample_test.c │ │ │ │ex_synth.cpp │ │ │ │ │ │ │ │al_get_audio_stream_fragments
│ │ │ │ -│ │ │ │ +unsigned int al_get_audio_stream_fragments(const ALLEGRO_AUDIO_STREAM *stream)
│ │ │ │ │ │ │ │unsigned int al_get_audio_stream_fragments(const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ +unsigned int al_get_audio_stream_fragments(const ALLEGRO_AUDIO_STREAM *stream)
Returns the number of fragments this stream uses. This is the same │ │ │ │ value as passed to al_create_audio_stream when │ │ │ │ a new stream is created.
│ │ │ │See also: al_get_available_audio_stream_fragments
│ │ │ │al_get_available_audio_stream_fragments
│ │ │ ││ │ │ │ + const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ +unsigned int al_get_available_audio_stream_fragments( │ │ │ │ + const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ │ │ │unsigned int al_get_available_audio_stream_fragments( │ │ │ │ -const ALLEGRO_AUDIO_STREAM *stream)
Returns the number of available fragments in the stream, that is, │ │ │ │ fragments which are not currently filled with data for playback.
│ │ │ │See also: al_get_audio_stream_fragment, │ │ │ │ al_get_audio_stream_fragments
│ │ │ │al_seek_audio_stream_secs
│ │ │ │ -│ │ │ │ +bool al_seek_audio_stream_secs(ALLEGRO_AUDIO_STREAM *stream, double time)
│ │ │ │ │ │ │ │bool al_seek_audio_stream_secs(ALLEGRO_AUDIO_STREAM *stream, double time) │ │ │ │ +bool al_seek_audio_stream_secs(ALLEGRO_AUDIO_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 al_load_audio_stream, al_play_audio_stream, Examples:
│ │ │ ││ │ │ │
│ │ │ │- ex_stream_seek.c
│ │ │ │al_get_audio_stream_position_secs
│ │ │ │ -│ │ │ │ +double al_get_audio_stream_position_secs(ALLEGRO_AUDIO_STREAM *stream)
│ │ │ │ │ │ │ │double al_get_audio_stream_position_secs(ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ +double al_get_audio_stream_position_secs(ALLEGRO_AUDIO_STREAM *stream)
Return the position of the stream in seconds. Currently this can only │ │ │ │ be called on streams created with al_load_audio_stream, al_play_audio_stream, Examples:
│ │ │ ││ │ │ │
│ │ │ │- ex_stream_seek.c
│ │ │ │al_get_audio_stream_length_secs
│ │ │ │ -│ │ │ │ +double al_get_audio_stream_length_secs(ALLEGRO_AUDIO_STREAM *stream)
│ │ │ │ │ │ │ │double al_get_audio_stream_length_secs(ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ +double al_get_audio_stream_length_secs(ALLEGRO_AUDIO_STREAM *stream)
Return the length of the stream in seconds, if known. Otherwise │ │ │ │ returns zero.
│ │ │ │Currently this can only be called on streams created with al_load_audio_stream, │ │ │ │
ex_stream_seek.c │ │ │ │ │ │ │ │al_set_audio_stream_loop_secs
│ │ │ ││ │ │ │ +double start, double end) │ │ │ │ + bool al_set_audio_stream_loop_secs(ALLEGRO_AUDIO_STREAM *stream, │ │ │ │ +double start, double end) │ │ │ │ │ │ │ │bool al_set_audio_stream_loop_secs(ALLEGRO_AUDIO_STREAM *stream, │ │ │ │ -double start, double end)
Sets the loop points for the stream in seconds. Currently this can │ │ │ │ only be called on streams created with al_load_audio_stream, al_play_audio_stream, │ │ │ │
Unstable │ │ │ │ API: New API.
│ │ │ │
bool al_register_sample_loader(const char *ext,
│ │ │ │ -*(*loader)(const char *filename)) ALLEGRO_SAMPLE
Register a handler for al_load_sample. The given function │ │ │ │ will be used to handle the loading of sample files with the given │ │ │ │ extension.
│ │ │ │ @@ -2395,15 +2500,17 @@ │ │ │ │ unregistering an entry that doesn’t exist. │ │ │ │See also: al_register_sample_loader_f, │ │ │ │ al_register_sample_saver
│ │ │ │bool al_register_sample_loader_f(const char *ext,
│ │ │ │ -*(*loader)(ALLEGRO_FILE* fp)) ALLEGRO_SAMPLE
Register a handler for al_load_sample_f. The given │ │ │ │ function will be used to handle the loading of sample files with the │ │ │ │ given extension.
│ │ │ │ @@ -2413,15 +2520,17 @@ │ │ │ │ entry. │ │ │ │Returns true on success, false on error. Returns false if │ │ │ │ unregistering an entry that doesn’t exist.
│ │ │ │See also: al_register_sample_loader
│ │ │ │bool al_register_sample_saver(const char *ext,
│ │ │ │ -bool (*saver)(const char *filename, ALLEGRO_SAMPLE *spl))
Register a handler for al_save_sample. The given function │ │ │ │ will be used to handle the saving of sample files with the given │ │ │ │ extension.
│ │ │ │ @@ -2434,15 +2543,17 @@ │ │ │ │See also: al_register_sample_saver_f, │ │ │ │ al_register_sample_loader
│ │ │ │bool al_register_sample_saver_f(const char *ext,
│ │ │ │ -bool (*saver)(ALLEGRO_FILE* fp, ALLEGRO_SAMPLE *spl))
Register a handler for al_save_sample_f. The given │ │ │ │ function will be used to handle the saving of sample files with the │ │ │ │ given extension.
│ │ │ │ @@ -2455,15 +2566,17 @@ │ │ │ │See also: al_register_sample_saver
│ │ │ │bool al_register_audio_stream_loader(const char *ext,
│ │ │ │ *(*stream_loader)(const char *filename,
│ │ │ │ - ALLEGRO_AUDIO_STREAM size_t buffer_count, unsigned int samples))
Register a handler for al_load_audio_stream and al_play_audio_stream. The │ │ │ │ given function will be used to open streams from files with the given │ │ │ │ @@ -2477,15 +2590,18 @@ │ │ │ │
See also: al_register_audio_stream_loader_f
│ │ │ │bool al_register_audio_stream_loader_f(const char *ext,
│ │ │ │ *(*stream_loader)(ALLEGRO_FILE* fp,
│ │ │ │ - ALLEGRO_AUDIO_STREAM size_t buffer_count, unsigned int samples))
Register a handler for al_load_audio_stream_f and │ │ │ │ al_play_audio_stream_f. │ │ │ │ The given function will be used to open streams from files with the │ │ │ │ @@ -2498,15 +2614,17 @@ │ │ │ │ unregistering an entry that doesn’t exist.
│ │ │ │See also: al_register_audio_stream_loader
│ │ │ │bool al_register_sample_identifier(const char *ext,
│ │ │ │ -bool (*identifier)(ALLEGRO_FILE* fp))
Register an identify handler for al_identify_sample. The given │ │ │ │ function will be used to detect files for the given extension. It will │ │ │ │ be called with a single argument of type Returns true on success, false on error. Returns false if │ │ │ │ unregistering an entry that doesn’t exist.
│ │ │ │Since: 5.2.8
│ │ │ │See also: al_identify_bitmap
│ │ │ │char const *al_identify_sample(char const *filename)
char const *al_identify_sample(char const *filename)
│ │ │ │ +char const *al_identify_sample(char const *filename)
│ │ │ │
│ │ │ │ This works exactly as al_identify_sample_f but you │ │ │ │ specify the filename of the file for which to detect the type and not a │ │ │ │ file handle. The extension, if any, of the passed filename is not taken │ │ │ │ @@ -2539,15 +2658,16 @@ │ │ │ │
Since: 5.2.8
│ │ │ │See also: al_init_acodec_addon, al_identify_sample_f, al_register_sample_identifier
│ │ │ │char const *al_identify_sample_f(ALLEGRO_FILE *fp)
char const *al_identify_sample_f(ALLEGRO_FILE *fp)
│ │ │ │ +char const *al_identify_sample_f(ALLEGRO_FILE *fp)
│ │ │ │
│ │ │ │ Tries to guess the audio file type of the open ALLEGRO_FILE by │ │ │ │ reading the first few bytes. By default Allegro cannot recognize any │ │ │ │ file types, but calling al_init_acodec_addon will │ │ │ │ @@ -2569,15 +2689,16 @@ │ │ │ │ add a small amount of latency. However, for most applications that small │ │ │ │ overhead will not adversely affect performance.
│ │ │ │Recording is supported by the ALSA, AudioQueue, DirectSound8, and │ │ │ │ PulseAudio drivers. Enumerating or choosing other recording devices is │ │ │ │ not yet supported.
│ │ │ │typedef struct ALLEGRO_AUDIO_RECORDER ALLEGRO_AUDIO_RECORDER;
typedef struct ALLEGRO_AUDIO_RECORDER ALLEGRO_AUDIO_RECORDER;
│ │ │ │ +typedef struct ALLEGRO_AUDIO_RECORDER ALLEGRO_AUDIO_RECORDER;
│ │ │ │
│ │ │ │ An opaque datatype that represents a recording device.
│ │ │ │Since: 5.1.1
│ │ │ ││ │ │ ││ │ │ │Unstable │ │ │ │ @@ -2588,15 +2709,16 @@ │ │ │ │
│ │ │ │ex_record_name.c │ │ │ │ex_record.c │ │ │ │ │ │ │ │ALLEGRO_AUDIO_RECORDER_EVENT
│ │ │ ││ │ │ │ +class="sourceCode c">typedef struct ALLEGRO_AUDIO_RECORDER_EVENT ALLEGRO_AUDIO_RECORDER_EVENT;
typedef struct ALLEGRO_AUDIO_RECORDER_EVENT ALLEGRO_AUDIO_RECORDER_EVENT; │ │ │ │ +typedef struct ALLEGRO_AUDIO_RECORDER_EVENT ALLEGRO_AUDIO_RECORDER_EVENT;
│ │ │ │ │ │ │ │Structure that holds the audio recorder event data. Every event type │ │ │ │ will contain:
│ │ │ ││ │ │ │
│ │ │ │- .source: pointer to the audio recorder
│ │ │ │ @@ -2620,15 +2742,18 @@ │ │ │ │- ex_record.c
│ │ │ │al_create_audio_recorder
│ │ │ ││ │ │ │ +, ALLEGRO_CHANNEL_CONF chan_conf) │ │ │ │ + ALLEGRO_AUDIO_DEPTH depth*al_create_audio_recorder(size_t fragment_count, │ │ │ │ + ALLEGRO_AUDIO_RECORDER unsigned int samples, unsigned int frequency, │ │ │ │ + , ALLEGRO_CHANNEL_CONF chan_conf) │ │ │ │ ALLEGRO_AUDIO_DEPTH depth │ │ │ │*al_create_audio_recorder(size_t fragment_count, │ │ │ │ ALLEGRO_AUDIO_RECORDER unsigned int samples, unsigned int frequency, │ │ │ │ - , ALLEGRO_CHANNEL_CONF chan_conf) ALLEGRO_AUDIO_DEPTH depth
Creates an audio recorder using the system’s default recording │ │ │ │ device. (So if the returned device does not work, try updating the │ │ │ │ system’s default recording device.)
│ │ │ │Allegro will internally buffer several seconds of captured audio with │ │ │ │ @@ -2665,15 +2790,16 @@ │ │ │ │
ex_record_name.c │ │ │ │ex_record.c │ │ │ │ │ │ │ │al_start_audio_recorder
│ │ │ ││ │ │ │ +class="sourceCode c">bool al_start_audio_recorder(ALLEGRO_AUDIO_RECORDER *r)
bool al_start_audio_recorder(ALLEGRO_AUDIO_RECORDER *r) │ │ │ │ +bool al_start_audio_recorder(ALLEGRO_AUDIO_RECORDER *r)
│ │ │ │ │ │ │ │Begin recording into the fragment buffer. Once a complete fragment │ │ │ │ has been captured (as specified in al_create_audio_recorder), │ │ │ │ an ex_record_name.c │ │ │ │
ex_record.c │ │ │ │ │ │ │ │al_stop_audio_recorder
│ │ │ ││ │ │ │ +class="sourceCode c">void al_stop_audio_recorder(ALLEGRO_AUDIO_RECORDER *r)
void al_stop_audio_recorder(ALLEGRO_AUDIO_RECORDER *r) │ │ │ │ +void al_stop_audio_recorder(ALLEGRO_AUDIO_RECORDER *r)
│ │ │ │ │ │ │ │Stop capturing audio data. Note that the audio recorder is still │ │ │ │ active and consuming resources, so if you are finished recording you │ │ │ │ should destroy it with al_destroy_audio_recorder.
│ │ │ │ @@ -2710,28 +2837,30 @@ │ │ │ ││ │ │ ││ │ │ │Unstable │ │ │ │ API: The API may need a slight redesign.
│ │ │ │al_is_audio_recorder_recording
│ │ │ ││ │ │ │ +class="sourceCode c">bool al_is_audio_recorder_recording(ALLEGRO_AUDIO_RECORDER *r)
bool al_is_audio_recorder_recording(ALLEGRO_AUDIO_RECORDER *r) │ │ │ │ +bool al_is_audio_recorder_recording(ALLEGRO_AUDIO_RECORDER *r)
│ │ │ │ │ │ │ │Returns true if the audio recorder is currently capturing data and │ │ │ │ generating events.
│ │ │ │Since: 5.1.1
│ │ │ ││ │ │ ││ │ │ │Unstable │ │ │ │ API: The API may need a slight redesign.
│ │ │ │al_get_audio_recorder_event
│ │ │ ││ │ │ │ +class="sourceCode c">*al_get_audio_recorder_event(ALLEGRO_EVENT *event) ALLEGRO_AUDIO_RECORDER_EVENT
*al_get_audio_recorder_event(ALLEGRO_EVENT *event) │ │ │ │ + ALLEGRO_AUDIO_RECORDER_EVENT *al_get_audio_recorder_event(ALLEGRO_EVENT *event) ALLEGRO_AUDIO_RECORDER_EVENT
│ │ │ │ │ │ │ │Returns the event as an ALLEGRO_AUDIO_RECORDER_EVENT.
│ │ │ │Since: 5.1.1
│ │ │ ││ │ │ │ @@ -2744,15 +2873,16 @@ │ │ │ │ href="https://github.com/liballeg/allegro5/blob/master/examples/ex_record_name.c#L131">ex_record_name.c│ │ │ │ex_record.c │ │ │ │ │ │ │ │al_get_audio_recorder_event_source
│ │ │ ││ │ │ │ +class="sourceCode c">*al_get_audio_recorder_event_source(ALLEGRO_AUDIO_RECORDER *r) ALLEGRO_EVENT_SOURCE
*al_get_audio_recorder_event_source(ALLEGRO_AUDIO_RECORDER *r) │ │ │ │ + ALLEGRO_EVENT_SOURCE *al_get_audio_recorder_event_source(ALLEGRO_AUDIO_RECORDER *r) ALLEGRO_EVENT_SOURCE
│ │ │ │ │ │ │ │Returns the event source for the recorder that generates the various │ │ │ │ recording events.
│ │ │ │Since: 5.1.1
│ │ │ ││ │ │ │ @@ -2764,15 +2894,16 @@ │ │ │ │ex_record_name.c │ │ │ │ex_record.c │ │ │ │ │ │ │ │al_destroy_audio_recorder
│ │ │ ││ │ │ │ +class="sourceCode c">void al_destroy_audio_recorder(ALLEGRO_AUDIO_RECORDER *r)
void al_destroy_audio_recorder(ALLEGRO_AUDIO_RECORDER *r) │ │ │ │ +void al_destroy_audio_recorder(ALLEGRO_AUDIO_RECORDER *r)
│ │ │ │ │ │ │ │Destroys the audio recorder and frees all resources associated with │ │ │ │ it. It is safe to destroy a recorder that is recording.
│ │ │ │You may receive events after the recorder has been destroyed. They │ │ │ │ must be ignored, as the fragment buffer will no longer be valid.
│ │ │ │ @@ -2787,69 +2918,74 @@ │ │ │ │ href="https://github.com/liballeg/allegro5/blob/master/examples/ex_record_name.c#L215">ex_record_name.c │ │ │ │ex_record.c │ │ │ │ │ │ │ │Audio devices
│ │ │ │ALLEGRO_AUDIO_DEVICE
│ │ │ ││ │ │ │ +class="sourceCode c">typedef struct ALLEGRO_AUDIO_DEVICE ALLEGRO_AUDIO_DEVICE;
typedef struct ALLEGRO_AUDIO_DEVICE ALLEGRO_AUDIO_DEVICE; │ │ │ │ +typedef struct ALLEGRO_AUDIO_DEVICE ALLEGRO_AUDIO_DEVICE;
│ │ │ │ │ │ │ │An opaque datatype that represents an audio device.
│ │ │ │Examples:
│ │ │ ││ │ │ │
│ │ │ │- ex_audio_devices.c
│ │ │ │al_get_num_audio_output_devices
│ │ │ ││ │ │ │ +class="sourceCode c">int al_get_num_audio_output_devices()
int al_get_num_audio_output_devices() │ │ │ │ +int al_get_num_audio_output_devices()
│ │ │ │ │ │ │ │Get the number of available audio output devices on the system.
│ │ │ │Since: 5.2.8
│ │ │ │return -1 for unsupported drivers.
│ │ │ │Examples:
│ │ │ ││ │ │ │
│ │ │ │- ex_audio_devices.c
│ │ │ │al_get_audio_output_device
│ │ │ ││ │ │ │ +class="sourceCode c">const ALLEGRO_AUDIO_DEVICE* al_get_audio_output_device(int index)
const ALLEGRO_AUDIO_DEVICE* al_get_audio_output_device(int index) │ │ │ │ +const ALLEGRO_AUDIO_DEVICE* al_get_audio_output_device(int index)
│ │ │ │ │ │ │ │Get the output audio device of the specified index.
│ │ │ │Since: 5.2.8
│ │ │ │Examples:
│ │ │ ││ │ │ │
│ │ │ │- ex_audio_devices.c
│ │ │ │al_get_audio_device_name
│ │ │ ││ │ │ │ +class="sourceCode c">const char* al_get_audio_device_name(const ALLEGRO_AUDIO_DEVICE * device)
const char* al_get_audio_device_name(const ALLEGRO_AUDIO_DEVICE * device) │ │ │ │ +const char* al_get_audio_device_name(const ALLEGRO_AUDIO_DEVICE * device)
│ │ │ │ │ │ │ │Get the user friendly display name of the device.
│ │ │ │Since: 5.2.8
│ │ │ │Examples:
│ │ │ ││ │ │ │
│ │ │ │- ex_audio_devices.c
│ │ │ │Voices
│ │ │ │ALLEGRO_VOICE
│ │ │ ││ │ │ │ +class="sourceCode c">typedef struct ALLEGRO_VOICE ALLEGRO_VOICE;
typedef struct ALLEGRO_VOICE ALLEGRO_VOICE; │ │ │ │ +typedef struct ALLEGRO_VOICE ALLEGRO_VOICE;
│ │ │ │ │ │ │ │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 │ │ │ │ back audio, you would attach a mixer, sample instance or audio stream to │ │ │ │ a voice.
│ │ │ │ @@ -2864,15 +3000,17 @@ │ │ │ │ href="https://github.com/liballeg/allegro5/blob/master/examples/ex_acodec_multi.c#L24">ex_acodec_multi.c │ │ │ │ex_kcm_direct.c │ │ │ │ │ │ │ │al_create_voice
│ │ │ ││ │ │ │ +, ALLEGRO_CHANNEL_CONF chan_conf) │ │ │ │ + ALLEGRO_AUDIO_DEPTH depth*al_create_voice(unsigned int freq, │ │ │ │ + ALLEGRO_VOICE , ALLEGRO_CHANNEL_CONF chan_conf) │ │ │ │ ALLEGRO_AUDIO_DEPTH depth │ │ │ │*al_create_voice(unsigned int freq, │ │ │ │ - ALLEGRO_VOICE , ALLEGRO_CHANNEL_CONF chan_conf) ALLEGRO_AUDIO_DEPTH depth
Creates a voice structure and allocates a voice from the digital │ │ │ │ sound driver. The passed frequency (in Hz), sample format and channel │ │ │ │ configuration are used as a hint to what kind of data will be sent to │ │ │ │ the voice. However, the underlying sound driver is free to use │ │ │ │ @@ -2895,15 +3033,16 @@ │ │ │ │
ex_acodec_multi.c │ │ │ │ex_kcm_direct.c │ │ │ │ │ │ │ │al_destroy_voice
│ │ │ ││ │ │ │ +class="sourceCode c">void al_destroy_voice(ALLEGRO_VOICE *voice)
void al_destroy_voice(ALLEGRO_VOICE *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.
│ │ │ │See also: al_create_voice
│ │ │ │ @@ -2914,15 +3053,16 @@ │ │ │ │ex_acodec_multi.c │ │ │ │ex_kcm_direct.c │ │ │ │ │ │ │ │al_detach_voice
│ │ │ ││ │ │ │ +class="sourceCode c">void al_detach_voice(ALLEGRO_VOICE *voice)
void al_detach_voice(ALLEGRO_VOICE *voice) │ │ │ │ +void al_detach_voice(ALLEGRO_VOICE *voice)
│ │ │ │ │ │ │ │Detaches the mixer, sample instance or audio stream from the │ │ │ │ voice.
│ │ │ │See also: al_attach_mixer_to_voice, │ │ │ │ @@ -2930,15 +3070,17 @@ │ │ │ │ href="audio.html#al_attach_sample_instance_to_voice">al_attach_sample_instance_to_voice, │ │ │ │ al_attach_audio_stream_to_voice
│ │ │ │al_attach_audio_stream_to_voice
│ │ │ ││ │ │ │ +*voice) │ │ │ │ + ALLEGRO_VOICE bool al_attach_audio_stream_to_voice(ALLEGRO_AUDIO_STREAM *stream, │ │ │ │ +*voice) │ │ │ │ ALLEGRO_VOICE │ │ │ │bool al_attach_audio_stream_to_voice(ALLEGRO_AUDIO_STREAM *stream, │ │ │ │ -*voice) ALLEGRO_VOICE
Attaches an audio stream to a voice. The same rules as al_attach_sample_instance_to_voice │ │ │ │ apply. This may fail if the driver can’t create a voice with the buffer │ │ │ │ count and buffer size the stream uses.
│ │ │ │ @@ -2956,15 +3098,16 @@ │ │ │ │ex_stream_file.c │ │ │ │ex_audio_chain.cpp │ │ │ │ │ │ │ │al_attach_mixer_to_voice
│ │ │ ││ │ │ │ +class="sourceCode c">bool al_attach_mixer_to_voice(ALLEGRO_MIXER *mixer, ALLEGRO_VOICE *voice)
bool al_attach_mixer_to_voice(ALLEGRO_MIXER *mixer, ALLEGRO_VOICE *voice) │ │ │ │ +bool al_attach_mixer_to_voice(ALLEGRO_MIXER *mixer, ALLEGRO_VOICE *voice)
│ │ │ │ │ │ │ │Attaches a mixer to a voice. It must have the same frequency and │ │ │ │ channel configuration, but the depth may be different.
│ │ │ │Returns true on success, false on failure.
│ │ │ │See also: al_detach_voice, │ │ │ │ @@ -2979,15 +3122,17 @@ │ │ │ │
ex_mixer_chain.c │ │ │ │ │ │ │ │al_attach_sample_instance_to_voice
│ │ │ ││ │ │ │ +*voice) │ │ │ │ + ALLEGRO_VOICE bool al_attach_sample_instance_to_voice(ALLEGRO_SAMPLE_INSTANCE *spl, │ │ │ │ +*voice) │ │ │ │ ALLEGRO_VOICE │ │ │ │bool al_attach_sample_instance_to_voice(ALLEGRO_SAMPLE_INSTANCE *spl, │ │ │ │ -*voice) ALLEGRO_VOICE
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 │ │ │ │ frequency, channel configuration and depth (including signed-ness) as │ │ │ │ the voice. This function may fail if the selected driver doesn’t support │ │ │ │ @@ -3003,54 +3148,59 @@ │ │ │ │
ex_kcm_direct.c │ │ │ │ex_audio_chain.cpp │ │ │ │ │ │ │ │al_get_voice_frequency
│ │ │ ││ │ │ │ +class="sourceCode c">unsigned int al_get_voice_frequency(const ALLEGRO_VOICE *voice)
unsigned int al_get_voic) │ │ │ │ +unsigned int al_get_voice_frequency(const ALLEGRO_VOICE *voice)
│ │ │ │ │ │ │ │Return the frequency of the voice (in Hz), e.g. 44100.
│ │ │ │al_get_voice_channels
│ │ │ ││ │ │ │ +class="sourceCode c">(const ALLEGRO_VOICE *voice) ALLEGRO_CHANNEL_CONF al_get_voice_channels
(const ALLEGRO_VOICE *voice) │ │ │ │ + ALLEGRO_CHANNEL_CONF al_get_voice_channels(const ALLEGRO_VOICE *voice) ALLEGRO_CHANNEL_CONF al_get_voice_channels
│ │ │ │ │ │ │ │Return the channel configuration of the voice.
│ │ │ │See also: ALLEGRO_CHANNEL_CONF.
│ │ │ │al_get_voice_depth
│ │ │ ││ │ │ │ +class="sourceCode c">(const ALLEGRO_VOICE *voice) ALLEGRO_AUDIO_DEPTH al_get_voice_depth
(const ALLEGRO_VOICE *voice) │ │ │ │ + ALLEGRO_AUDIO_DEPTH al_get_voice_depth(const ALLEGRO_VOICE *voice) ALLEGRO_AUDIO_DEPTH al_get_voice_depth
│ │ │ │ │ │ │ │Return the audio depth of the voice.
│ │ │ │See also: ALLEGRO_AUDIO_DEPTH.
│ │ │ │al_get_voice_playing
│ │ │ ││ │ │ │ +class="sourceCode c">bool al_get_voice_playing(const ALLEGRO_VOICE *voice)
bool al_get_voice_playing(const ALLEGRO_VOICE *voice) │ │ │ │ +bool al_get_voice_playing(const ALLEGRO_VOICE *voice)
│ │ │ │ │ │ │ │Return true if the voice is currently playing.
│ │ │ │See also: al_set_voice_playing
│ │ │ │Examples:
│ │ │ ││ │ │ │
│ │ │ │- ex_audio_chain.cpp
│ │ │ │al_set_voice_playing
│ │ │ ││ │ │ │ +class="sourceCode c">bool al_set_voice_playing(ALLEGRO_VOICE *voice, bool val)
bool al_set_voice_playing(ALLEGRO_VOICE *voice, bool val) │ │ │ │ +bool al_set_voice_playing(ALLEGRO_VOICE *voice, bool val)
│ │ │ │ │ │ │ │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. │ │ │ │ On success the voice’s current sample position is reset.
│ │ │ │Returns true on success, false on failure.
│ │ │ │ @@ -3059,52 +3209,56 @@ │ │ │ │Examples:
│ │ │ ││ │ │ │
│ │ │ │- ex_audio_chain.cpp
│ │ │ │al_get_voice_position
│ │ │ ││ │ │ │ +class="sourceCode c">unsigned int al_get_voice_position(const ALLEGRO_VOICE *voice)
unsigned int al_get_voice_position(const ALLEGRO_VOICE *voice) │ │ │ │ +unsigned int al_get_voice_position(const ALLEGRO_VOICE *voice)
│ │ │ │ │ │ │ │When the voice has a non-streaming object attached to it, e.g. a │ │ │ │ sample, returns the voice’s current sample position. Otherwise, returns │ │ │ │ zero.
│ │ │ │See also: al_set_voice_position.
│ │ │ │al_set_voice_position
│ │ │ ││ │ │ │ +class="sourceCode c">bool al_set_voice_position(ALLEGRO_VOICE *voice, unsigned int val)
bool al_set_voice_position(ALLEGRO_VOICE *voice, unsigned int val) │ │ │ │ +bool al_set_voice_position(ALLEGRO_VOICE *voice, unsigned int val)
│ │ │ │ │ │ │ │Set the voice position. This can only work if the voice has a │ │ │ │ non-streaming object attached to it, e.g. a sample instance.
│ │ │ │Returns true on success, false on failure.
│ │ │ │See also: al_get_voice_position.
│ │ │ │al_voice_has_attachments
│ │ │ ││ │ │ │ +class="sourceCode c">bool al_voice_has_attachments(const ALLEGRO_VOICE* voice)
bool al_voice_has_attachments(const ALLEGRO_VOICE* voice) │ │ │ │ +bool al_voice_has_attachments(const ALLEGRO_VOICE* voice)
│ │ │ │ │ │ │ │Returns true if the voice has something attached to it.
│ │ │ │See also: al_attach_mixer_to_voice, │ │ │ │ al_attach_sample_instance_to_voice, │ │ │ │ al_attach_audio_stream_to_voice
│ │ │ │Since: 5.2.9
│ │ │ │Mixers
│ │ │ │ALLEGRO_MIXER
│ │ │ ││ │ │ │ +class="sourceCode c">typedef struct ALLEGRO_MIXER ALLEGRO_MIXER;
typedef struct ALLEGRO_MIXER ALLEGRO_MIXER; │ │ │ │ +typedef struct ALLEGRO_MIXER ALLEGRO_MIXER;
│ │ │ │ │ │ │ │A mixer mixes together attached streams into a single buffer. In the │ │ │ │ process, it converts channel configurations, sample frequencies and │ │ │ │ audio depths of the attached sample instances and audio streams │ │ │ │ accordingly. You can control the quality of this conversion using │ │ │ │ @@ -3121,28 +3275,31 @@ │ │ │ │
ex_acodec_multi.c │ │ │ │ex_mixer_chain.c │ │ │ │ │ │ │ │ALLEGRO_MIXER_QUALITY
│ │ │ ││ │ │ │ +class="sourceCode c">enum ALLEGRO_MIXER_QUALITY
enum ALLEGRO_MIXER_QUALITY │ │ │ │ +enum ALLEGRO_MIXER_QUALITY
│ │ │ │ │ │ │ ││ │ │ │
│ │ │ │- ALLEGRO_MIXER_QUALITY_POINT - point sampling
│ │ │ │- ALLEGRO_MIXER_QUALITY_LINEAR - linear interpolation
│ │ │ │- ALLEGRO_MIXER_QUALITY_CUBIC - cubic interpolation (since: 5.0.8, │ │ │ │ 5.1.4)
│ │ │ │al_create_mixer
│ │ │ ││ │ │ │ +, ALLEGRO_CHANNEL_CONF chan_conf) │ │ │ │ + ALLEGRO_AUDIO_DEPTH depth*al_create_mixer(unsigned int freq, │ │ │ │ + ALLEGRO_MIXER , ALLEGRO_CHANNEL_CONF chan_conf) │ │ │ │ ALLEGRO_AUDIO_DEPTH depth │ │ │ │*al_create_mixer(unsigned int freq, │ │ │ │ - ALLEGRO_MIXER , ALLEGRO_CHANNEL_CONF chan_conf) ALLEGRO_AUDIO_DEPTH depth
Creates a mixer to attach sample instances, audio streams, or other │ │ │ │ mixers to. It will mix into a buffer at the requested frequency (in Hz) │ │ │ │ and channel count.
│ │ │ │The only supported audio depths are ALLEGRO_AUDIO_DEPTH_FLOAT32 and │ │ │ │ @@ -3164,15 +3321,16 @@ │ │ │ │
ex_acodec_multi.c │ │ │ │ex_mixer_chain.c │ │ │ │ │ │ │ │al_destroy_mixer
│ │ │ ││ │ │ │ +class="sourceCode c">void al_destroy_mixer(ALLEGRO_MIXER *mixer)
void al_destroy_mixer(ALLEGRO_MIXER *mixer) │ │ │ │ +void al_destroy_mixer(ALLEGRO_MIXER *mixer)
│ │ │ │ │ │ │ │Destroys the mixer.
│ │ │ │See also: al_create_mixer
│ │ │ │Examples:
│ │ │ │ @@ -3182,15 +3340,16 @@ │ │ │ │ex_acodec_multi.c │ │ │ │ex_mixer_chain.c │ │ │ │ │ │ │ │al_get_default_mixer
│ │ │ ││ │ │ │ +class="sourceCode c">*al_get_default_mixer(void) ALLEGRO_MIXER
*al_get_default_mixer(void) │ │ │ │ + ALLEGRO_MIXER *al_get_default_mixer(void) ALLEGRO_MIXER
│ │ │ │ │ │ │ │Return the default mixer, or NULL if one has not been set. Although │ │ │ │ different configurations of mixers and voices can be used, in most cases │ │ │ │ a single mixer attached to a voice is what you want. The default mixer │ │ │ │ is used by al_play_sample.
│ │ │ │ @@ -3206,15 +3365,16 @@ │ │ │ │ex_audio_props.cpp │ │ │ │ex_resample_test.c │ │ │ │ │ │ │ │al_set_default_mixer
│ │ │ ││ │ │ │ +class="sourceCode c">bool al_set_default_mixer(ALLEGRO_MIXER *mixer)
bool al_set_default_mixer(ALLEGRO_MIXER *mixer) │ │ │ │ +bool al_set_default_mixer(ALLEGRO_MIXER *mixer)
│ │ │ │ │ │ │ │Sets the default mixer. All samples started with al_play_sample will be stopped and │ │ │ │ all sample instances returned by al_lock_sample_id will be │ │ │ │ @@ -3225,15 +3385,16 @@ │ │ │ │
See also: al_reserve_samples, al_play_sample, al_get_default_mixer, al_restore_default_mixer
│ │ │ │al_restore_default_mixer
│ │ │ ││ │ │ │ +class="sourceCode c">bool al_restore_default_mixer(void)
bool al_restore_default_mixer(void) │ │ │ │ +bool al_restore_default_mixer(void)
│ │ │ │ │ │ │ │Restores Allegro’s default mixer and attaches it to the default │ │ │ │ voice. If the default mixer hasn’t been created before, it will be │ │ │ │ created. If the default voice hasn’t been set via al_set_default_voice or │ │ │ │ @@ -3245,37 +3406,40 @@ │ │ │ │
Returns true on success, false on error.
│ │ │ │See also: al_get_default_mixer, al_set_default_mixer, al_reserve_samples.
│ │ │ │al_get_default_voice
│ │ │ ││ │ │ │ +class="sourceCode c">*al_get_default_voice(void) ALLEGRO_VOICE
*al_get_default_voice(void) │ │ │ │ + ALLEGRO_VOICE *al_get_default_voice(void) ALLEGRO_VOICE
│ │ │ │ │ │ │ │Returns the default voice or NULL if there is none.
│ │ │ │Since: 5.1.13
│ │ │ │See also: al_get_default_mixer
│ │ │ │al_set_default_voice
│ │ │ ││ │ │ │ +class="sourceCode c">void al_set_default_voice(ALLEGRO_VOICE *voice)
void al_set_default_voice(ALLEGRO_VOICE *voice) │ │ │ │ +void al_set_default_voice(ALLEGRO_VOICE *voice)
│ │ │ │ │ │ │ │You can call this before calling al_restore_default_mixer to provide │ │ │ │ the voice which should be used. Any previous voice will be destroyed. │ │ │ │ You can also pass NULL to destroy the current default voice.
│ │ │ │Since: 5.1.13
│ │ │ │See also: al_get_default_mixer
│ │ │ │al_attach_mixer_to_mixer
│ │ │ ││ │ │ │ +class="sourceCode c">bool al_attach_mixer_to_mixer(ALLEGRO_MIXER *stream, ALLEGRO_MIXER *mixer)
bool al_attach_mixer_to_mixer(ALLEGRO_MIXER *stream, ALLEGRO_MIXER *mixer) │ │ │ │ +bool al_attach_mixer_to_mixer(ALLEGRO_MIXER *stream, ALLEGRO_MIXER *mixer)
│ │ │ │ │ │ │ │Attaches the mixer passed as the first argument onto the mixer passed │ │ │ │ as the second argument. The first mixer (that is going to be attached) │ │ │ │ must not already be attached to anything. Both mixers must use the same │ │ │ │ frequency, audio depth and channel configuration.
│ │ │ │ @@ -3290,15 +3454,17 @@ │ │ │ │ex_audio_chain.cpp │ │ │ │ │ │ │ │al_attach_sample_instance_to_mixer
│ │ │ ││ │ │ │ +*mixer) │ │ │ │ + ALLEGRO_MIXER bool al_attach_sample_instance_to_mixer(ALLEGRO_SAMPLE_INSTANCE *spl, │ │ │ │ +*mixer) │ │ │ │ ALLEGRO_MIXER │ │ │ │bool al_attach_sample_instance_to_mixer(ALLEGRO_SAMPLE_INSTANCE *spl, │ │ │ │ -*mixer) ALLEGRO_MIXER
Attach a sample instance to a mixer. The instance must not already be │ │ │ │ attached to anything.
│ │ │ │Returns true on success, false on failure.
│ │ │ │See also: ex_mixer_chain.c │ │ │ │
ex_acodec.c │ │ │ │ │ │ │ │al_attach_audio_stream_to_mixer
│ │ │ ││ │ │ │ +class="sourceCode c">bool al_attach_audio_stream_to_mixer(ALLEGRO_AUDIO_STREAM *stream, ALLEGRO_MIXER *mixer)
bool al_attach_audio_stream_to_mixer(ALLEGRO_AUDIO_STREAM *stream, ALLEGRO_MIXER *mixer) │ │ │ │ +bool al_attach_audio_stream_to_mixer(ALLEGRO_AUDIO_STREAM *stream, ALLEGRO_MIXER *mixer)
│ │ │ │ │ │ │ │Attach an audio stream to a mixer. The stream must not already be │ │ │ │ attached to anything.
│ │ │ │Returns true on success, false on failure.
│ │ │ │See also: ex_stream_file.c │ │ │ │
ex_resample_test.c │ │ │ │ │ │ │ │al_get_mixer_frequency
│ │ │ ││ │ │ │ +class="sourceCode c">unsigned int al_get_mixer_frequency(const ALLEGRO_MIXER *mixer)
unsigned int al_get_mixer_frequency(const ALLEGRO_MIXER *mixer) │ │ │ │ +unsigned int al_get_mixer_frequency(const ALLEGRO_MIXER *mixer)
│ │ │ │ │ │ │ │Return the mixer frequency (in Hz).
│ │ │ │See also: al_set_mixer_frequency
│ │ │ │al_set_mixer_frequency
│ │ │ ││ │ │ │ +class="sourceCode c">bool al_set_mixer_frequency(ALLEGRO_MIXER *mixer, unsigned int val)
bool al_set_mixer_frequency(ALLEGRO_MIXER *mixer, unsigned int val) │ │ │ │ +bool al_set_mixer_frequency(ALLEGRO_MIXER *mixer, unsigned int val)
│ │ │ │ │ │ │ │Set the mixer frequency (in Hz). This will only work if the mixer is │ │ │ │ not attached to anything.
│ │ │ │Returns true on success, false on failure.
│ │ │ │See also: al_get_mixer_frequency
│ │ │ │al_get_mixer_channels
│ │ │ ││ │ │ │ +class="sourceCode c">(const ALLEGRO_MIXER *mixer) ALLEGRO_CHANNEL_CONF al_get_mixer_channels
(const ALLEGRO_MIXER *mixer) │ │ │ │ + ALLEGRO_CHANNEL_CONF al_get_mixer_channels(const ALLEGRO_MIXER *mixer) ALLEGRO_CHANNEL_CONF al_get_mixer_channels
│ │ │ │ │ │ │ │Return the mixer channel configuration.
│ │ │ │See also: ALLEGRO_CHANNEL_CONF.
│ │ │ │Examples:
│ │ │ ││ │ │ │
│ │ │ │- ex_synth.cpp
│ │ │ │al_get_mixer_depth
│ │ │ ││ │ │ │ +class="sourceCode c">(const ALLEGRO_MIXER *mixer) ALLEGRO_AUDIO_DEPTH al_get_mixer_depth
(const ALLEGRO_MIXER *mixer) │ │ │ │ + ALLEGRO_AUDIO_DEPTH al_get_mixer_depth(const ALLEGRO_MIXER *mixer) ALLEGRO_AUDIO_DEPTH al_get_mixer_depth
│ │ │ │ │ │ │ │Return the mixer audio depth.
│ │ │ │See also: ALLEGRO_AUDIO_DEPTH.
│ │ │ │Examples:
│ │ │ ││ │ │ │
│ │ │ │- ex_synth.cpp
│ │ │ │al_get_mixer_gain
│ │ │ ││ │ │ │ +class="sourceCode c">float al_get_mixer_gain(const ALLEGRO_MIXER *mixer)
float al_get_mixer_gain(const ALLEGRO_MIXER *mixer) │ │ │ │ +float al_get_mixer_gain(const ALLEGRO_MIXER *mixer)
│ │ │ │ │ │ │ │Return the mixer gain (amplification factor). The default is 1.0.
│ │ │ │Since: 5.0.6, 5.1.0
│ │ │ │See also: al_set_mixer_gain.
│ │ │ │Examples:
│ │ │ ││ │ │ │
│ │ │ │- ex_audio_chain.cpp
│ │ │ │al_set_mixer_gain
│ │ │ ││ │ │ │ +class="sourceCode c">bool al_set_mixer_gain(ALLEGRO_MIXER *mixer, float new_gain)
bool al_set_mixer_gain(ALLEGRO_MIXER *mixer, float new_gain) │ │ │ │ +bool al_set_mixer_gain(ALLEGRO_MIXER *mixer, float new_gain)
│ │ │ │ │ │ │ │Set the mixer gain (amplification factor).
│ │ │ │Returns true on success, false on failure.
│ │ │ │Since: 5.0.6, 5.1.0
│ │ │ │See also: ex_audio_props.cpp │ │ │ │
ex_audio_chain.cpp │ │ │ │ │ │ │ │al_get_mixer_quality
│ │ │ ││ │ │ │ +class="sourceCode c">(const ALLEGRO_MIXER *mixer) ALLEGRO_MIXER_QUALITY al_get_mixer_quality
(const ALLEGRO_MIXER *mixer) │ │ │ │ + ALLEGRO_MIXER_QUALITY al_get_mixer_quality(const ALLEGRO_MIXER *mixer) ALLEGRO_MIXER_QUALITY al_get_mixer_quality
│ │ │ │ │ │ │ │Return the mixer quality.
│ │ │ │See also: ALLEGRO_MIXER_QUALITY, al_set_mixer_quality
│ │ │ │ @@ -3434,44 +3608,47 @@ │ │ │ │ have anything attached to it.Returns true on success, false on failure.
│ │ │ │See also: ALLEGRO_MIXER_QUALITY, al_get_mixer_quality
│ │ │ │al_get_mixer_playing
│ │ │ ││ │ │ │ +class="sourceCode c">bool al_get_mixer_playing(const ALLEGRO_MIXER *mixer)
bool al_get_mixer_playing(const ALLEGRO_MIXER *mixer) │ │ │ │ +bool al_get_mixer_playing(const ALLEGRO_MIXER *mixer)
│ │ │ │ │ │ │ │Return true if the mixer is playing.
│ │ │ │See also: al_set_mixer_playing.
│ │ │ │Examples:
│ │ │ ││ │ │ │
│ │ │ │- ex_audio_chain.cpp
│ │ │ │al_set_mixer_playing
│ │ │ ││ │ │ │ +class="sourceCode c">bool al_set_mixer_playing(ALLEGRO_MIXER *mixer, bool val)
bool al_set_mixer_playing(ALLEGRO_MIXER *mixer, bool val) │ │ │ │ +bool al_set_mixer_playing(ALLEGRO_MIXER *mixer, bool val)
│ │ │ │ │ │ │ │Change whether the mixer is playing.
│ │ │ │Returns true on success, false on failure.
│ │ │ │See also: al_get_mixer_playing.
│ │ │ │Examples:
│ │ │ ││ │ │ │
│ │ │ │- ex_audio_chain.cpp
│ │ │ │al_get_mixer_attached
│ │ │ ││ │ │ │ +class="sourceCode c">bool al_get_mixer_attached(const ALLEGRO_MIXER *mixer)
bool al_get_mixer_attached(const ALLEGRO_MIXER *mixer) │ │ │ │ +bool al_get_mixer_attached(const ALLEGRO_MIXER *mixer)
│ │ │ │ │ │ │ │Return true if the mixer is attached to something.
│ │ │ │See also: al_mixer_has_attachments, │ │ │ │ al_attach_audio_stream_to_mixer, │ │ │ │ al_attach_mixer_to_mixer, │ │ │ │ al_detach_mixer
│ │ │ │al_mixer_has_attachments
│ │ │ ││ │ │ │ +class="sourceCode c">bool al_mixer_has_attachments(const ALLEGRO_MIXER* mixer)
bool al_mixer_has_attachments(const ALLEGRO_MIXER* mixer) │ │ │ │ +bool al_mixer_has_attachments(const ALLEGRO_MIXER* mixer)
│ │ │ │ │ │ │ │Returns true if the mixer has something attached to it.
│ │ │ │See also: al_get_mixer_attached, al_attach_sample_instance_to_mixer, │ │ │ │ @@ -3495,15 +3673,16 @@ │ │ │ │ href="audio.html#al_attach_audio_stream_to_mixer">al_attach_audio_stream_to_mixer, │ │ │ │ al_attach_mixer_to_mixer, │ │ │ │ al_detach_mixer
│ │ │ │Since: 5.2.9
│ │ │ │al_detach_mixer
│ │ │ ││ │ │ │ +class="sourceCode c">bool al_detach_mixer(ALLEGRO_MIXER *mixer)
bool al_detach_mixer(ALLEGRO_MIXER *mixer) │ │ │ │ +bool al_detach_mixer(ALLEGRO_MIXER *mixer)
│ │ │ │ │ │ │ │Detach the mixer from whatever it is attached to, if anything.
│ │ │ │See also: al_attach_mixer_to_mixer.
│ │ │ │Examples:
│ │ │ │ @@ -3512,15 +3691,18 @@ │ │ │ │ href="https://github.com/liballeg/allegro5/blob/master/examples/ex_audio_chain.cpp#L460">ex_audio_chain.cpp │ │ │ │ │ │ │ │al_set_mixer_postprocess_callback
│ │ │ ││ │ │ │ + void *pp_callback_userdata) │ │ │ │ +bool al_set_mixer_postprocess_callback(ALLEGRO_MIXER *mixer, │ │ │ │ + void (*pp_callback)(void *buf, unsigned int samples, void *data), │ │ │ │ + void *pp_callback_userdata) │ │ │ │ │ │ │ │bool al_set_mixer_postprocess_callback(ALLEGRO_MIXER *mixer, │ │ │ │ void (*pp_callback)(void *buf, unsigned int samples, void *data), │ │ │ │ - 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.
│ │ │ │ @@ -3536,15 +3718,16 @@ │ │ │ │ href="https://github.com/liballeg/allegro5/blob/master/examples/ex_synth.cpp#L490">ex_synth.cpp │ │ │ │ex_mixer_pp.c │ │ │ │ │ │ │ │Miscelaneous
│ │ │ │ALLEGRO_AUDIO_DEPTH
│ │ │ ││ │ │ │ +class="sourceCode c">enum ALLEGRO_AUDIO_DEPTH
enum ALLEGRO_AUDIO_DEPTH │ │ │ │ +enum ALLEGRO_AUDIO_DEPTH
│ │ │ │ │ │ │ │Sample depth and type as well as signedness. Mixers only use 32-bit │ │ │ │ signed float (-1..+1), or 16-bit signed integers. Signedness is │ │ │ │ determined by an “unsigned” bit-flag applied to the depth value.
│ │ │ ││ │ │ │ @@ -3567,15 +3750,16 @@ │ │ │ │
│ │ │ │- ex_stream_file.c
│ │ │ │- ex_acodec_multi.c
│ │ │ │ALLEGRO_AUDIO_PAN_NONE
│ │ │ ││ │ │ │ +class="sourceCode c">#define ALLEGRO_AUDIO_PAN_NONE (-1000.0f)
#define ALLEGRO_AUDIO_PAN_NONE (-1000.0f) │ │ │ │ +#define ALLEGRO_AUDIO_PAN_NONE (-1000.0f)
│ │ │ │ │ │ │ │A special value for the pan property of sample instances and audio │ │ │ │ streams. Use this value to disable panning on sample instances and audio │ │ │ │ streams, and play them without attentuation implied by panning │ │ │ │ support.
│ │ │ │ @@ -3589,15 +3773,16 @@ │ │ │ │Examples:
│ │ │ ││ │ │ │
│ │ │ │- ex_audio_props.cpp
│ │ │ │ALLEGRO_CHANNEL_CONF
│ │ │ ││ │ │ │ +class="sourceCode c">enum ALLEGRO_CHANNEL_CONF
enum ALLEGRO_CHANNEL_CONF │ │ │ │ +enum ALLEGRO_CHANNEL_CONF
│ │ │ │ │ │ │ │Speaker configuration (mono, stereo, 2.1, etc).
│ │ │ ││ │ │ │
│ │ │ │- ALLEGRO_CHANNEL_CONF_1
│ │ │ │- ALLEGRO_CHANNEL_CONF_2
│ │ │ │ @@ -3614,15 +3799,16 @@ │ │ │ │- ex_stream_file.c
│ │ │ │- ex_acodec_multi.c
│ │ │ │ALLEGRO_PLAYMODE
│ │ │ ││ │ │ │ +class="sourceCode c">enum ALLEGRO_PLAYMODE
enum ALLEGRO_PLAYMODE │ │ │ │ +enum ALLEGRO_PLAYMODE
│ │ │ │ │ │ │ │Sample and stream playback mode.
│ │ │ ││ │ │ │
│ │ │ │- ALLEGRO_PLAYMODE_ONCE - the sample/stream is played from start to │ │ │ │ finish an then it stops.
│ │ │ │ @@ -3644,15 +3830,16 @@ │ │ │ │- ex_kcm_direct.c
│ │ │ │- ex_mixer_chain.c
│ │ │ │ALLEGRO_AUDIO_EVENT_TYPE
│ │ │ ││ │ │ │ +class="sourceCode c">enum ALLEGRO_AUDIO_EVENT_TYPE
enum ALLEGRO_AUDIO_EVENT_TYPE │ │ │ │ +enum ALLEGRO_AUDIO_EVENT_TYPE
│ │ │ │ │ │ │ │Events sent by al_get_audio_stream_event_source │ │ │ │ or al_get_audio_recorder_event_source.
│ │ │ │ @@ -3675,52 +3862,57 @@ │ │ │ │Since: 5.1.1
│ │ │ ││ │ │ ││ │ │ │Unstable │ │ │ │ API: The API may need a slight redesign.
│ │ │ │al_get_allegro_audio_version
│ │ │ ││ │ │ │ +class="sourceCode c">uint32_t al_get_allegro_audio_version(void)
uint32_t al_get_allegro_audio_version(void) │ │ │ │ +uint32_t al_get_allegro_audio_version(void)
│ │ │ │ │ │ │ │Returns the (compiled) version of the addon, in the same format as al_get_allegro_version.
│ │ │ │al_get_audio_depth_size
│ │ │ ││ │ │ │ +class="sourceCode c">size_t al_get_audio_depth_size(ALLEGRO_AUDIO_DEPTH depth)
size_t al_get_audio_depth_size(ALLEGRO_AUDIO_DEPTH depth) │ │ │ │ +size_t al_get_audio_depth_size(ALLEGRO_AUDIO_DEPTH depth)
│ │ │ │ │ │ │ │Return the size of a sample, in bytes, for the given format. The │ │ │ │ format is one of the values listed under ALLEGRO_AUDIO_DEPTH.
│ │ │ │Examples:
│ │ │ ││ │ │ │
│ │ │ │- ex_synth.cpp
│ │ │ │al_get_channel_count
│ │ │ ││ │ │ │ +class="sourceCode c">size_t al_get_channel_count(ALLEGRO_CHANNEL_CONF conf)
size_t al_get_channel_count(ALLEGRO_CHANNEL_CONF conf) │ │ │ │ +size_t al_get_channel_count(ALLEGRO_CHANNEL_CONF conf)
│ │ │ │ │ │ │ │Return the number of channels for the given channel configuration, │ │ │ │ which is one of the values listed under ALLEGRO_CHANNEL_CONF.
│ │ │ │Examples:
│ │ │ ││ │ │ │
│ │ │ │- ex_acodec.c
│ │ │ │al_fill_silence
│ │ │ ││ │ │ │ + ALLEGRO_AUDIO_DEPTH depth, ALLEGRO_CHANNEL_CONF chan_conf) │ │ │ │ +void al_fill_silence(void *buf, unsigned int samples, │ │ │ │ + ALLEGRO_AUDIO_DEPTH depth, ALLEGRO_CHANNEL_CONF chan_conf) │ │ │ │ │ │ │ │void al_fill_silence(void *buf, unsigned int samples, │ │ │ │ -, ALLEGRO_CHANNEL_CONF chan_conf) ALLEGRO_AUDIO_DEPTH depth
Fill a buffer with silence, for the given format and channel │ │ │ │ configuration. The buffer must have enough space for the given number of │ │ │ │ samples, and be properly aligned.
│ │ │ │Since: 5.1.8
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -228,49 +228,54 @@ │ │ │ │ │ samples, you can use the _A_L_L_E_G_R_O___S_A_M_P_L_E___I_D that al_play_sample returns. │ │ │ │ │ If you want to play large audio files (e.g. background music) without loading │ │ │ │ │ the whole file at once you can use _a_l___p_l_a_y___a_u_d_i_o___s_t_r_e_a_m (after calling │ │ │ │ │ _a_l___r_e_s_e_r_v_e___s_a_m_p_l_e_s). This will load and play an ALLEGRO_AUDIO_STREAM. Note that │ │ │ │ │ the basic API only supports one such audio stream playing at once. │ │ │ │ │ ********** AALLLLEEGGRROO__SSAAMMPPLLEE__IIDD ********** │ │ │ │ │ typedef struct ALLEGRO_SAMPLE_ID ALLEGRO_SAMPLE_ID; │ │ │ │ │ +typedef struct ALLEGRO_SAMPLE_ID ALLEGRO_SAMPLE_ID; │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ An ALLEGRO_SAMPLE_ID represents a sample being played via _a_l___p_l_a_y___s_a_m_p_l_e. It │ │ │ │ │ can be used to later stop the sample with _a_l___s_t_o_p___s_a_m_p_l_e. The underlying │ │ │ │ │ ALLEGRO_SAMPLE_INSTANCE can be extracted using _a_l___l_o_c_k___s_a_m_p_l_e___i_d. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___s_i_m_p_l_e_._c │ │ │ │ │ ********** aall__iinnssttaallll__aauuddiioo ********** │ │ │ │ │ bool al_install_audio(void) │ │ │ │ │ +bool al_install_audio(void) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Install the audio subsystem. │ │ │ │ │ Returns true on success, false on failure. │ │ │ │ │ Note: most users will call _a_l___r_e_s_e_r_v_e___s_a_m_p_l_e_s and │ │ │ │ │ _a_l___i_n_i_t___a_c_o_d_e_c___a_d_d_o_n after this. │ │ │ │ │ See also: _a_l___r_e_s_e_r_v_e___s_a_m_p_l_e_s, _a_l___u_n_i_n_s_t_a_l_l___a_u_d_i_o, _a_l___i_s___a_u_d_i_o___i_n_s_t_a_l_l_e_d, │ │ │ │ │ _a_l___i_n_i_t___a_c_o_d_e_c___a_d_d_o_n │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___d_e_v_i_c_e_s_._c │ │ │ │ │ * _e_x___s_a_w_._c │ │ │ │ │ * _e_x___s_t_r_e_a_m___f_i_l_e_._c │ │ │ │ │ ********** aall__uunniinnssttaallll__aauuddiioo ********** │ │ │ │ │ void al_uninstall_audio(void) │ │ │ │ │ +void al_uninstall_audio(void) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Uninstalls the audio subsystem. │ │ │ │ │ See also: _a_l___i_n_s_t_a_l_l___a_u_d_i_o │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_a_w_._c │ │ │ │ │ * _e_x___s_t_r_e_a_m___f_i_l_e_._c │ │ │ │ │ * _e_x___a_c_o_d_e_c___m_u_l_t_i_._c │ │ │ │ │ ********** aall__iiss__aauuddiioo__iinnssttaalllleedd ********** │ │ │ │ │ bool al_is_audio_installed(void) │ │ │ │ │ +bool al_is_audio_installed(void) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Returns true if _a_l___i_n_s_t_a_l_l___a_u_d_i_o was called previously and returned │ │ │ │ │ successfully. │ │ │ │ │ ********** aall__rreesseerrvvee__ssaammpplleess ********** │ │ │ │ │ bool al_reserve_samples(int reserve_samples) │ │ │ │ │ +bool al_reserve_samples(int reserve_samples) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ 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 will create one │ │ │ │ │ and attach it to the default voice. If no default voice has been set, it, too, │ │ │ │ │ will be created. │ │ │ │ │ If you call this function a second time with a smaller number of samples, then │ │ │ │ │ the excess internal sample instances will be destroyed causing some sounds to │ │ │ │ │ @@ -287,14 +292,16 @@ │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_a_w_._c │ │ │ │ │ * _e_x___a_u_d_i_o___p_r_o_p_s_._c_p_p │ │ │ │ │ * _e_x___r_e_s_a_m_p_l_e___t_e_s_t_._c │ │ │ │ │ ********** aall__ppllaayy__ssaammppllee ********** │ │ │ │ │ bool al_play_sample(ALLEGRO_SAMPLE *spl, float gain, float pan, float speed, │ │ │ │ │ ALLEGRO_PLAYMODE loop, ALLEGRO_SAMPLE_ID *ret_id) │ │ │ │ │ +bool al_play_sample(ALLEGRO_SAMPLE *spl, float gain, float pan, float speed, │ │ │ │ │ + ALLEGRO_PLAYMODE loop, ALLEGRO_SAMPLE_ID *ret_id) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Plays a sample on one of the sample instances created by _a_l___r_e_s_e_r_v_e___s_a_m_p_l_e_s. │ │ │ │ │ Returns true on success, false on failure. Playback may fail because all the │ │ │ │ │ reserved sample instances are currently used. │ │ │ │ │ Parameters: │ │ │ │ │ * gain - relative volume at which the sample is played; 1.0 is normal. │ │ │ │ │ * pan - 0.0 is centred, -1.0 is left, 1.0 is right, or │ │ │ │ │ @@ -310,30 +317,33 @@ │ │ │ │ │ _A_L_L_E_G_R_O___S_A_M_P_L_E___I_D, _a_l___s_t_o_p___s_a_m_p_l_e, _a_l___s_t_o_p___s_a_m_p_l_e_s, _a_l___l_o_c_k___s_a_m_p_l_e___i_d. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_c_o_d_e_c___m_u_l_t_i_._c │ │ │ │ │ * _e_x___k_c_m___d_i_r_e_c_t_._c │ │ │ │ │ * _e_x___m_i_x_e_r___c_h_a_i_n_._c │ │ │ │ │ ********** aall__ssttoopp__ssaammppllee ********** │ │ │ │ │ void al_stop_sample(ALLEGRO_SAMPLE_ID *spl_id) │ │ │ │ │ +void al_stop_sample(ALLEGRO_SAMPLE_ID *spl_id) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Stop the sample started by _a_l___p_l_a_y___s_a_m_p_l_e. │ │ │ │ │ See also: _a_l___s_t_o_p___s_a_m_p_l_e_s │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_c_o_d_e_c___m_u_l_t_i_._c │ │ │ │ │ * _e_x___k_c_m___d_i_r_e_c_t_._c │ │ │ │ │ * _e_x___m_i_x_e_r___c_h_a_i_n_._c │ │ │ │ │ ********** aall__ssttoopp__ssaammpplleess ********** │ │ │ │ │ void al_stop_samples(void) │ │ │ │ │ +void al_stop_samples(void) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Stop all samples started by _a_l___p_l_a_y___s_a_m_p_l_e. │ │ │ │ │ See also: _a_l___s_t_o_p___s_a_m_p_l_e │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___s_i_m_p_l_e_._c │ │ │ │ │ ********** aall__lloocckk__ssaammppllee__iidd ********** │ │ │ │ │ ALLEGRO_SAMPLE_INSTANCE* al_lock_sample_id(ALLEGRO_SAMPLE_ID *spl_id) │ │ │ │ │ +ALLEGRO_SAMPLE_INSTANCE* al_lock_sample_id(ALLEGRO_SAMPLE_ID *spl_id) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Locks a _A_L_L_E_G_R_O___S_A_M_P_L_E___I_D, returning the underlying _A_L_L_E_G_R_O___S_A_M_P_L_E___I_N_S_T_A_N_C_E. │ │ │ │ │ This allows you to adjust the various properties of the instance (such as │ │ │ │ │ volume, pan, etc) while the sound is playing. │ │ │ │ │ This function will return NULL if the sound corresponding to the id is no │ │ │ │ │ longer playing. │ │ │ │ │ While locked, ALLEGRO_SAMPLE_ID will be unavailable to additional calls to │ │ │ │ │ @@ -343,26 +353,28 @@ │ │ │ │ │ See also: _a_l___p_l_a_y___s_a_m_p_l_e, _a_l___u_n_l_o_c_k___s_a_m_p_l_e___i_d │ │ │ │ │ Since: 5.2.3 │ │ │ │ │ _UU_nn_ss_tt_aa_bb_ll_ee_ _AA_PP_II:: New API. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___s_i_m_p_l_e_._c │ │ │ │ │ ********** aall__uunnlloocckk__ssaammppllee__iidd ********** │ │ │ │ │ void al_unlock_sample_id(ALLEGRO_SAMPLE_ID *spl_id) │ │ │ │ │ +void al_unlock_sample_id(ALLEGRO_SAMPLE_ID *spl_id) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Unlocks a _A_L_L_E_G_R_O___S_A_M_P_L_E___I_D, allowing future calls to _a_l___p_l_a_y___s_a_m_p_l_e to reuse │ │ │ │ │ it if possible. Note that after the id is unlocked, the _A_L_L_E_G_R_O___S_A_M_P_L_E___I_N_S_T_A_N_C_E │ │ │ │ │ that was previously returned by _a_l___l_o_c_k___s_a_m_p_l_e___i_d will possibly be playing a │ │ │ │ │ different sound, so you should only use it after locking the id again. │ │ │ │ │ See also: _a_l___p_l_a_y___s_a_m_p_l_e, _a_l___l_o_c_k___s_a_m_p_l_e___i_d │ │ │ │ │ Since: 5.2.3 │ │ │ │ │ _UU_nn_ss_tt_aa_bb_ll_ee_ _AA_PP_II:: New API. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___s_i_m_p_l_e_._c │ │ │ │ │ ********** aall__ppllaayy__aauuddiioo__ssttrreeaamm ********** │ │ │ │ │ ALLEGRO_AUDIO_STREAM *al_play_audio_stream(const char *filename) │ │ │ │ │ +ALLEGRO_AUDIO_STREAM *al_play_audio_stream(const char *filename) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ 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 default mixer to be │ │ │ │ │ set, which is typically done via _a_l___r_e_s_e_r_v_e___s_a_m_p_l_e_s, but can also be done via │ │ │ │ │ _a_l___s_e_t___d_e_f_a_u_l_t___m_i_x_e_r. │ │ │ │ │ Returns the stream on success, NULL on failure. You must not destroy the │ │ │ │ │ returned stream, it will be automatically destroyed when the addon is shut │ │ │ │ │ @@ -374,14 +386,16 @@ │ │ │ │ │ Since: 5.2.8 │ │ │ │ │ _UU_nn_ss_tt_aa_bb_ll_ee_ _AA_PP_II:: New API. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___s_i_m_p_l_e_._c │ │ │ │ │ ********** aall__ppllaayy__aauuddiioo__ssttrreeaamm__ff ********** │ │ │ │ │ ALLEGRO_AUDIO_STREAM *al_play_audio_stream_f(ALLEGRO_FILE *fp, const char │ │ │ │ │ *ident) │ │ │ │ │ +ALLEGRO_AUDIO_STREAM *al_play_audio_stream_f(ALLEGRO_FILE *fp, const char │ │ │ │ │ +*ident) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Loads and plays an audio file from _A_L_L_E_G_R_O___F_I_L_E stream, streaming it is needed. │ │ │ │ │ This API can only play one audio stream at a time. This requires a default │ │ │ │ │ mixer to be set, which is typically done via _a_l___r_e_s_e_r_v_e___s_a_m_p_l_e_s, but can also │ │ │ │ │ be done via _a_l___s_e_t___d_e_f_a_u_l_t___m_i_x_e_r. │ │ │ │ │ The file type is determined by the passed ‘ident’ parameter, which is a file │ │ │ │ │ name extension including the leading dot. │ │ │ │ │ @@ -395,28 +409,32 @@ │ │ │ │ │ register your own format handler. │ │ │ │ │ See also: _a_l___p_l_a_y___a_u_d_i_o___s_t_r_e_a_m, _a_l___l_o_a_d___a_u_d_i_o___s_t_r_e_a_m___f │ │ │ │ │ Since: 5.2.8 │ │ │ │ │ _UU_nn_ss_tt_aa_bb_ll_ee_ _AA_PP_II:: New API. │ │ │ │ │ ************ SSaammpplleess ************ │ │ │ │ │ ********** AALLLLEEGGRROO__SSAAMMPPLLEE ********** │ │ │ │ │ typedef struct ALLEGRO_SAMPLE ALLEGRO_SAMPLE; │ │ │ │ │ +typedef struct ALLEGRO_SAMPLE ALLEGRO_SAMPLE; │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ An ALLEGRO_SAMPLE object stores the data necessary for playing pre-defined │ │ │ │ │ digital audio. It holds a user-specified PCM data buffer and information about │ │ │ │ │ its format (data length, depth, frequency, channel configuration). You can have │ │ │ │ │ the same ALLEGRO_SAMPLE playing multiple times simultaneously. │ │ │ │ │ See also: _A_L_L_E_G_R_O___S_A_M_P_L_E___I_N_S_T_A_N_C_E │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___g_l_e_x_t_._c │ │ │ │ │ * _e_x___a_c_o_d_e_c___m_u_l_t_i_._c │ │ │ │ │ * _e_x___k_c_m___d_i_r_e_c_t_._c │ │ │ │ │ ********** aall__ccrreeaattee__ssaammppllee ********** │ │ │ │ │ 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) │ │ │ │ │ +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) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Create a sample data structure from the supplied buffer. If free_buf is true │ │ │ │ │ then the buffer will be freed with _a_l___f_r_e_e when the sample data structure is │ │ │ │ │ destroyed. For portability (especially Windows), the buffer should have been │ │ │ │ │ allocated with _a_l___m_a_l_l_o_c. Otherwise you should free the sample data yourself. │ │ │ │ │ A sample that is referred to by the samples parameter refers to a sequence │ │ │ │ │ channel intensities. E.g. if you’re making a stereo sample with the samples set │ │ │ │ │ @@ -432,14 +450,15 @@ │ │ │ │ │ See also: _a_l___d_e_s_t_r_o_y___s_a_m_p_l_e, _A_L_L_E_G_R_O___A_U_D_I_O___D_E_P_T_H, _A_L_L_E_G_R_O___C_H_A_N_N_E_L___C_O_N_F │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_c_o_d_e_c___m_u_l_t_i_._c │ │ │ │ │ * _e_x___k_c_m___d_i_r_e_c_t_._c │ │ │ │ │ * _e_x___m_i_x_e_r___c_h_a_i_n_._c │ │ │ │ │ ********** aall__llooaadd__ssaammppllee ********** │ │ │ │ │ ALLEGRO_SAMPLE *al_load_sample(const char *filename) │ │ │ │ │ +ALLEGRO_SAMPLE *al_load_sample(const char *filename) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Loads a few different audio file formats based on their extension. │ │ │ │ │ Note that this stores the entire file in memory at once, which may be time │ │ │ │ │ consuming. To read the file as it is needed, use _a_l___l_o_a_d___a_u_d_i_o___s_t_r_e_a_m or │ │ │ │ │ _a_l___p_l_a_y___a_u_d_i_o___s_t_r_e_a_m. │ │ │ │ │ Returns the sample on success, NULL on failure. │ │ │ │ │ NNoottee:: the allegro_audio library does not support any audio file │ │ │ │ │ @@ -448,14 +467,15 @@ │ │ │ │ │ See also: _a_l___r_e_g_i_s_t_e_r___s_a_m_p_l_e___l_o_a_d_e_r, _a_l___i_n_i_t___a_c_o_d_e_c___a_d_d_o_n │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_c_o_d_e_c___m_u_l_t_i_._c │ │ │ │ │ * _e_x___k_c_m___d_i_r_e_c_t_._c │ │ │ │ │ * _e_x___m_i_x_e_r___c_h_a_i_n_._c │ │ │ │ │ ********** aall__llooaadd__ssaammppllee__ff ********** │ │ │ │ │ ALLEGRO_SAMPLE *al_load_sample_f(ALLEGRO_FILE* fp, const char *ident) │ │ │ │ │ +ALLEGRO_SAMPLE *al_load_sample_f(ALLEGRO_FILE* fp, const char *ident) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Loads an audio file from an _A_L_L_E_G_R_O___F_I_L_E stream into an _A_L_L_E_G_R_O___S_A_M_P_L_E. The │ │ │ │ │ file type is determined by the passed ‘ident’ parameter, which is a file name │ │ │ │ │ extension including the leading dot. │ │ │ │ │ Note that this stores the entire file in memory at once, which may be time │ │ │ │ │ consuming. To read the file as it is needed, use _a_l___l_o_a_d___a_u_d_i_o___s_t_r_e_a_m___f or │ │ │ │ │ _a_l___p_l_a_y___a_u_d_i_o___s_t_r_e_a_m___f. │ │ │ │ │ @@ -463,70 +483,78 @@ │ │ │ │ │ afterwards. │ │ │ │ │ NNoottee:: the allegro_audio library does not support any audio file │ │ │ │ │ formats by default. You must use the allegro_acodec addon, or │ │ │ │ │ register your own format handler. │ │ │ │ │ See also: _a_l___r_e_g_i_s_t_e_r___s_a_m_p_l_e___l_o_a_d_e_r___f, _a_l___i_n_i_t___a_c_o_d_e_c___a_d_d_o_n │ │ │ │ │ ********** aall__ssaavvee__ssaammppllee ********** │ │ │ │ │ bool al_save_sample(const char *filename, ALLEGRO_SAMPLE *spl) │ │ │ │ │ +bool al_save_sample(const char *filename, ALLEGRO_SAMPLE *spl) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Writes a sample into a file. Currently, wav is the only supported format, and │ │ │ │ │ the extension must be “.wav”. │ │ │ │ │ Returns true on success, false on error. │ │ │ │ │ NNoottee:: the allegro_audio library does not support any audio file │ │ │ │ │ formats by default. You must use the allegro_acodec addon, or │ │ │ │ │ register your own format handler. │ │ │ │ │ See also: _a_l___s_a_v_e___s_a_m_p_l_e___f, _a_l___r_e_g_i_s_t_e_r___s_a_m_p_l_e___s_a_v_e_r, _a_l___i_n_i_t___a_c_o_d_e_c___a_d_d_o_n │ │ │ │ │ ********** aall__ssaavvee__ssaammppllee__ff ********** │ │ │ │ │ bool al_save_sample_f(ALLEGRO_FILE *fp, const char *ident, ALLEGRO_SAMPLE *spl) │ │ │ │ │ +bool al_save_sample_f(ALLEGRO_FILE *fp, const char *ident, ALLEGRO_SAMPLE *spl) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Writes a sample into a _A_L_L_E_G_R_O___F_I_L_E filestream. Currently, wav is the only │ │ │ │ │ supported format, and the extension must be “.wav”. │ │ │ │ │ Returns true on success, false on error. The file remains open afterwards. │ │ │ │ │ NNoottee:: the allegro_audio library does not support any audio file │ │ │ │ │ formats by default. You must use the allegro_acodec addon, or │ │ │ │ │ register your own format handler. │ │ │ │ │ See also: _a_l___s_a_v_e___s_a_m_p_l_e, _a_l___r_e_g_i_s_t_e_r___s_a_m_p_l_e___s_a_v_e_r___f, _a_l___i_n_i_t___a_c_o_d_e_c___a_d_d_o_n │ │ │ │ │ ********** aall__ddeessttrrooyy__ssaammppllee ********** │ │ │ │ │ void al_destroy_sample(ALLEGRO_SAMPLE *spl) │ │ │ │ │ +void al_destroy_sample(ALLEGRO_SAMPLE *spl) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Free the sample data structure. If it was created with the free_buf parameter │ │ │ │ │ set to true, then the buffer will be freed with _a_l___f_r_e_e. │ │ │ │ │ This function will stop any sample instances which may be playing the buffer │ │ │ │ │ referenced by the _A_L_L_E_G_R_O___S_A_M_P_L_E. │ │ │ │ │ See also: _a_l___d_e_s_t_r_o_y___s_a_m_p_l_e___i_n_s_t_a_n_c_e, _a_l___s_t_o_p___s_a_m_p_l_e, _a_l___s_t_o_p___s_a_m_p_l_e_s │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_c_o_d_e_c___m_u_l_t_i_._c │ │ │ │ │ * _e_x___k_c_m___d_i_r_e_c_t_._c │ │ │ │ │ * _e_x___m_i_x_e_r___c_h_a_i_n_._c │ │ │ │ │ ********** aall__ggeett__ssaammppllee__cchhaannnneellss ********** │ │ │ │ │ ALLEGRO_CHANNEL_CONF al_get_sample_channels(const ALLEGRO_SAMPLE *spl) │ │ │ │ │ +ALLEGRO_CHANNEL_CONF al_get_sample_channels(const ALLEGRO_SAMPLE *spl) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the channel configuration of the sample. │ │ │ │ │ See also: _A_L_L_E_G_R_O___C_H_A_N_N_E_L___C_O_N_F, _a_l___g_e_t___s_a_m_p_l_e___d_e_p_t_h, _a_l___g_e_t___s_a_m_p_l_e___f_r_e_q_u_e_n_c_y, │ │ │ │ │ _a_l___g_e_t___s_a_m_p_l_e___l_e_n_g_t_h, _a_l___g_e_t___s_a_m_p_l_e___d_a_t_a │ │ │ │ │ ********** aall__ggeett__ssaammppllee__ddeepptthh ********** │ │ │ │ │ ALLEGRO_AUDIO_DEPTH al_get_sample_depth(const ALLEGRO_SAMPLE *spl) │ │ │ │ │ +ALLEGRO_AUDIO_DEPTH al_get_sample_depth(const ALLEGRO_SAMPLE *spl) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the audio depth of the sample. │ │ │ │ │ See also: _A_L_L_E_G_R_O___A_U_D_I_O___D_E_P_T_H, _a_l___g_e_t___s_a_m_p_l_e___c_h_a_n_n_e_l_s, _a_l___g_e_t___s_a_m_p_l_e___f_r_e_q_u_e_n_c_y, │ │ │ │ │ _a_l___g_e_t___s_a_m_p_l_e___l_e_n_g_t_h, _a_l___g_e_t___s_a_m_p_l_e___d_a_t_a │ │ │ │ │ ********** aall__ggeett__ssaammppllee__ffrreeqquueennccyy ********** │ │ │ │ │ unsigned int al_get_sample_frequency(const ALLEGRO_SAMPLE *spl) │ │ │ │ │ +unsigned int al_get_sample_frequency(const ALLEGRO_SAMPLE *spl) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the frequency (in Hz) of the sample. │ │ │ │ │ See also: _a_l___g_e_t___s_a_m_p_l_e___c_h_a_n_n_e_l_s, _a_l___g_e_t___s_a_m_p_l_e___d_e_p_t_h, _a_l___g_e_t___s_a_m_p_l_e___l_e_n_g_t_h, │ │ │ │ │ _a_l___g_e_t___s_a_m_p_l_e___d_a_t_a │ │ │ │ │ ********** aall__ggeett__ssaammppllee__lleennggtthh ********** │ │ │ │ │ unsigned int al_get_sample_length(const ALLEGRO_SAMPLE *spl) │ │ │ │ │ +unsigned int al_get_sample_length(const ALLEGRO_SAMPLE *spl) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the length of the sample in sample values. │ │ │ │ │ See also: _a_l___g_e_t___s_a_m_p_l_e___c_h_a_n_n_e_l_s, _a_l___g_e_t___s_a_m_p_l_e___d_e_p_t_h, _a_l___g_e_t___s_a_m_p_l_e___f_r_e_q_u_e_n_c_y, │ │ │ │ │ _a_l___g_e_t___s_a_m_p_l_e___d_a_t_a │ │ │ │ │ ********** aall__ggeett__ssaammppllee__ddaattaa ********** │ │ │ │ │ void *al_get_sample_data(const ALLEGRO_SAMPLE *spl) │ │ │ │ │ +void *al_get_sample_data(const ALLEGRO_SAMPLE *spl) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return a pointer to the raw sample data. │ │ │ │ │ See also: _a_l___g_e_t___s_a_m_p_l_e___c_h_a_n_n_e_l_s, _a_l___g_e_t___s_a_m_p_l_e___d_e_p_t_h, _a_l___g_e_t___s_a_m_p_l_e___f_r_e_q_u_e_n_c_y, │ │ │ │ │ _a_l___g_e_t___s_a_m_p_l_e___l_e_n_g_t_h │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___t_i_m_e_r_._c │ │ │ │ │ ************ AAddvvaanncceedd AAuuddiioo ************ │ │ │ │ │ @@ -600,14 +628,15 @@ │ │ │ │ │ al_play_sample is called, it’ll use one of these internal sample instances that │ │ │ │ │ is not currently playing to play the requested sample. All of these sample │ │ │ │ │ instances will be attached to the default mixer, which can be changed via │ │ │ │ │ _a_l___s_e_t___d_e_f_a_u_l_t___m_i_x_e_r. │ │ │ │ │ ************ SSaammppllee iinnssttaanncceess ************ │ │ │ │ │ ********** AALLLLEEGGRROO__SSAAMMPPLLEE__IINNSSTTAANNCCEE ********** │ │ │ │ │ typedef struct ALLEGRO_SAMPLE_INSTANCE ALLEGRO_SAMPLE_INSTANCE; │ │ │ │ │ +typedef struct ALLEGRO_SAMPLE_INSTANCE ALLEGRO_SAMPLE_INSTANCE; │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ An ALLEGRO_SAMPLE_INSTANCE object represents a playable instance of a │ │ │ │ │ predefined sound effect. It holds information about how the effect should be │ │ │ │ │ played: These playback parameters consist of the looping mode, loop start/end │ │ │ │ │ points, playing position, speed, gain, pan and the playmode. Whether a sample │ │ │ │ │ instance is currently playing or paused is also one of its properties. │ │ │ │ │ An instance uses the data from an _A_L_L_E_G_R_O___S_A_M_P_L_E object. Multiple instances may │ │ │ │ │ @@ -618,155 +647,178 @@ │ │ │ │ │ See also: _A_L_L_E_G_R_O___S_A_M_P_L_E │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_c_o_d_e_c___m_u_l_t_i_._c │ │ │ │ │ * _e_x___k_c_m___d_i_r_e_c_t_._c │ │ │ │ │ * _e_x___m_i_x_e_r___c_h_a_i_n_._c │ │ │ │ │ ********** aall__ccrreeaattee__ssaammppllee__iinnssttaannccee ********** │ │ │ │ │ ALLEGRO_SAMPLE_INSTANCE *al_create_sample_instance(ALLEGRO_SAMPLE *sample_data) │ │ │ │ │ +ALLEGRO_SAMPLE_INSTANCE *al_create_sample_instance(ALLEGRO_SAMPLE *sample_data) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Creates a sample instance, using the supplied sample data. The instance must be │ │ │ │ │ attached to a mixer (or voice) in order to actually produce output. │ │ │ │ │ The argument may be NULL. You can then set the sample data later with │ │ │ │ │ _a_l___s_e_t___s_a_m_p_l_e. │ │ │ │ │ See also: _a_l___d_e_s_t_r_o_y___s_a_m_p_l_e___i_n_s_t_a_n_c_e │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_c_o_d_e_c___m_u_l_t_i_._c │ │ │ │ │ * _e_x___k_c_m___d_i_r_e_c_t_._c │ │ │ │ │ * _e_x___m_i_x_e_r___c_h_a_i_n_._c │ │ │ │ │ ********** aall__ddeessttrrooyy__ssaammppllee__iinnssttaannccee ********** │ │ │ │ │ void al_destroy_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl) │ │ │ │ │ +void al_destroy_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Detaches the sample instance from anything it may be attached to and frees it │ │ │ │ │ (the sample data, i.e. its ALLEGRO_SAMPLE, is nnoott freed!). │ │ │ │ │ See also: _a_l___c_r_e_a_t_e___s_a_m_p_l_e___i_n_s_t_a_n_c_e │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_c_o_d_e_c___m_u_l_t_i_._c │ │ │ │ │ * _e_x___k_c_m___d_i_r_e_c_t_._c │ │ │ │ │ * _e_x___m_i_x_e_r___c_h_a_i_n_._c │ │ │ │ │ ********** aall__ppllaayy__ssaammppllee__iinnssttaannccee ********** │ │ │ │ │ bool al_play_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl) │ │ │ │ │ +bool al_play_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Play the sample instance. Returns true on success, false on failure. │ │ │ │ │ See also: _a_l___s_t_o_p___s_a_m_p_l_e___i_n_s_t_a_n_c_e │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_c_o_d_e_c___m_u_l_t_i_._c │ │ │ │ │ * _e_x___k_c_m___d_i_r_e_c_t_._c │ │ │ │ │ * _e_x___m_i_x_e_r___c_h_a_i_n_._c │ │ │ │ │ ********** aall__ssttoopp__ssaammppllee__iinnssttaannccee ********** │ │ │ │ │ bool al_stop_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl) │ │ │ │ │ +bool al_stop_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Stop an sample instance playing. │ │ │ │ │ See also: _a_l___p_l_a_y___s_a_m_p_l_e___i_n_s_t_a_n_c_e │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_c_o_d_e_c___m_u_l_t_i_._c │ │ │ │ │ * _e_x___k_c_m___d_i_r_e_c_t_._c │ │ │ │ │ * _e_x___m_i_x_e_r___c_h_a_i_n_._c │ │ │ │ │ ********** aall__ggeett__ssaammppllee__iinnssttaannccee__cchhaannnneellss ********** │ │ │ │ │ ALLEGRO_CHANNEL_CONF al_get_sample_instance_channels( │ │ │ │ │ const ALLEGRO_SAMPLE_INSTANCE *spl) │ │ │ │ │ +ALLEGRO_CHANNEL_CONF al_get_sample_instance_channels( │ │ │ │ │ + const ALLEGRO_SAMPLE_INSTANCE *spl) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the channel configuration of the sample instance’s sample data. │ │ │ │ │ See also: _A_L_L_E_G_R_O___C_H_A_N_N_E_L___C_O_N_F. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___k_c_m___d_i_r_e_c_t_._c │ │ │ │ │ * _e_x___a_c_o_d_e_c_._c │ │ │ │ │ ********** aall__ggeett__ssaammppllee__iinnssttaannccee__ddeepptthh ********** │ │ │ │ │ ALLEGRO_AUDIO_DEPTH al_get_sample_instance_depth(const ALLEGRO_SAMPLE_INSTANCE │ │ │ │ │ *spl) │ │ │ │ │ +ALLEGRO_AUDIO_DEPTH al_get_sample_instance_depth(const ALLEGRO_SAMPLE_INSTANCE │ │ │ │ │ +*spl) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the audio depth of the sample instance’s sample data. │ │ │ │ │ See also: _A_L_L_E_G_R_O___A_U_D_I_O___D_E_P_T_H. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___k_c_m___d_i_r_e_c_t_._c │ │ │ │ │ ********** aall__ggeett__ssaammppllee__iinnssttaannccee__ffrreeqquueennccyy ********** │ │ │ │ │ unsigned int al_get_sample_instance_frequency(const ALLEGRO_SAMPLE_INSTANCE │ │ │ │ │ *spl) │ │ │ │ │ +unsigned int al_get_sample_instance_frequency(const ALLEGRO_SAMPLE_INSTANCE │ │ │ │ │ +*spl) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the frequency (in Hz) of the sample instance’s sample data. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___k_c_m___d_i_r_e_c_t_._c │ │ │ │ │ ********** aall__ggeett__ssaammppllee__iinnssttaannccee__lleennggtthh ********** │ │ │ │ │ unsigned int al_get_sample_instance_length(const ALLEGRO_SAMPLE_INSTANCE *spl) │ │ │ │ │ +unsigned int al_get_sample_instance_length(const ALLEGRO_SAMPLE_INSTANCE *spl) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the length of the sample instance in sample values. This property may │ │ │ │ │ differ from the length of the instance’s sample data. │ │ │ │ │ See also: _a_l___s_e_t___s_a_m_p_l_e___i_n_s_t_a_n_c_e___l_e_n_g_t_h, _a_l___g_e_t___s_a_m_p_l_e___i_n_s_t_a_n_c_e___t_i_m_e │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___p_r_o_p_s_._c_p_p │ │ │ │ │ * _e_x___a_u_d_i_o___s_i_m_p_l_e_._c │ │ │ │ │ ********** aall__sseett__ssaammppllee__iinnssttaannccee__lleennggtthh ********** │ │ │ │ │ bool al_set_sample_instance_length(ALLEGRO_SAMPLE_INSTANCE *spl, │ │ │ │ │ unsigned int val) │ │ │ │ │ +bool al_set_sample_instance_length(ALLEGRO_SAMPLE_INSTANCE *spl, │ │ │ │ │ + unsigned int val) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ 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 exceed the actual │ │ │ │ │ length of the sample data, though. │ │ │ │ │ Return true on success, false on failure. Will fail if the sample instance is │ │ │ │ │ currently playing. │ │ │ │ │ See also: _a_l___g_e_t___s_a_m_p_l_e___i_n_s_t_a_n_c_e___l_e_n_g_t_h │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___p_r_o_p_s_._c_p_p │ │ │ │ │ ********** aall__ggeett__ssaammppllee__iinnssttaannccee__ppoossiittiioonn ********** │ │ │ │ │ unsigned int al_get_sample_instance_position(const ALLEGRO_SAMPLE_INSTANCE │ │ │ │ │ *spl) │ │ │ │ │ +unsigned int al_get_sample_instance_position(const ALLEGRO_SAMPLE_INSTANCE │ │ │ │ │ +*spl) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Get the playback position of a sample instance. │ │ │ │ │ See also: _a_l___s_e_t___s_a_m_p_l_e___i_n_s_t_a_n_c_e___p_o_s_i_t_i_o_n │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___c_h_a_i_n_._c_p_p │ │ │ │ │ ********** aall__sseett__ssaammppllee__iinnssttaannccee__ppoossiittiioonn ********** │ │ │ │ │ bool al_set_sample_instance_position(ALLEGRO_SAMPLE_INSTANCE *spl, │ │ │ │ │ unsigned int val) │ │ │ │ │ +bool al_set_sample_instance_position(ALLEGRO_SAMPLE_INSTANCE *spl, │ │ │ │ │ + unsigned int val) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Set the playback position of a sample instance. │ │ │ │ │ Returns true on success, false on failure. │ │ │ │ │ See also: _a_l___g_e_t___s_a_m_p_l_e___i_n_s_t_a_n_c_e___p_o_s_i_t_i_o_n │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___s_i_m_p_l_e_._c │ │ │ │ │ * _e_x___a_u_d_i_o___c_h_a_i_n_._c_p_p │ │ │ │ │ ********** aall__ggeett__ssaammppllee__iinnssttaannccee__ssppeeeedd ********** │ │ │ │ │ float al_get_sample_instance_speed(const ALLEGRO_SAMPLE_INSTANCE *spl) │ │ │ │ │ +float al_get_sample_instance_speed(const ALLEGRO_SAMPLE_INSTANCE *spl) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the relative playback speed of the sample instance. │ │ │ │ │ See also: _a_l___s_e_t___s_a_m_p_l_e___i_n_s_t_a_n_c_e___s_p_e_e_d │ │ │ │ │ ********** aall__sseett__ssaammppllee__iinnssttaannccee__ssppeeeedd ********** │ │ │ │ │ bool al_set_sample_instance_speed(ALLEGRO_SAMPLE_INSTANCE *spl, float val) │ │ │ │ │ +bool al_set_sample_instance_speed(ALLEGRO_SAMPLE_INSTANCE *spl, float val) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Set the relative playback speed of the sample instance. 1.0 means normal speed. │ │ │ │ │ Return true on success, false on failure. Will fail if the sample instance is │ │ │ │ │ attached directly to a voice. │ │ │ │ │ See also: _a_l___g_e_t___s_a_m_p_l_e___i_n_s_t_a_n_c_e___s_p_e_e_d │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___p_r_o_p_s_._c_p_p │ │ │ │ │ * _e_x___a_u_d_i_o___s_i_m_p_l_e_._c │ │ │ │ │ ********** aall__ggeett__ssaammppllee__iinnssttaannccee__ggaaiinn ********** │ │ │ │ │ float al_get_sample_instance_gain(const ALLEGRO_SAMPLE_INSTANCE *spl) │ │ │ │ │ +float al_get_sample_instance_gain(const ALLEGRO_SAMPLE_INSTANCE *spl) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the playback gain of the sample instance. │ │ │ │ │ See also: _a_l___s_e_t___s_a_m_p_l_e___i_n_s_t_a_n_c_e___g_a_i_n │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___c_h_a_i_n_._c_p_p │ │ │ │ │ ********** aall__sseett__ssaammppllee__iinnssttaannccee__ggaaiinn ********** │ │ │ │ │ bool al_set_sample_instance_gain(ALLEGRO_SAMPLE_INSTANCE *spl, float val) │ │ │ │ │ +bool al_set_sample_instance_gain(ALLEGRO_SAMPLE_INSTANCE *spl, float val) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Set the playback gain of the sample instance. │ │ │ │ │ Returns true on success, false on failure. Will fail if the sample instance is │ │ │ │ │ attached directly to a voice. │ │ │ │ │ See also: _a_l___g_e_t___s_a_m_p_l_e___i_n_s_t_a_n_c_e___g_a_i_n │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___m_i_x_e_r___c_h_a_i_n_._c │ │ │ │ │ * _e_x___a_c_o_d_e_c_._c │ │ │ │ │ * _e_x___a_u_d_i_o___p_r_o_p_s_._c_p_p │ │ │ │ │ ********** aall__ggeett__ssaammppllee__iinnssttaannccee__ppaann ********** │ │ │ │ │ float al_get_sample_instance_pan(const ALLEGRO_SAMPLE_INSTANCE *spl) │ │ │ │ │ +float al_get_sample_instance_pan(const ALLEGRO_SAMPLE_INSTANCE *spl) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Get the pan value of the sample instance. │ │ │ │ │ See also: _a_l___s_e_t___s_a_m_p_l_e___i_n_s_t_a_n_c_e___p_a_n. │ │ │ │ │ ********** aall__sseett__ssaammppllee__iinnssttaannccee__ppaann ********** │ │ │ │ │ bool al_set_sample_instance_pan(ALLEGRO_SAMPLE_INSTANCE *spl, float val) │ │ │ │ │ +bool al_set_sample_instance_pan(ALLEGRO_SAMPLE_INSTANCE *spl, float val) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ 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 right │ │ │ │ │ speaker; 0.0 means the sample is centre balanced. A special value │ │ │ │ │ _A_L_L_E_G_R_O___A_U_D_I_O___P_A_N___N_O_N_E disables panning and plays the sample at its original │ │ │ │ │ level. This will be louder than a pan value of 0.0. │ │ │ │ │ Note: panning samples with more than two channels doesn’t work yet. │ │ │ │ │ @@ -774,88 +826,99 @@ │ │ │ │ │ attached directly to a voice. │ │ │ │ │ See also: _a_l___g_e_t___s_a_m_p_l_e___i_n_s_t_a_n_c_e___p_a_n, _A_L_L_E_G_R_O___A_U_D_I_O___P_A_N___N_O_N_E │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___p_r_o_p_s_._c_p_p │ │ │ │ │ * _e_x___a_u_d_i_o___s_i_m_p_l_e_._c │ │ │ │ │ ********** aall__ggeett__ssaammppllee__iinnssttaannccee__ttiimmee ********** │ │ │ │ │ float al_get_sample_instance_time(const ALLEGRO_SAMPLE_INSTANCE *spl) │ │ │ │ │ +float al_get_sample_instance_time(const ALLEGRO_SAMPLE_INSTANCE *spl) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the length of the sample instance in seconds, assuming a playback speed │ │ │ │ │ of 1.0. │ │ │ │ │ See also: _a_l___g_e_t___s_a_m_p_l_e___i_n_s_t_a_n_c_e___l_e_n_g_t_h │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_c_o_d_e_c___m_u_l_t_i_._c │ │ │ │ │ * _e_x___k_c_m___d_i_r_e_c_t_._c │ │ │ │ │ * _e_x___m_i_x_e_r___c_h_a_i_n_._c │ │ │ │ │ ********** aall__ggeett__ssaammppllee__iinnssttaannccee__ppllaayymmooddee ********** │ │ │ │ │ ALLEGRO_PLAYMODE al_get_sample_instance_playmode(const ALLEGRO_SAMPLE_INSTANCE │ │ │ │ │ *spl) │ │ │ │ │ +ALLEGRO_PLAYMODE al_get_sample_instance_playmode(const ALLEGRO_SAMPLE_INSTANCE │ │ │ │ │ +*spl) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the playback mode of the sample instance. │ │ │ │ │ See also: _A_L_L_E_G_R_O___P_L_A_Y_M_O_D_E, _a_l___s_e_t___s_a_m_p_l_e___i_n_s_t_a_n_c_e___p_l_a_y_m_o_d_e │ │ │ │ │ ********** aall__sseett__ssaammppllee__iinnssttaannccee__ppllaayymmooddee ********** │ │ │ │ │ bool al_set_sample_instance_playmode(ALLEGRO_SAMPLE_INSTANCE *spl, │ │ │ │ │ ALLEGRO_PLAYMODE val) │ │ │ │ │ +bool al_set_sample_instance_playmode(ALLEGRO_SAMPLE_INSTANCE *spl, │ │ │ │ │ + ALLEGRO_PLAYMODE val) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Set the playback mode of the sample instance. │ │ │ │ │ Returns true on success, false on failure. │ │ │ │ │ See also: _A_L_L_E_G_R_O___P_L_A_Y_M_O_D_E, _a_l___g_e_t___s_a_m_p_l_e___i_n_s_t_a_n_c_e___p_l_a_y_m_o_d_e │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___k_c_m___d_i_r_e_c_t_._c │ │ │ │ │ * _e_x___m_i_x_e_r___c_h_a_i_n_._c │ │ │ │ │ * _e_x___a_c_o_d_e_c_._c │ │ │ │ │ ********** aall__ggeett__ssaammppllee__iinnssttaannccee__ppllaayyiinngg ********** │ │ │ │ │ bool al_get_sample_instance_playing(const ALLEGRO_SAMPLE_INSTANCE *spl) │ │ │ │ │ -_S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ +bool al_get_sample_instance_playing(const ALLEGRO_SAMPLE_INSTANCE *spl) │ │ │ │ │ +_S_o_u_r_c_e_ _C_o_d_e)) │ │ │ │ │ Return true if the sample instance is in the playing state. This may be true │ │ │ │ │ even if the instance is not attached to anything. │ │ │ │ │ See also: _a_l___s_e_t___s_a_m_p_l_e___i_n_s_t_a_n_c_e___p_l_a_y_i_n_g │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___c_h_a_i_n_._c_p_p │ │ │ │ │ ********** aall__sseett__ssaammppllee__iinnssttaannccee__ppllaayyiinngg ********** │ │ │ │ │ bool al_set_sample_instance_playing(ALLEGRO_SAMPLE_INSTANCE *spl, bool val) │ │ │ │ │ +bool al_set_sample_instance_playing(ALLEGRO_SAMPLE_INSTANCE *spl, bool val) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Change whether the sample instance is playing. │ │ │ │ │ The instance does not need to be attached to anything (since: 5.1.8). │ │ │ │ │ Returns true on success, false on failure. │ │ │ │ │ See also: _a_l___g_e_t___s_a_m_p_l_e___i_n_s_t_a_n_c_e___p_l_a_y_i_n_g │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___p_r_o_p_s_._c_p_p │ │ │ │ │ * _e_x___a_u_d_i_o___c_h_a_i_n_._c_p_p │ │ │ │ │ ********** aall__ggeett__ssaammppllee__iinnssttaannccee__aattttaacchheedd ********** │ │ │ │ │ bool al_get_sample_instance_attached(const ALLEGRO_SAMPLE_INSTANCE *spl) │ │ │ │ │ +bool al_get_sample_instance_attached(const ALLEGRO_SAMPLE_INSTANCE *spl) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return whether the sample instance is attached to something. │ │ │ │ │ See also: _a_l___a_t_t_a_c_h___s_a_m_p_l_e___i_n_s_t_a_n_c_e___t_o___m_i_x_e_r, │ │ │ │ │ _a_l___a_t_t_a_c_h___s_a_m_p_l_e___i_n_s_t_a_n_c_e___t_o___v_o_i_c_e, _a_l___d_e_t_a_c_h___s_a_m_p_l_e___i_n_s_t_a_n_c_e │ │ │ │ │ ********** aall__ddeettaacchh__ssaammppllee__iinnssttaannccee ********** │ │ │ │ │ bool al_detach_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl) │ │ │ │ │ +bool al_detach_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Detach the sample instance from whatever it’s attached to, if anything. │ │ │ │ │ Returns true on success. │ │ │ │ │ See also: _a_l___a_t_t_a_c_h___s_a_m_p_l_e___i_n_s_t_a_n_c_e___t_o___m_i_x_e_r, │ │ │ │ │ _a_l___a_t_t_a_c_h___s_a_m_p_l_e___i_n_s_t_a_n_c_e___t_o___v_o_i_c_e, _a_l___g_e_t___s_a_m_p_l_e___i_n_s_t_a_n_c_e___a_t_t_a_c_h_e_d │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___c_h_a_i_n_._c_p_p │ │ │ │ │ ********** aall__ggeett__ssaammppllee ********** │ │ │ │ │ ALLEGRO_SAMPLE *al_get_sample(ALLEGRO_SAMPLE_INSTANCE *spl) │ │ │ │ │ +ALLEGRO_SAMPLE *al_get_sample(ALLEGRO_SAMPLE_INSTANCE *spl) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the sample data that the sample instance plays. │ │ │ │ │ Note this returns a pointer to an internal structure, nnoott the _A_L_L_E_G_R_O___S_A_M_P_L_E │ │ │ │ │ that you may have passed to _a_l___s_e_t___s_a_m_p_l_e. However, the sample buffer of the │ │ │ │ │ returned ALLEGRO_SAMPLE will be the same as the one that was used to create the │ │ │ │ │ sample (passed to _a_l___c_r_e_a_t_e___s_a_m_p_l_e). You can use _a_l___g_e_t___s_a_m_p_l_e___d_a_t_a on the │ │ │ │ │ return value to retrieve and compare it. │ │ │ │ │ See also: _a_l___s_e_t___s_a_m_p_l_e │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_c_o_d_e_c___m_u_l_t_i_._c │ │ │ │ │ * _e_x___k_c_m___d_i_r_e_c_t_._c │ │ │ │ │ * _e_x___m_i_x_e_r___c_h_a_i_n_._c │ │ │ │ │ ********** aall__sseett__ssaammppllee ********** │ │ │ │ │ bool al_set_sample(ALLEGRO_SAMPLE_INSTANCE *spl, ALLEGRO_SAMPLE *data) │ │ │ │ │ +bool al_set_sample(ALLEGRO_SAMPLE_INSTANCE *spl, ALLEGRO_SAMPLE *data) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Change the sample data that a sample instance 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 │ │ │ │ │ @@ -869,14 +932,16 @@ │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___k_c_m___d_i_r_e_c_t_._c │ │ │ │ │ * _e_x___m_i_x_e_r___c_h_a_i_n_._c │ │ │ │ │ * _e_x___a_c_o_d_e_c_._c │ │ │ │ │ ********** aall__sseett__ssaammppllee__iinnssttaannccee__cchhaannnneell__mmaattrriixx ********** │ │ │ │ │ bool al_set_sample_instance_channel_matrix(ALLEGRO_SAMPLE_INSTANCE *spl, const │ │ │ │ │ float *matrix) │ │ │ │ │ +bool al_set_sample_instance_channel_matrix(ALLEGRO_SAMPLE_INSTANCE *spl, const │ │ │ │ │ +float *matrix) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ 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 this matrix │ │ │ │ │ from the gain and pan settings, as well as the channel configurations of this │ │ │ │ │ instance and the mixer it is attached to, but this allows you override that │ │ │ │ │ default value. Note that if you do set gain or pan of this instance or the │ │ │ │ │ mixer it is attached to, you’ll need to call this function again. │ │ │ │ │ @@ -898,14 +963,15 @@ │ │ │ │ │ Since: 5.2.3 │ │ │ │ │ _UU_nn_ss_tt_aa_bb_ll_ee_ _AA_PP_II:: New API. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_c_o_d_e_c_._c │ │ │ │ │ ************ AAuuddiioo ssttrreeaammss ************ │ │ │ │ │ ********** AALLLLEEGGRROO__AAUUDDIIOO__SSTTRREEAAMM ********** │ │ │ │ │ typedef struct ALLEGRO_AUDIO_STREAM ALLEGRO_AUDIO_STREAM; │ │ │ │ │ +typedef struct ALLEGRO_AUDIO_STREAM ALLEGRO_AUDIO_STREAM; │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ 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, which is split │ │ │ │ │ into a number of fragments. Whenever a fragment has finished playing, the user │ │ │ │ │ can refill it with new data. │ │ │ │ │ As with _A_L_L_E_G_R_O___S_A_M_P_L_E___I_N_S_T_A_N_C_E objects, streams store information necessary │ │ │ │ │ for playback, so you may not play the same stream multiple times │ │ │ │ │ @@ -941,14 +1007,17 @@ │ │ │ │ │ * _e_x___s_a_w_._c │ │ │ │ │ * _e_x___s_t_r_e_a_m___f_i_l_e_._c │ │ │ │ │ * _e_x___r_e_s_a_m_p_l_e___t_e_s_t_._c │ │ │ │ │ ********** aall__ccrreeaattee__aauuddiioo__ssttrreeaamm ********** │ │ │ │ │ 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) │ │ │ │ │ +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) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Creates an _A_L_L_E_G_R_O___A_U_D_I_O___S_T_R_E_A_M. The stream will be set to play by default. It │ │ │ │ │ will feed audio data from a buffer, which is split into a number of fragments. │ │ │ │ │ Parameters: │ │ │ │ │ * fragment_count - How many fragments to use for the audio stream. Usually │ │ │ │ │ only two fragments are required - splitting the audio buffer in two │ │ │ │ │ halves. But it means that the only time when new data can be supplied is │ │ │ │ │ @@ -984,14 +1053,16 @@ │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_a_w_._c │ │ │ │ │ * _e_x___r_e_s_a_m_p_l_e___t_e_s_t_._c │ │ │ │ │ * _e_x___s_y_n_t_h_._c_p_p │ │ │ │ │ ********** aall__llooaadd__aauuddiioo__ssttrreeaamm ********** │ │ │ │ │ ALLEGRO_AUDIO_STREAM *al_load_audio_stream(const char *filename, │ │ │ │ │ size_t buffer_count, unsigned int samples) │ │ │ │ │ +ALLEGRO_AUDIO_STREAM *al_load_audio_stream(const char *filename, │ │ │ │ │ + size_t buffer_count, unsigned int samples) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Loads an audio file from disk as it is needed. │ │ │ │ │ Unlike regular streams, the one returned by this function need not be fed by │ │ │ │ │ the user; the library will automatically read more of the file as it is needed. │ │ │ │ │ The stream will contain bbuuffffeerr__ccoouunntt buffers with ssaammpplleess samples. │ │ │ │ │ The audio stream will start in the playing state. It should be attached to a │ │ │ │ │ voice or mixer to generate any output. See _A_L_L_E_G_R_O___A_U_D_I_O___S_T_R_E_A_M for more │ │ │ │ │ @@ -1006,14 +1077,17 @@ │ │ │ │ │ * _e_x___s_t_r_e_a_m___f_i_l_e_._c │ │ │ │ │ * _e_x___m_i_x_e_r___p_p_._c │ │ │ │ │ * _e_x___s_t_r_e_a_m___s_e_e_k_._c │ │ │ │ │ ********** aall__llooaadd__aauuddiioo__ssttrreeaamm__ff ********** │ │ │ │ │ ALLEGRO_AUDIO_STREAM *al_load_audio_stream_f(ALLEGRO_FILE* fp, const char │ │ │ │ │ *ident, │ │ │ │ │ size_t buffer_count, unsigned int samples) │ │ │ │ │ +ALLEGRO_AUDIO_STREAM *al_load_audio_stream_f(ALLEGRO_FILE* fp, const char │ │ │ │ │ +*ident, │ │ │ │ │ + size_t buffer_count, unsigned int samples) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Loads an audio file from _A_L_L_E_G_R_O___F_I_L_E stream as it is needed. │ │ │ │ │ Unlike regular streams, the one returned by this function need not be fed by │ │ │ │ │ the user; the library will automatically read more of the file as it is needed. │ │ │ │ │ The stream will contain bbuuffffeerr__ccoouunntt buffers with ssaammpplleess samples. │ │ │ │ │ The file type is determined by the passed ‘ident’ parameter, which is a file │ │ │ │ │ name extension including the leading dot. │ │ │ │ │ @@ -1026,182 +1100,210 @@ │ │ │ │ │ NNoottee:: the allegro_audio library does not support any audio file │ │ │ │ │ formats by default. You must use the allegro_acodec addon, or │ │ │ │ │ register your own format handler. │ │ │ │ │ See also: _a_l___l_o_a_d___a_u_d_i_o___s_t_r_e_a_m, _a_l___r_e_g_i_s_t_e_r___a_u_d_i_o___s_t_r_e_a_m___l_o_a_d_e_r___f, │ │ │ │ │ _a_l___i_n_i_t___a_c_o_d_e_c___a_d_d_o_n │ │ │ │ │ ********** aall__ddeessttrrooyy__aauuddiioo__ssttrreeaamm ********** │ │ │ │ │ void al_destroy_audio_stream(ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ +void al_destroy_audio_stream(ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Destroy an audio stream which was created with _a_l___c_r_e_a_t_e___a_u_d_i_o___s_t_r_e_a_m or │ │ │ │ │ _a_l___l_o_a_d___a_u_d_i_o___s_t_r_e_a_m. │ │ │ │ │ NNoottee:: If the stream is still attached to a mixer or voice, │ │ │ │ │ _a_l___d_e_t_a_c_h___a_u_d_i_o___s_t_r_e_a_m is automatically called on it first. │ │ │ │ │ See also: _a_l___d_r_a_i_n___a_u_d_i_o___s_t_r_e_a_m. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_a_w_._c │ │ │ │ │ * _e_x___s_t_r_e_a_m___f_i_l_e_._c │ │ │ │ │ * _e_x___r_e_s_a_m_p_l_e___t_e_s_t_._c │ │ │ │ │ ********** aall__ggeett__aauuddiioo__ssttrreeaamm__eevveenntt__ssoouurrccee ********** │ │ │ │ │ ALLEGRO_EVENT_SOURCE *al_get_audio_stream_event_source( │ │ │ │ │ ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ +ALLEGRO_EVENT_SOURCE *al_get_audio_stream_event_source( │ │ │ │ │ + ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Retrieve the associated event source. │ │ │ │ │ See _a_l___g_e_t___a_u_d_i_o___s_t_r_e_a_m___f_r_a_g_m_e_n_t for a description of the │ │ │ │ │ _A_L_L_E_G_R_O___E_V_E_N_T___A_U_D_I_O___S_T_R_E_A_M___F_R_A_G_M_E_N_T event that audio streams emit. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_a_w_._c │ │ │ │ │ * _e_x___s_t_r_e_a_m___f_i_l_e_._c │ │ │ │ │ * _e_x___r_e_s_a_m_p_l_e___t_e_s_t_._c │ │ │ │ │ ********** aall__ddrraaiinn__aauuddiioo__ssttrreeaamm ********** │ │ │ │ │ void al_drain_audio_stream(ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ +void al_drain_audio_stream(ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ 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. The stream’s │ │ │ │ │ playing state will change to false. │ │ │ │ │ See also: _a_l___d_e_s_t_r_o_y___a_u_d_i_o___s_t_r_e_a_m │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_a_w_._c │ │ │ │ │ * _e_x___r_e_s_a_m_p_l_e___t_e_s_t_._c │ │ │ │ │ * _e_x___r_e_c_o_r_d_._c │ │ │ │ │ ********** aall__rreewwiinndd__aauuddiioo__ssttrreeaamm ********** │ │ │ │ │ bool al_rewind_audio_stream(ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ +bool al_rewind_audio_stream(ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Set the streaming file playing position to the beginning. Returns true on │ │ │ │ │ success. Currently this can only be called on streams created with │ │ │ │ │ _a_l___l_o_a_d___a_u_d_i_o___s_t_r_e_a_m, _a_l___p_l_a_y___a_u_d_i_o___s_t_r_e_a_m, _a_l___l_o_a_d___a_u_d_i_o___s_t_r_e_a_m___f or │ │ │ │ │ _a_l___p_l_a_y___a_u_d_i_o___s_t_r_e_a_m___f. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_t_r_e_a_m___s_e_e_k_._c │ │ │ │ │ ********** aall__ggeett__aauuddiioo__ssttrreeaamm__ffrreeqquueennccyy ********** │ │ │ │ │ unsigned int al_get_audio_stream_frequency(const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ +unsigned int al_get_audio_stream_frequency(const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the stream frequency (in Hz). │ │ │ │ │ ********** aall__ggeett__aauuddiioo__ssttrreeaamm__cchhaannnneellss ********** │ │ │ │ │ ALLEGRO_CHANNEL_CONF al_get_audio_stream_channels( │ │ │ │ │ const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ +ALLEGRO_CHANNEL_CONF al_get_audio_stream_channels( │ │ │ │ │ + const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the stream channel configuration. │ │ │ │ │ See also: _A_L_L_E_G_R_O___C_H_A_N_N_E_L___C_O_N_F. │ │ │ │ │ ********** aall__ggeett__aauuddiioo__ssttrreeaamm__ddeepptthh ********** │ │ │ │ │ ALLEGRO_AUDIO_DEPTH al_get_audio_stream_depth( │ │ │ │ │ const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ +ALLEGRO_AUDIO_DEPTH al_get_audio_stream_depth( │ │ │ │ │ + const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the stream audio depth. │ │ │ │ │ See also: _A_L_L_E_G_R_O___A_U_D_I_O___D_E_P_T_H. │ │ │ │ │ ********** aall__ggeett__aauuddiioo__ssttrreeaamm__lleennggtthh ********** │ │ │ │ │ unsigned int al_get_audio_stream_length(const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ +unsigned int al_get_audio_stream_length(const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the stream length in samples. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_t_r_e_a_m___s_e_e_k_._c │ │ │ │ │ ********** aall__ggeett__aauuddiioo__ssttrreeaamm__ssppeeeedd ********** │ │ │ │ │ float al_get_audio_stream_speed(const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ +float al_get_audio_stream_speed(const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the relative playback speed of the stream. │ │ │ │ │ See also: _a_l___s_e_t___a_u_d_i_o___s_t_r_e_a_m___s_p_e_e_d. │ │ │ │ │ ********** aall__sseett__aauuddiioo__ssttrreeaamm__ssppeeeedd ********** │ │ │ │ │ bool al_set_audio_stream_speed(ALLEGRO_AUDIO_STREAM *stream, float val) │ │ │ │ │ +bool al_set_audio_stream_speed(ALLEGRO_AUDIO_STREAM *stream, float val) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Set the relative playback speed of the stream. 1.0 means normal speed. │ │ │ │ │ Return true on success, false on failure. Will fail if the audio stream is │ │ │ │ │ attached directly to a voice. │ │ │ │ │ See also: _a_l___g_e_t___a_u_d_i_o___s_t_r_e_a_m___s_p_e_e_d. │ │ │ │ │ ********** aall__ggeett__aauuddiioo__ssttrreeaamm__ggaaiinn ********** │ │ │ │ │ float al_get_audio_stream_gain(const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ +float al_get_audio_stream_gain(const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the playback gain of the stream. │ │ │ │ │ See also: _a_l___s_e_t___a_u_d_i_o___s_t_r_e_a_m___g_a_i_n. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___c_h_a_i_n_._c_p_p │ │ │ │ │ ********** aall__sseett__aauuddiioo__ssttrreeaamm__ggaaiinn ********** │ │ │ │ │ bool al_set_audio_stream_gain(ALLEGRO_AUDIO_STREAM *stream, float val) │ │ │ │ │ +bool al_set_audio_stream_gain(ALLEGRO_AUDIO_STREAM *stream, float val) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Set the playback gain of the stream. │ │ │ │ │ Returns true on success, false on failure. Will fail if the audio stream is │ │ │ │ │ attached directly to a voice. │ │ │ │ │ See also: _a_l___g_e_t___a_u_d_i_o___s_t_r_e_a_m___g_a_i_n. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_y_n_t_h_._c_p_p │ │ │ │ │ * _e_x___a_u_d_i_o___c_h_a_i_n_._c_p_p │ │ │ │ │ ********** aall__ggeett__aauuddiioo__ssttrreeaamm__ppaann ********** │ │ │ │ │ +float al_get_audio_stream_pan(const ALLEGRO_AUDIO_STREAM *streamR *mixer, │ │ │ │ │ +ALLEGRO_MIXER_QUALITY new_quality) │ │ │ │ │ float al_get_audio_stream_pan(const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Get the pan value of the stream. │ │ │ │ │ See also: _a_l___s_e_t___a_u_d_i_o___s_t_r_e_a_m___p_a_n. │ │ │ │ │ ********** aall__sseett__aauuddiioo__ssttrreeaamm__ppaann ********** │ │ │ │ │ bool al_set_audio_stream_pan(ALLEGRO_AUDIO_STREAM *stream, float val) │ │ │ │ │ +bool al_set_audio_stream_pan(ALLEGRO_AUDIO_STREAM *stream, float val) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ 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 right speaker; 0.0 │ │ │ │ │ means the sample is centre balanced. A special value _A_L_L_E_G_R_O___A_U_D_I_O___P_A_N___N_O_N_E │ │ │ │ │ disables panning and plays the stream at its original level. This will be │ │ │ │ │ louder than a pan value of 0.0. │ │ │ │ │ Returns true on success, false on failure. Will fail if the audio stream is │ │ │ │ │ attached directly to a voice. │ │ │ │ │ See also: _a_l___g_e_t___a_u_d_i_o___s_t_r_e_a_m___p_a_n, _A_L_L_E_G_R_O___A_U_D_I_O___P_A_N___N_O_N_E │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_y_n_t_h_._c_p_p │ │ │ │ │ ********** aall__ggeett__aauuddiioo__ssttrreeaamm__ppllaayyiinngg ********** │ │ │ │ │ bool al_get_audio_stream_playing(const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ +bool al_get_audio_stream_playing(const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return true if the stream is playing. │ │ │ │ │ See also: _a_l___s_e_t___a_u_d_i_o___s_t_r_e_a_m___p_l_a_y_i_n_g. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___r_e_c_o_r_d_._c │ │ │ │ │ * _e_x___s_t_r_e_a_m___s_e_e_k_._c │ │ │ │ │ * _e_x___a_u_d_i_o___c_h_a_i_n_._c_p_p │ │ │ │ │ ********** aall__sseett__aauuddiioo__ssttrreeaamm__ppllaayyiinngg ********** │ │ │ │ │ bool al_set_audio_stream_playing(ALLEGRO_AUDIO_STREAM *stream, bool val) │ │ │ │ │ +bool al_set_audio_stream_playing(ALLEGRO_AUDIO_STREAM *stream, bool val) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Change whether the stream is playing. │ │ │ │ │ Returns true on success, false on failure. │ │ │ │ │ See also: _a_l___g_e_t___a_u_d_i_o___s_t_r_e_a_m___p_l_a_y_i_n_g │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___s_i_m_p_l_e_._c │ │ │ │ │ * _e_x___r_e_c_o_r_d_._c │ │ │ │ │ * _e_x___s_t_r_e_a_m___s_e_e_k_._c │ │ │ │ │ ********** aall__ggeett__aauuddiioo__ssttrreeaamm__ppllaayymmooddee ********** │ │ │ │ │ ALLEGRO_PLAYMODE al_get_audio_stream_playmode( │ │ │ │ │ const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ +ALLEGRO_PLAYMODE al_get_audio_stream_playmode( │ │ │ │ │ + const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the playback mode of the stream. │ │ │ │ │ See also: _A_L_L_E_G_R_O___P_L_A_Y_M_O_D_E, _a_l___s_e_t___a_u_d_i_o___s_t_r_e_a_m___p_l_a_y_m_o_d_e. │ │ │ │ │ ********** aall__sseett__aauuddiioo__ssttrreeaamm__ppllaayymmooddee ********** │ │ │ │ │ bool al_set_audio_stream_playmode(ALLEGRO_AUDIO_STREAM *stream, │ │ │ │ │ ALLEGRO_PLAYMODE val) │ │ │ │ │ +bool al_set_audio_stream_playmode(ALLEGRO_AUDIO_STREAM *stream, │ │ │ │ │ + ALLEGRO_PLAYMODE val) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Set the playback mode of the stream. │ │ │ │ │ Returns true on success, false on failure. │ │ │ │ │ See also: _A_L_L_E_G_R_O___P_L_A_Y_M_O_D_E, _a_l___g_e_t___a_u_d_i_o___s_t_r_e_a_m___p_l_a_y_m_o_d_e. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_t_r_e_a_m___f_i_l_e_._c │ │ │ │ │ * _e_x___m_i_x_e_r___p_p_._c │ │ │ │ │ * _e_x___s_t_r_e_a_m___s_e_e_k_._c │ │ │ │ │ ********** aall__ggeett__aauuddiioo__ssttrreeaamm__aattttaacchheedd ********** │ │ │ │ │ bool al_get_audio_stream_attached(const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ +bool al_get_audio_stream_attached(const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return whether the stream is attached to something. │ │ │ │ │ See also: _a_l___a_t_t_a_c_h___a_u_d_i_o___s_t_r_e_a_m___t_o___m_i_x_e_r, _a_l___a_t_t_a_c_h___a_u_d_i_o___s_t_r_e_a_m___t_o___v_o_i_c_e, │ │ │ │ │ _a_l___d_e_t_a_c_h___a_u_d_i_o___s_t_r_e_a_m. │ │ │ │ │ ********** aall__ddeettaacchh__aauuddiioo__ssttrreeaamm ********** │ │ │ │ │ bool al_detach_audio_stream(ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ +bool al_detach_audio_stream(ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Detach the stream from whatever it’s attached to, if anything. │ │ │ │ │ See also: _a_l___a_t_t_a_c_h___a_u_d_i_o___s_t_r_e_a_m___t_o___m_i_x_e_r, _a_l___a_t_t_a_c_h___a_u_d_i_o___s_t_r_e_a_m___t_o___v_o_i_c_e, │ │ │ │ │ _a_l___g_e_t___a_u_d_i_o___s_t_r_e_a_m___a_t_t_a_c_h_e_d. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___c_h_a_i_n_._c_p_p │ │ │ │ │ ********** aall__ggeett__aauuddiioo__ssttrreeaamm__ppllaayyeedd__ssaammpplleess ********** │ │ │ │ │ uint64_t al_get_audio_stream_played_samples(const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ +uint64_t al_get_audio_stream_played_samples(const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Get the number of samples consumed by the parent since the audio stream was │ │ │ │ │ started. │ │ │ │ │ Since: 5.1.8 │ │ │ │ │ ********** aall__ggeett__aauuddiioo__ssttrreeaamm__ffrraaggmmeenntt ********** │ │ │ │ │ void *al_get_audio_stream_fragment(const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ +void *al_get_audio_stream_fragment(const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ When using Allegro’s audio streaming, you will use this function to │ │ │ │ │ continuously provide new sample data to a stream. │ │ │ │ │ If the stream is ready for new data, the function will return the address of an │ │ │ │ │ internal buffer to be filled with audio data. The length and format of the │ │ │ │ │ buffer are specified with _a_l___c_r_e_a_t_e___a_u_d_i_o___s_t_r_e_a_m or can be queried with the │ │ │ │ │ various functions described here. Once the buffer is filled, you must signal │ │ │ │ │ @@ -1217,66 +1319,75 @@ │ │ │ │ │ _a_l___g_e_t___a_u_d_i_o___s_t_r_e_a_m___d_e_p_t_h, _a_l___g_e_t___a_u_d_i_o___s_t_r_e_a_m___l_e_n_g_t_h │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_a_w_._c │ │ │ │ │ * _e_x___r_e_s_a_m_p_l_e___t_e_s_t_._c │ │ │ │ │ * _e_x___s_y_n_t_h_._c_p_p │ │ │ │ │ ********** aall__sseett__aauuddiioo__ssttrreeaamm__ffrraaggmmeenntt ********** │ │ │ │ │ bool al_set_audio_stream_fragment(ALLEGRO_AUDIO_STREAM *stream, void *val) │ │ │ │ │ +bool al_set_audio_stream_fragment(ALLEGRO_AUDIO_STREAM *stream, void *val) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ This function needs to be called for every successful call of │ │ │ │ │ _a_l___g_e_t___a_u_d_i_o___s_t_r_e_a_m___f_r_a_g_m_e_n_t to indicate that the buffer (pointed to by val) is │ │ │ │ │ filled with new data. │ │ │ │ │ See also: _a_l___g_e_t___a_u_d_i_o___s_t_r_e_a_m___f_r_a_g_m_e_n_t │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_a_w_._c │ │ │ │ │ * _e_x___r_e_s_a_m_p_l_e___t_e_s_t_._c │ │ │ │ │ * _e_x___s_y_n_t_h_._c_p_p │ │ │ │ │ ********** aall__ggeett__aauuddiioo__ssttrreeaamm__ffrraaggmmeennttss ********** │ │ │ │ │ unsigned int al_get_audio_stream_fragments(const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ +unsigned int al_get_audio_stream_fragments(const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Returns the number of fragments this stream uses. This is the same value as │ │ │ │ │ passed to _a_l___c_r_e_a_t_e___a_u_d_i_o___s_t_r_e_a_m when a new stream is created. │ │ │ │ │ See also: _a_l___g_e_t___a_v_a_i_l_a_b_l_e___a_u_d_i_o___s_t_r_e_a_m___f_r_a_g_m_e_n_t_s │ │ │ │ │ ********** aall__ggeett__aavvaaiillaabbllee__aauuddiioo__ssttrreeaamm__ffrraaggmmeennttss ********** │ │ │ │ │ unsigned int al_get_available_audio_stream_fragments( │ │ │ │ │ const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ +unsigned int al_get_available_audio_stream_fragments( │ │ │ │ │ + const ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Returns the number of available fragments in the stream, that is, fragments │ │ │ │ │ which are not currently filled with data for playback. │ │ │ │ │ See also: _a_l___g_e_t___a_u_d_i_o___s_t_r_e_a_m___f_r_a_g_m_e_n_t, _a_l___g_e_t___a_u_d_i_o___s_t_r_e_a_m___f_r_a_g_m_e_n_t_s │ │ │ │ │ ********** aall__sseeeekk__aauuddiioo__ssttrreeaamm__sseeccss ********** │ │ │ │ │ bool al_seek_audio_stream_secs(ALLEGRO_AUDIO_STREAM *stream, double time) │ │ │ │ │ +bool al_seek_audio_stream_secs(ALLEGRO_AUDIO_STREAM *stream, double time) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Set the streaming file playing position to time. Returns true on success. │ │ │ │ │ Currently this can only be called on streams created with _a_l___l_o_a_d___a_u_d_i_o___s_t_r_e_a_m, │ │ │ │ │ _a_l___p_l_a_y___a_u_d_i_o___s_t_r_e_a_m, _a_l___l_o_a_d___a_u_d_i_o___s_t_r_e_a_m___f or _a_l___p_l_a_y___a_u_d_i_o___s_t_r_e_a_m___f. │ │ │ │ │ See also: _a_l___g_e_t___a_u_d_i_o___s_t_r_e_a_m___p_o_s_i_t_i_o_n___s_e_c_s, _a_l___g_e_t___a_u_d_i_o___s_t_r_e_a_m___l_e_n_g_t_h___s_e_c_s │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_t_r_e_a_m___s_e_e_k_._c │ │ │ │ │ ********** aall__ggeett__aauuddiioo__ssttrreeaamm__ppoossiittiioonn__sseeccss ********** │ │ │ │ │ double al_get_audio_stream_position_secs(ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ +double al_get_audio_stream_position_secs(ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the position of the stream in seconds. Currently this can only be called │ │ │ │ │ on streams created with _a_l___l_o_a_d___a_u_d_i_o___s_t_r_e_a_m, _a_l___p_l_a_y___a_u_d_i_o___s_t_r_e_a_m, │ │ │ │ │ _a_l___l_o_a_d___a_u_d_i_o___s_t_r_e_a_m___f or _a_l___p_l_a_y___a_u_d_i_o___s_t_r_e_a_m___f. │ │ │ │ │ See also: _a_l___g_e_t___a_u_d_i_o___s_t_r_e_a_m___l_e_n_g_t_h___s_e_c_s │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_t_r_e_a_m___s_e_e_k_._c │ │ │ │ │ ********** aall__ggeett__aauuddiioo__ssttrreeaamm__lleennggtthh__sseeccss ********** │ │ │ │ │ double al_get_audio_stream_length_secs(ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ +double al_get_audio_stream_length_secs(ALLEGRO_AUDIO_STREAM *stream) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the length of the stream in seconds, if known. Otherwise returns zero. │ │ │ │ │ Currently this can only be called on streams created with _a_l___l_o_a_d___a_u_d_i_o___s_t_r_e_a_m, │ │ │ │ │ _a_l___p_l_a_y___a_u_d_i_o___s_t_r_e_a_m, _a_l___l_o_a_d___a_u_d_i_o___s_t_r_e_a_m___f or _a_l___p_l_a_y___a_u_d_i_o___s_t_r_e_a_m___f. │ │ │ │ │ See also: _a_l___g_e_t___a_u_d_i_o___s_t_r_e_a_m___p_o_s_i_t_i_o_n___s_e_c_s │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_t_r_e_a_m___s_e_e_k_._c │ │ │ │ │ ********** aall__sseett__aauuddiioo__ssttrreeaamm__lloooopp__sseeccss ********** │ │ │ │ │ bool al_set_audio_stream_loop_secs(ALLEGRO_AUDIO_STREAM *stream, │ │ │ │ │ double start, double end) │ │ │ │ │ +bool al_set_audio_stream_loop_secs(ALLEGRO_AUDIO_STREAM *stream, │ │ │ │ │ + double start, double end) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Sets the loop points for the stream in seconds. Currently this can only be │ │ │ │ │ called on streams created with _a_l___l_o_a_d___a_u_d_i_o___s_t_r_e_a_m, _a_l___p_l_a_y___a_u_d_i_o___s_t_r_e_a_m, │ │ │ │ │ _a_l___l_o_a_d___a_u_d_i_o___s_t_r_e_a_m___f or _a_l___p_l_a_y___a_u_d_i_o___s_t_r_e_a_m___f. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_t_r_e_a_m___s_e_e_k_._c │ │ │ │ │ ********** aall__sseett__aauuddiioo__ssttrreeaamm__cchhaannnneell__mmaattrriixx ********** │ │ │ │ │ @@ -1284,89 +1395,104 @@ │ │ │ │ │ Like _a_l___s_e_t___s_a_m_p_l_e___i_n_s_t_a_n_c_e___c_h_a_n_n_e_l___m_a_t_r_i_x but for streams. │ │ │ │ │ Since: 5.2.3 │ │ │ │ │ _UU_nn_ss_tt_aa_bb_ll_ee_ _AA_PP_II:: New API. │ │ │ │ │ ************ AAddvvaanncceedd aauuddiioo ffiillee II//OO ************ │ │ │ │ │ ********** aall__rreeggiisstteerr__ssaammppllee__llooaaddeerr ********** │ │ │ │ │ bool al_register_sample_loader(const char *ext, │ │ │ │ │ ALLEGRO_SAMPLE *(*loader)(const char *filename)) │ │ │ │ │ +bool al_register_sample_loader(const char *ext, │ │ │ │ │ + ALLEGRO_SAMPLE *(*loader)(const char *filename)) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Register a handler for _a_l___l_o_a_d___s_a_m_p_l_e. The given function will be used to │ │ │ │ │ handle the loading of sample files with the given extension. │ │ │ │ │ The extension should include the leading dot (‘.’) character. It will be │ │ │ │ │ matched case-insensitively. │ │ │ │ │ The loader argument may be NULL to unregister an entry. │ │ │ │ │ Returns true on success, false on error. Returns false if unregistering an │ │ │ │ │ entry that doesn’t exist. │ │ │ │ │ See also: _a_l___r_e_g_i_s_t_e_r___s_a_m_p_l_e___l_o_a_d_e_r___f, _a_l___r_e_g_i_s_t_e_r___s_a_m_p_l_e___s_a_v_e_r │ │ │ │ │ ********** aall__rreeggiisstteerr__ssaammppllee__llooaaddeerr__ff ********** │ │ │ │ │ bool al_register_sample_loader_f(const char *ext, │ │ │ │ │ ALLEGRO_SAMPLE *(*loader)(ALLEGRO_FILE* fp)) │ │ │ │ │ +bool al_register_sample_loader_f(const char *ext, │ │ │ │ │ + ALLEGRO_SAMPLE *(*loader)(ALLEGRO_FILE* fp)) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Register a handler for _a_l___l_o_a_d___s_a_m_p_l_e___f. The given function will be used to │ │ │ │ │ handle the loading of sample files with the given extension. │ │ │ │ │ The extension should include the leading dot (‘.’) character. It will be │ │ │ │ │ matched case-insensitively. │ │ │ │ │ The loader argument may be NULL to unregister an entry. │ │ │ │ │ Returns true on success, false on error. Returns false if unregistering an │ │ │ │ │ entry that doesn’t exist. │ │ │ │ │ See also: _a_l___r_e_g_i_s_t_e_r___s_a_m_p_l_e___l_o_a_d_e_r │ │ │ │ │ ********** aall__rreeggiisstteerr__ssaammppllee__ssaavveerr ********** │ │ │ │ │ bool al_register_sample_saver(const char *ext, │ │ │ │ │ bool (*saver)(const char *filename, ALLEGRO_SAMPLE *spl)) │ │ │ │ │ +bool al_register_sample_saver(const char *ext, │ │ │ │ │ + bool (*saver)(const char *filename, ALLEGRO_SAMPLE *spl)) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Register a handler for _a_l___s_a_v_e___s_a_m_p_l_e. The given function will be used to │ │ │ │ │ handle the saving of sample files with the given extension. │ │ │ │ │ The extension should include the leading dot (‘.’) character. It will be │ │ │ │ │ matched case-insensitively. │ │ │ │ │ The saver argument may be NULL to unregister an entry. │ │ │ │ │ Returns true on success, false on error. Returns false if unregistering an │ │ │ │ │ entry that doesn’t exist. │ │ │ │ │ See also: _a_l___r_e_g_i_s_t_e_r___s_a_m_p_l_e___s_a_v_e_r___f, _a_l___r_e_g_i_s_t_e_r___s_a_m_p_l_e___l_o_a_d_e_r │ │ │ │ │ ********** aall__rreeggiisstteerr__ssaammppllee__ssaavveerr__ff ********** │ │ │ │ │ bool al_register_sample_saver_f(const char *ext, │ │ │ │ │ bool (*saver)(ALLEGRO_FILE* fp, ALLEGRO_SAMPLE *spl)) │ │ │ │ │ +bool al_register_sample_saver_f(const char *ext, │ │ │ │ │ + bool (*saver)(ALLEGRO_FILE* fp, ALLEGRO_SAMPLE *spl)) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Register a handler for _a_l___s_a_v_e___s_a_m_p_l_e___f. The given function will be used to │ │ │ │ │ handle the saving of sample files with the given extension. │ │ │ │ │ The extension should include the leading dot (‘.’) character. It will be │ │ │ │ │ matched case-insensitively. │ │ │ │ │ The saver argument may be NULL to unregister an entry. │ │ │ │ │ Returns true on success, false on error. Returns false if unregistering an │ │ │ │ │ entry that doesn’t exist. │ │ │ │ │ See also: _a_l___r_e_g_i_s_t_e_r___s_a_m_p_l_e___s_a_v_e_r │ │ │ │ │ ********** aall__rreeggiisstteerr__aauuddiioo__ssttrreeaamm__llooaaddeerr ********** │ │ │ │ │ bool al_register_audio_stream_loader(const char *ext, │ │ │ │ │ ALLEGRO_AUDIO_STREAM *(*stream_loader)(const char *filename, │ │ │ │ │ +bool al_register_audio_stream_loader(const char *ext, │ │ │ │ │ + ALLEGRO_AUDIO_STREAM *(*stream_loader)(const char *filename, │ │ │ │ │ size_t buffer_count, unsigned int samples)) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Register a handler for _a_l___l_o_a_d___a_u_d_i_o___s_t_r_e_a_m and _a_l___p_l_a_y___a_u_d_i_o___s_t_r_e_a_m. The given │ │ │ │ │ function will be used to open streams from files with the given extension. │ │ │ │ │ The extension should include the leading dot (‘.’) character. It will be │ │ │ │ │ matched case-insensitively. │ │ │ │ │ The stream_loader argument may be NULL to unregister an entry. │ │ │ │ │ Returns true on success, false on error. Returns false if unregistering an │ │ │ │ │ entry that doesn’t exist. │ │ │ │ │ See also: _a_l___r_e_g_i_s_t_e_r___a_u_d_i_o___s_t_r_e_a_m___l_o_a_d_e_r___f │ │ │ │ │ ********** aall__rreeggiisstteerr__aauuddiioo__ssttrreeaamm__llooaaddeerr__ff ********** │ │ │ │ │ bool al_register_audio_stream_loader_f(const char *ext, │ │ │ │ │ ALLEGRO_AUDIO_STREAM *(*stream_loader)(ALLEGRO_FILE* fp, │ │ │ │ │ size_t buffer_count, unsigned int samples)) │ │ │ │ │ +bool al_register_audio_stream_loader_f(const char *ext, │ │ │ │ │ + ALLEGRO_AUDIO_STREAM *(*stream_loader)(ALLEGRO_FILE* fp, │ │ │ │ │ + size_t buffer_count, unsigned int samples)) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Register a handler for _a_l___l_o_a_d___a_u_d_i_o___s_t_r_e_a_m___f and _a_l___p_l_a_y___a_u_d_i_o___s_t_r_e_a_m___f. The │ │ │ │ │ given function will be used to open streams from files with the given │ │ │ │ │ extension. │ │ │ │ │ The extension should include the leading dot (‘.’) character. It will be │ │ │ │ │ matched case-insensitively. │ │ │ │ │ The stream_loader argument may be NULL to unregister an entry. │ │ │ │ │ Returns true on success, false on error. Returns false if unregistering an │ │ │ │ │ entry that doesn’t exist. │ │ │ │ │ See also: _a_l___r_e_g_i_s_t_e_r___a_u_d_i_o___s_t_r_e_a_m___l_o_a_d_e_r │ │ │ │ │ ********** aall__rreeggiisstteerr__ssaammppllee__iiddeennttiiffiieerr ********** │ │ │ │ │ bool al_register_sample_identifier(const char *ext, │ │ │ │ │ bool (*identifier)(ALLEGRO_FILE* fp)) │ │ │ │ │ +bool al_register_sample_identifier(const char *ext, │ │ │ │ │ + bool (*identifier)(ALLEGRO_FILE* fp)) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Register an identify handler for _a_l___i_d_e_n_t_i_f_y___s_a_m_p_l_e. The given function will be │ │ │ │ │ used to detect files for the given extension. It will be called with a single │ │ │ │ │ argument of type _A_L_L_E_G_R_O___F_I_L_E which is a file handle opened for reading and │ │ │ │ │ located at the first byte of the file. The handler should try to read as few │ │ │ │ │ bytes as possible to safely determine if the given file contents correspond to │ │ │ │ │ the type with the extension and return true in that case, false otherwise. The │ │ │ │ │ @@ -1377,23 +1503,25 @@ │ │ │ │ │ The identifier argument may be NULL to unregister an entry. │ │ │ │ │ Returns true on success, false on error. Returns false if unregistering an │ │ │ │ │ entry that doesn’t exist. │ │ │ │ │ Since: 5.2.8 │ │ │ │ │ See also: _a_l___i_d_e_n_t_i_f_y___b_i_t_m_a_p │ │ │ │ │ ********** aall__iiddeennttiiffyy__ssaammppllee ********** │ │ │ │ │ char const *al_identify_sample(char const *filename) │ │ │ │ │ +char const *al_identify_sample(char const *filename) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ This works exactly as _a_l___i_d_e_n_t_i_f_y___s_a_m_p_l_e___f but you specify the filename of the │ │ │ │ │ file for which to detect the type and not a file handle. The extension, if any, │ │ │ │ │ of the passed filename is not taken into account - only the file contents. │ │ │ │ │ Since: 5.2.8 │ │ │ │ │ See also: _a_l___i_n_i_t___a_c_o_d_e_c___a_d_d_o_n, _a_l___i_d_e_n_t_i_f_y___s_a_m_p_l_e___f, │ │ │ │ │ _a_l___r_e_g_i_s_t_e_r___s_a_m_p_l_e___i_d_e_n_t_i_f_i_e_r │ │ │ │ │ ********** aall__iiddeennttiiffyy__ssaammppllee__ff ********** │ │ │ │ │ char const *al_identify_sample_f(ALLEGRO_FILE *fp) │ │ │ │ │ +char const *al_identify_sample_f(ALLEGRO_FILE *fp) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Tries to guess the audio file type of the open ALLEGRO_FILE by reading the │ │ │ │ │ first few bytes. By default Allegro cannot recognize any file types, but │ │ │ │ │ calling _a_l___i_n_i_t___a_c_o_d_e_c___a_d_d_o_n will add detection of the types it can read. You │ │ │ │ │ can also use _a_l___r_e_g_i_s_t_e_r___s_a_m_p_l_e___i_d_e_n_t_i_f_i_e_r to add identification for custom │ │ │ │ │ file types. │ │ │ │ │ Returns a pointer to a static string with a file extension for the type, │ │ │ │ │ @@ -1408,23 +1536,25 @@ │ │ │ │ │ specific implementation details with its own buffering, it will add a small │ │ │ │ │ amount of latency. However, for most applications that small overhead will not │ │ │ │ │ adversely affect performance. │ │ │ │ │ Recording is supported by the ALSA, AudioQueue, DirectSound8, and PulseAudio │ │ │ │ │ drivers. Enumerating or choosing other recording devices is not yet supported. │ │ │ │ │ ********** AALLLLEEGGRROO__AAUUDDIIOO__RREECCOORRDDEERR ********** │ │ │ │ │ typedef struct ALLEGRO_AUDIO_RECORDER ALLEGRO_AUDIO_RECORDER; │ │ │ │ │ +typedef struct ALLEGRO_AUDIO_RECORDER ALLEGRO_AUDIO_RECORDER; │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ An opaque datatype that represents a recording device. │ │ │ │ │ Since: 5.1.1 │ │ │ │ │ _UU_nn_ss_tt_aa_bb_ll_ee_ _AA_PP_II:: The API may need a slight redesign. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___r_e_c_o_r_d___n_a_m_e_._c │ │ │ │ │ * _e_x___r_e_c_o_r_d_._c │ │ │ │ │ ********** AALLLLEEGGRROO__AAUUDDIIOO__RREECCOORRDDEERR__EEVVEENNTT ********** │ │ │ │ │ typedef struct ALLEGRO_AUDIO_RECORDER_EVENT ALLEGRO_AUDIO_RECORDER_EVENT; │ │ │ │ │ +typedef struct ALLEGRO_AUDIO_RECORDER_EVENT ALLEGRO_AUDIO_RECORDER_EVENT; │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Structure that holds the audio recorder event data. Every event type will │ │ │ │ │ contain: │ │ │ │ │ * .source: pointer to the audio recorder │ │ │ │ │ The following will be available depending on the event type: │ │ │ │ │ * .buffer: pointer to buffer containing the audio samples │ │ │ │ │ * .samples: number of samples (not bytes) that are available │ │ │ │ │ @@ -1434,14 +1564,17 @@ │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___r_e_c_o_r_d___n_a_m_e_._c │ │ │ │ │ * _e_x___r_e_c_o_r_d_._c │ │ │ │ │ ********** aall__ccrreeaattee__aauuddiioo__rreeccoorrddeerr ********** │ │ │ │ │ ALLEGRO_AUDIO_RECORDER *al_create_audio_recorder(size_t fragment_count, │ │ │ │ │ unsigned int samples, unsigned int frequency, │ │ │ │ │ ALLEGRO_AUDIO_DEPTH depth, ALLEGRO_CHANNEL_CONF chan_conf) │ │ │ │ │ +ALLEGRO_AUDIO_RECORDER *al_create_audio_recorder(size_t fragment_count, │ │ │ │ │ + unsigned int samples, unsigned int frequency, │ │ │ │ │ + ALLEGRO_AUDIO_DEPTH depth, ALLEGRO_CHANNEL_CONF chan_conf) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Creates an audio recorder using the system’s default recording device. (So if │ │ │ │ │ the returned device does not work, try updating the system’s default recording │ │ │ │ │ device.) │ │ │ │ │ Allegro will internally buffer several seconds of captured audio with minimal │ │ │ │ │ latency. (XXX: These settings need to be exposed via config or API calls.) │ │ │ │ │ Audio will be copied out of that private buffer into a fragment buffer of the │ │ │ │ │ @@ -1465,119 +1598,133 @@ │ │ │ │ │ Since: 5.1.1 │ │ │ │ │ _UU_nn_ss_tt_aa_bb_ll_ee_ _AA_PP_II:: The API may need a slight redesign. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___r_e_c_o_r_d___n_a_m_e_._c │ │ │ │ │ * _e_x___r_e_c_o_r_d_._c │ │ │ │ │ ********** aall__ssttaarrtt__aauuddiioo__rreeccoorrddeerr ********** │ │ │ │ │ bool al_start_audio_recorder(ALLEGRO_AUDIO_RECORDER *r) │ │ │ │ │ +bool al_start_audio_recorder(ALLEGRO_AUDIO_RECORDER *r) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Begin recording into the fragment buffer. Once a complete fragment has been │ │ │ │ │ captured (as specified in _a_l___c_r_e_a_t_e___a_u_d_i_o___r_e_c_o_r_d_e_r), an │ │ │ │ │ _A_L_L_E_G_R_O___E_V_E_N_T___A_U_D_I_O___R_E_C_O_R_D_E_R___F_R_A_G_M_E_N_T event will be triggered. │ │ │ │ │ Returns true if it was able to begin recording. │ │ │ │ │ Since: 5.1.1 │ │ │ │ │ _UU_nn_ss_tt_aa_bb_ll_ee_ _AA_PP_II:: The API may need a slight redesign. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___r_e_c_o_r_d___n_a_m_e_._c │ │ │ │ │ * _e_x___r_e_c_o_r_d_._c │ │ │ │ │ ********** aall__ssttoopp__aauuddiioo__rreeccoorrddeerr ********** │ │ │ │ │ void al_stop_audio_recorder(ALLEGRO_AUDIO_RECORDER *r) │ │ │ │ │ +void al_stop_audio_recorder(ALLEGRO_AUDIO_RECORDER *r) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Stop capturing audio data. Note that the audio recorder is still active and │ │ │ │ │ consuming resources, so if you are finished recording you should destroy it │ │ │ │ │ with _a_l___d_e_s_t_r_o_y___a_u_d_i_o___r_e_c_o_r_d_e_r. │ │ │ │ │ You may still receive a few events after you call this function as the device │ │ │ │ │ flushes the buffer. │ │ │ │ │ If you restart the recorder, it will begin recording at the beginning of the │ │ │ │ │ next fragment buffer. │ │ │ │ │ Since: 5.1.1 │ │ │ │ │ _UU_nn_ss_tt_aa_bb_ll_ee_ _AA_PP_II:: The API may need a slight redesign. │ │ │ │ │ ********** aall__iiss__aauuddiioo__rreeccoorrddeerr__rreeccoorrddiinngg ********** │ │ │ │ │ bool al_is_audio_recorder_recording(ALLEGRO_AUDIO_RECORDER *r) │ │ │ │ │ +bool al_is_audio_recorder_recording(ALLEGRO_AUDIO_RECORDER *r) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Returns true if the audio recorder is currently capturing data and generating │ │ │ │ │ events. │ │ │ │ │ Since: 5.1.1 │ │ │ │ │ _UU_nn_ss_tt_aa_bb_ll_ee_ _AA_PP_II:: The API may need a slight redesign. │ │ │ │ │ ********** aall__ggeett__aauuddiioo__rreeccoorrddeerr__eevveenntt ********** │ │ │ │ │ ALLEGRO_AUDIO_RECORDER_EVENT *al_get_audio_recorder_event(ALLEGRO_EVENT *event) │ │ │ │ │ +ALLEGRO_AUDIO_RECORDER_EVENT *al_get_audio_recorder_event(ALLEGRO_EVENT *event) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Returns the event as an _A_L_L_E_G_R_O___A_U_D_I_O___R_E_C_O_R_D_E_R___E_V_E_N_T. │ │ │ │ │ Since: 5.1.1 │ │ │ │ │ _UU_nn_ss_tt_aa_bb_ll_ee_ _AA_PP_II:: The API may need a slight redesign. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___r_e_c_o_r_d___n_a_m_e_._c │ │ │ │ │ * _e_x___r_e_c_o_r_d_._c │ │ │ │ │ ********** aall__ggeett__aauuddiioo__rreeccoorrddeerr__eevveenntt__ssoouurrccee ********** │ │ │ │ │ ALLEGRO_EVENT_SOURCE *al_get_audio_recorder_event_source(ALLEGRO_AUDIO_RECORDER │ │ │ │ │ *r) │ │ │ │ │ +ALLEGRO_EVENT_SOURCE *al_get_audio_recorder_event_source(ALLEGRO_AUDIO_RECORDER │ │ │ │ │ +*r) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Returns the event source for the recorder that generates the various recording │ │ │ │ │ events. │ │ │ │ │ Since: 5.1.1 │ │ │ │ │ _UU_nn_ss_tt_aa_bb_ll_ee_ _AA_PP_II:: The API may need a slight redesign. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___r_e_c_o_r_d___n_a_m_e_._c │ │ │ │ │ * _e_x___r_e_c_o_r_d_._c │ │ │ │ │ ********** aall__ddeessttrrooyy__aauuddiioo__rreeccoorrddeerr ********** │ │ │ │ │ void al_destroy_audio_recorder(ALLEGRO_AUDIO_RECORDER *r) │ │ │ │ │ +void al_destroy_audio_recorder(ALLEGRO_AUDIO_RECORDER *r) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Destroys the audio recorder and frees all resources associated with it. It is │ │ │ │ │ safe to destroy a recorder that is recording. │ │ │ │ │ You may receive events after the recorder has been destroyed. They must be │ │ │ │ │ ignored, as the fragment buffer will no longer be valid. │ │ │ │ │ Since: 5.1.1 │ │ │ │ │ _UU_nn_ss_tt_aa_bb_ll_ee_ _AA_PP_II:: The API may need a slight redesign. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___r_e_c_o_r_d___n_a_m_e_._c │ │ │ │ │ * _e_x___r_e_c_o_r_d_._c │ │ │ │ │ ************ AAuuddiioo ddeevviicceess ************ │ │ │ │ │ ********** AALLLLEEGGRROO__AAUUDDIIOO__DDEEVVIICCEE ********** │ │ │ │ │ typedef struct ALLEGRO_AUDIO_DEVICE ALLEGRO_AUDIO_DEVICE; │ │ │ │ │ +typedef struct ALLEGRO_AUDIO_DEVICE ALLEGRO_AUDIO_DEVICE; │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ An opaque datatype that represents an audio device. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___d_e_v_i_c_e_s_._c │ │ │ │ │ ********** aall__ggeett__nnuumm__aauuddiioo__oouuttppuutt__ddeevviicceess ********** │ │ │ │ │ int al_get_num_audio_output_devices() │ │ │ │ │ +int al_get_num_audio_output_devices() │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Get the number of available audio output devices on the system. │ │ │ │ │ Since: 5.2.8 │ │ │ │ │ return -1 for unsupported drivers. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___d_e_v_i_c_e_s_._c │ │ │ │ │ ********** aall__ggeett__aauuddiioo__oouuttppuutt__ddeevviiccee ********** │ │ │ │ │ const ALLEGRO_AUDIO_DEVICE* al_get_audio_output_device(int index) │ │ │ │ │ +const ALLEGRO_AUDIO_DEVICE* al_get_audio_output_device(int index) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Get the output audio device of the specified index. │ │ │ │ │ Since: 5.2.8 │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___d_e_v_i_c_e_s_._c │ │ │ │ │ ********** aall__ggeett__aauuddiioo__ddeevviiccee__nnaammee ********** │ │ │ │ │ const char* al_get_audio_device_name(const ALLEGRO_AUDIO_DEVICE * device) │ │ │ │ │ +const char* al_get_audio_device_name(const ALLEGRO_AUDIO_DEVICE * device) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Get the user friendly display name of the device. │ │ │ │ │ Since: 5.2.8 │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___d_e_v_i_c_e_s_._c │ │ │ │ │ ************ VVooiicceess ************ │ │ │ │ │ ********** AALLLLEEGGRROO__VVOOIICCEE ********** │ │ │ │ │ typedef struct ALLEGRO_VOICE ALLEGRO_VOICE; │ │ │ │ │ +typedef struct ALLEGRO_VOICE ALLEGRO_VOICE; │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ 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 back audio, you │ │ │ │ │ would attach a mixer, sample instance or audio stream to a voice. │ │ │ │ │ See also: _A_L_L_E_G_R_O___M_I_X_E_R, _A_L_L_E_G_R_O___S_A_M_P_L_E, _A_L_L_E_G_R_O___A_U_D_I_O___S_T_R_E_A_M │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_t_r_e_a_m___f_i_l_e_._c │ │ │ │ │ * _e_x___a_c_o_d_e_c___m_u_l_t_i_._c │ │ │ │ │ * _e_x___k_c_m___d_i_r_e_c_t_._c │ │ │ │ │ ********** aall__ccrreeaattee__vvooiiccee ********** │ │ │ │ │ ALLEGRO_VOICE *al_create_voice(unsigned int freq, │ │ │ │ │ ALLEGRO_AUDIO_DEPTH depth, ALLEGRO_CHANNEL_CONF chan_conf) │ │ │ │ │ +ALLEGRO_VOICE *al_create_voice(unsigned int freq, │ │ │ │ │ + ALLEGRO_AUDIO_DEPTH depth, ALLEGRO_CHANNEL_CONF chan_conf) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Creates a voice structure and allocates a voice from the digital sound driver. │ │ │ │ │ The passed frequency (in Hz), sample format and channel configuration are used │ │ │ │ │ as a hint to what kind of data will be sent to the voice. However, the │ │ │ │ │ underlying sound driver is free to use non-matching values. For example, it may │ │ │ │ │ be the native format of the sound hardware. │ │ │ │ │ If a mixer is attached to the voice, the mixer will handle the conversion of │ │ │ │ │ @@ -1590,31 +1737,35 @@ │ │ │ │ │ See also: _a_l___d_e_s_t_r_o_y___v_o_i_c_e │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_t_r_e_a_m___f_i_l_e_._c │ │ │ │ │ * _e_x___a_c_o_d_e_c___m_u_l_t_i_._c │ │ │ │ │ * _e_x___k_c_m___d_i_r_e_c_t_._c │ │ │ │ │ ********** aall__ddeessttrrooyy__vvooiiccee ********** │ │ │ │ │ void al_destroy_voice(ALLEGRO_VOICE *voice) │ │ │ │ │ +void al_destroy_voice(ALLEGRO_VOICE *voice) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Destroys the voice and deallocates it from the digital driver. Does nothing if │ │ │ │ │ the voice is NULL. │ │ │ │ │ See also: _a_l___c_r_e_a_t_e___v_o_i_c_e │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_t_r_e_a_m___f_i_l_e_._c │ │ │ │ │ * _e_x___a_c_o_d_e_c___m_u_l_t_i_._c │ │ │ │ │ * _e_x___k_c_m___d_i_r_e_c_t_._c │ │ │ │ │ ********** aall__ddeettaacchh__vvooiiccee ********** │ │ │ │ │ void al_detach_voice(ALLEGRO_VOICE *voice) │ │ │ │ │ +void al_detach_voice(ALLEGRO_VOICE *voice) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Detaches the mixer, sample instance or audio stream from the voice. │ │ │ │ │ See also: _a_l___a_t_t_a_c_h___m_i_x_e_r___t_o___v_o_i_c_e, _a_l___a_t_t_a_c_h___s_a_m_p_l_e___i_n_s_t_a_n_c_e___t_o___v_o_i_c_e, │ │ │ │ │ _a_l___a_t_t_a_c_h___a_u_d_i_o___s_t_r_e_a_m___t_o___v_o_i_c_e │ │ │ │ │ ********** aall__aattttaacchh__aauuddiioo__ssttrreeaamm__ttoo__vvooiiccee ********** │ │ │ │ │ bool al_attach_audio_stream_to_voice(ALLEGRO_AUDIO_STREAM *stream, │ │ │ │ │ ALLEGRO_VOICE *voice) │ │ │ │ │ +bool al_attach_audio_stream_to_voice(ALLEGRO_AUDIO_STREAM *stream, │ │ │ │ │ + ALLEGRO_VOICE *voice) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Attaches an audio stream to a voice. The same rules as │ │ │ │ │ _a_l___a_t_t_a_c_h___s_a_m_p_l_e___i_n_s_t_a_n_c_e___t_o___v_o_i_c_e apply. This may fail if the driver can’t │ │ │ │ │ create a voice with the buffer count and buffer size the stream uses. │ │ │ │ │ An audio stream attached directly to a voice has a number of limitations: The │ │ │ │ │ audio stream plays immediately and cannot be stopped. The stream position, │ │ │ │ │ speed, gain and panning cannot be changed. At this time, we don’t recommend │ │ │ │ │ @@ -1622,93 +1773,105 @@ │ │ │ │ │ Returns true on success, false on failure. │ │ │ │ │ See also: _a_l___d_e_t_a_c_h___v_o_i_c_e, _a_l___v_o_i_c_e___h_a_s___a_t_t_a_c_h_m_e_n_t_s │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_t_r_e_a_m___f_i_l_e_._c │ │ │ │ │ * _e_x___a_u_d_i_o___c_h_a_i_n_._c_p_p │ │ │ │ │ ********** aall__aattttaacchh__mmiixxeerr__ttoo__vvooiiccee ********** │ │ │ │ │ bool al_attach_mixer_to_voice(ALLEGRO_MIXER *mixer, ALLEGRO_VOICE *voice) │ │ │ │ │ +bool al_attach_mixer_to_voice(ALLEGRO_MIXER *mixer, ALLEGRO_VOICE *voice) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Attaches a mixer to a voice. It must have the same frequency and channel │ │ │ │ │ configuration, but the depth may be different. │ │ │ │ │ Returns true on success, false on failure. │ │ │ │ │ See also: _a_l___d_e_t_a_c_h___v_o_i_c_e, _a_l___v_o_i_c_e___h_a_s___a_t_t_a_c_h_m_e_n_t_s │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_t_r_e_a_m___f_i_l_e_._c │ │ │ │ │ * _e_x___a_c_o_d_e_c___m_u_l_t_i_._c │ │ │ │ │ * _e_x___m_i_x_e_r___c_h_a_i_n_._c │ │ │ │ │ ********** aall__aattttaacchh__ssaammppllee__iinnssttaannccee__ttoo__vvooiiccee ********** │ │ │ │ │ bool al_attach_sample_instance_to_voice(ALLEGRO_SAMPLE_INSTANCE *spl, │ │ │ │ │ ALLEGRO_VOICE *voice) │ │ │ │ │ +bool al_attach_sample_instance_to_voice(ALLEGRO_SAMPLE_INSTANCE *spl, │ │ │ │ │ + ALLEGRO_VOICE *voice) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ 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 frequency, │ │ │ │ │ channel configuration and depth (including signed-ness) as the voice. This │ │ │ │ │ function may fail if the selected driver doesn’t support preloading sample │ │ │ │ │ data. │ │ │ │ │ At this time, we don’t recommend attaching sample instances directly to voices. │ │ │ │ │ Use a mixer inbetween. │ │ │ │ │ Returns true on success, false on failure. │ │ │ │ │ See also: _a_l___d_e_t_a_c_h___v_o_i_c_e, _a_l___v_o_i_c_e___h_a_s___a_t_t_a_c_h_m_e_n_t_s │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___k_c_m___d_i_r_e_c_t_._c │ │ │ │ │ * _e_x___a_u_d_i_o___c_h_a_i_n_._c_p_p │ │ │ │ │ ********** aall__ggeett__vvooiiccee__ffrreeqquueennccyy ********** │ │ │ │ │ +unsigned int al_get_voic) │ │ │ │ │ unsigned int al_get_voice_frequency(const ALLEGRO_VOICE *voice) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the frequency of the voice (in Hz), e.g. 44100. │ │ │ │ │ ********** aall__ggeett__vvooiiccee__cchhaannnneellss ********** │ │ │ │ │ ALLEGRO_CHANNEL_CONF al_get_voice_channels(const ALLEGRO_VOICE *voice) │ │ │ │ │ +ALLEGRO_CHANNEL_CONF al_get_voice_channels(const ALLEGRO_VOICE *voice) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the channel configuration of the voice. │ │ │ │ │ See also: _A_L_L_E_G_R_O___C_H_A_N_N_E_L___C_O_N_F. │ │ │ │ │ ********** aall__ggeett__vvooiiccee__ddeepptthh ********** │ │ │ │ │ ALLEGRO_AUDIO_DEPTH al_get_voice_depth(const ALLEGRO_VOICE *voice) │ │ │ │ │ +ALLEGRO_AUDIO_DEPTH al_get_voice_depth(const ALLEGRO_VOICE *voice) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the audio depth of the voice. │ │ │ │ │ See also: _A_L_L_E_G_R_O___A_U_D_I_O___D_E_P_T_H. │ │ │ │ │ ********** aall__ggeett__vvooiiccee__ppllaayyiinngg ********** │ │ │ │ │ bool al_get_voice_playing(const ALLEGRO_VOICE *voice) │ │ │ │ │ +bool al_get_voice_playing(const ALLEGRO_VOICE *voice) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return true if the voice is currently playing. │ │ │ │ │ See also: _a_l___s_e_t___v_o_i_c_e___p_l_a_y_i_n_g │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___c_h_a_i_n_._c_p_p │ │ │ │ │ ********** aall__sseett__vvooiiccee__ppllaayyiinngg ********** │ │ │ │ │ bool al_set_voice_playing(ALLEGRO_VOICE *voice, bool val) │ │ │ │ │ +bool al_set_voice_playing(ALLEGRO_VOICE *voice, bool val) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ 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. On success the │ │ │ │ │ voice’s current sample position is reset. │ │ │ │ │ Returns true on success, false on failure. │ │ │ │ │ See also: _a_l___g_e_t___v_o_i_c_e___p_l_a_y_i_n_g │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___c_h_a_i_n_._c_p_p │ │ │ │ │ ********** aall__ggeett__vvooiiccee__ppoossiittiioonn ********** │ │ │ │ │ unsigned int al_get_voice_position(const ALLEGRO_VOICE *voice) │ │ │ │ │ +unsigned int al_get_voice_position(const ALLEGRO_VOICE *voice) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ When the voice has a non-streaming object attached to it, e.g. a sample, │ │ │ │ │ returns the voice’s current sample position. Otherwise, returns zero. │ │ │ │ │ See also: _a_l___s_e_t___v_o_i_c_e___p_o_s_i_t_i_o_n. │ │ │ │ │ ********** aall__sseett__vvooiiccee__ppoossiittiioonn ********** │ │ │ │ │ bool al_set_voice_position(ALLEGRO_VOICE *voice, unsigned int val) │ │ │ │ │ +bool al_set_voice_position(ALLEGRO_VOICE *voice, unsigned int val) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Set the voice position. This can only work if the voice has a non-streaming │ │ │ │ │ object attached to it, e.g. a sample instance. │ │ │ │ │ Returns true on success, false on failure. │ │ │ │ │ See also: _a_l___g_e_t___v_o_i_c_e___p_o_s_i_t_i_o_n. │ │ │ │ │ ********** aall__vvooiiccee__hhaass__aattttaacchhmmeennttss ********** │ │ │ │ │ bool al_voice_has_attachments(const ALLEGRO_VOICE* voice) │ │ │ │ │ +bool al_voice_has_attachments(const ALLEGRO_VOICE* voice) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Returns true if the voice has something attached to it. │ │ │ │ │ See also: _a_l___a_t_t_a_c_h___m_i_x_e_r___t_o___v_o_i_c_e, _a_l___a_t_t_a_c_h___s_a_m_p_l_e___i_n_s_t_a_n_c_e___t_o___v_o_i_c_e, │ │ │ │ │ _a_l___a_t_t_a_c_h___a_u_d_i_o___s_t_r_e_a_m___t_o___v_o_i_c_e │ │ │ │ │ Since: 5.2.9 │ │ │ │ │ ************ MMiixxeerrss ************ │ │ │ │ │ ********** AALLLLEEGGRROO__MMIIXXEERR ********** │ │ │ │ │ typedef struct ALLEGRO_MIXER ALLEGRO_MIXER; │ │ │ │ │ +typedef struct ALLEGRO_MIXER ALLEGRO_MIXER; │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ A mixer mixes together attached streams into a single buffer. In the process, │ │ │ │ │ it converts channel configurations, sample frequencies and audio depths of the │ │ │ │ │ attached sample instances and audio streams accordingly. You can control the │ │ │ │ │ quality of this conversion using ALLEGRO_MIXER_QUALITY. │ │ │ │ │ When going from mono to stereo (and above), the mixer reduces the volume of │ │ │ │ │ both channels by sqrt(2). When going from stereo (and above) to mono, the mixer │ │ │ │ │ @@ -1716,21 +1879,24 @@ │ │ │ │ │ to the center channel (if present). │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_t_r_e_a_m___f_i_l_e_._c │ │ │ │ │ * _e_x___a_c_o_d_e_c___m_u_l_t_i_._c │ │ │ │ │ * _e_x___m_i_x_e_r___c_h_a_i_n_._c │ │ │ │ │ ********** AALLLLEEGGRROO__MMIIXXEERR__QQUUAALLIITTYY ********** │ │ │ │ │ enum ALLEGRO_MIXER_QUALITY │ │ │ │ │ +enum ALLEGRO_MIXER_QUALITY │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ * ALLEGRO_MIXER_QUALITY_POINT - point sampling │ │ │ │ │ * ALLEGRO_MIXER_QUALITY_LINEAR - linear interpolation │ │ │ │ │ * ALLEGRO_MIXER_QUALITY_CUBIC - cubic interpolation (since: 5.0.8, 5.1.4) │ │ │ │ │ ********** aall__ccrreeaattee__mmiixxeerr ********** │ │ │ │ │ ALLEGRO_MIXER *al_create_mixer(unsigned int freq, │ │ │ │ │ ALLEGRO_AUDIO_DEPTH depth, ALLEGRO_CHANNEL_CONF chan_conf) │ │ │ │ │ +ALLEGRO_MIXER *al_create_mixer(unsigned int freq, │ │ │ │ │ + ALLEGRO_AUDIO_DEPTH depth, ALLEGRO_CHANNEL_CONF chan_conf) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Creates a mixer to attach sample instances, audio streams, or other mixers to. │ │ │ │ │ It will mix into a buffer at the requested frequency (in Hz) and channel count. │ │ │ │ │ The only supported audio depths are ALLEGRO_AUDIO_DEPTH_FLOAT32 and │ │ │ │ │ ALLEGRO_AUDIO_DEPTH_INT16 (not yet complete). │ │ │ │ │ To actually produce any output, the mixer will have to be attached to a voice │ │ │ │ │ using _a_l___a_t_t_a_c_h___m_i_x_e_r___t_o___v_o_i_c_e. │ │ │ │ │ @@ -1740,212 +1906,239 @@ │ │ │ │ │ See also: _a_l___d_e_s_t_r_o_y___m_i_x_e_r, _A_L_L_E_G_R_O___A_U_D_I_O___D_E_P_T_H, _A_L_L_E_G_R_O___C_H_A_N_N_E_L___C_O_N_F │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_t_r_e_a_m___f_i_l_e_._c │ │ │ │ │ * _e_x___a_c_o_d_e_c___m_u_l_t_i_._c │ │ │ │ │ * _e_x___m_i_x_e_r___c_h_a_i_n_._c │ │ │ │ │ ********** aall__ddeessttrrooyy__mmiixxeerr ********** │ │ │ │ │ void al_destroy_mixer(ALLEGRO_MIXER *mixer) │ │ │ │ │ +void al_destroy_mixer(ALLEGRO_MIXER *mixer) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Destroys the mixer. │ │ │ │ │ See also: _a_l___c_r_e_a_t_e___m_i_x_e_r │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_t_r_e_a_m___f_i_l_e_._c │ │ │ │ │ * _e_x___a_c_o_d_e_c___m_u_l_t_i_._c │ │ │ │ │ * _e_x___m_i_x_e_r___c_h_a_i_n_._c │ │ │ │ │ ********** aall__ggeett__ddeeffaauulltt__mmiixxeerr ********** │ │ │ │ │ ALLEGRO_MIXER *al_get_default_mixer(void) │ │ │ │ │ +ALLEGRO_MIXER *al_get_default_mixer(void) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the default mixer, or NULL if one has not been set. Although different │ │ │ │ │ configurations of mixers and voices can be used, in most cases a single mixer │ │ │ │ │ attached to a voice is what you want. The default mixer is used by │ │ │ │ │ _a_l___p_l_a_y___s_a_m_p_l_e. │ │ │ │ │ See also: _a_l___r_e_s_e_r_v_e___s_a_m_p_l_e_s, _a_l___p_l_a_y___s_a_m_p_l_e, _a_l___s_e_t___d_e_f_a_u_l_t___m_i_x_e_r, │ │ │ │ │ _a_l___r_e_s_t_o_r_e___d_e_f_a_u_l_t___m_i_x_e_r │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_a_w_._c │ │ │ │ │ * _e_x___a_u_d_i_o___p_r_o_p_s_._c_p_p │ │ │ │ │ * _e_x___r_e_s_a_m_p_l_e___t_e_s_t_._c │ │ │ │ │ ********** aall__sseett__ddeeffaauulltt__mmiixxeerr ********** │ │ │ │ │ bool al_set_default_mixer(ALLEGRO_MIXER *mixer) │ │ │ │ │ +bool al_set_default_mixer(ALLEGRO_MIXER *mixer) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Sets the default mixer. All samples started with _a_l___p_l_a_y___s_a_m_p_l_e will be stopped │ │ │ │ │ and all sample instances returned by _a_l___l_o_c_k___s_a_m_p_l_e___i_d will be invalidated. If │ │ │ │ │ you are using your own mixer, this should be called before _a_l___r_e_s_e_r_v_e___s_a_m_p_l_e_s. │ │ │ │ │ Returns true on success, false on error. │ │ │ │ │ See also: _a_l___r_e_s_e_r_v_e___s_a_m_p_l_e_s, _a_l___p_l_a_y___s_a_m_p_l_e, _a_l___g_e_t___d_e_f_a_u_l_t___m_i_x_e_r, │ │ │ │ │ _a_l___r_e_s_t_o_r_e___d_e_f_a_u_l_t___m_i_x_e_r │ │ │ │ │ ********** aall__rreessttoorree__ddeeffaauulltt__mmiixxeerr ********** │ │ │ │ │ bool al_restore_default_mixer(void) │ │ │ │ │ +bool al_restore_default_mixer(void) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Restores Allegro’s default mixer and attaches it to the default voice. If the │ │ │ │ │ default mixer hasn’t been created before, it will be created. If the default │ │ │ │ │ voice hasn’t been set via _a_l___s_e_t___d_e_f_a_u_l_t___v_o_i_c_e or created before, it will also │ │ │ │ │ be created. All samples started with _a_l___p_l_a_y___s_a_m_p_l_e will be stopped and all │ │ │ │ │ sample instances returned by _a_l___l_o_c_k___s_a_m_p_l_e___i_d will be invalidated. │ │ │ │ │ Returns true on success, false on error. │ │ │ │ │ See also: _a_l___g_e_t___d_e_f_a_u_l_t___m_i_x_e_r, _a_l___s_e_t___d_e_f_a_u_l_t___m_i_x_e_r, _a_l___r_e_s_e_r_v_e___s_a_m_p_l_e_s. │ │ │ │ │ ********** aall__ggeett__ddeeffaauulltt__vvooiiccee ********** │ │ │ │ │ ALLEGRO_VOICE *al_get_default_voice(void) │ │ │ │ │ +ALLEGRO_VOICE *al_get_default_voice(void) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Returns the default voice or NULL if there is none. │ │ │ │ │ Since: 5.1.13 │ │ │ │ │ See also: _a_l___g_e_t___d_e_f_a_u_l_t___m_i_x_e_r │ │ │ │ │ ********** aall__sseett__ddeeffaauulltt__vvooiiccee ********** │ │ │ │ │ void al_set_default_voice(ALLEGRO_VOICE *voice) │ │ │ │ │ +void al_set_default_voice(ALLEGRO_VOICE *voice) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ You can call this before calling al_restore_default_mixer to provide the voice │ │ │ │ │ which should be used. Any previous voice will be destroyed. You can also pass │ │ │ │ │ NULL to destroy the current default voice. │ │ │ │ │ Since: 5.1.13 │ │ │ │ │ See also: _a_l___g_e_t___d_e_f_a_u_l_t___m_i_x_e_r │ │ │ │ │ ********** aall__aattttaacchh__mmiixxeerr__ttoo__mmiixxeerr ********** │ │ │ │ │ bool al_attach_mixer_to_mixer(ALLEGRO_MIXER *stream, ALLEGRO_MIXER *mixer) │ │ │ │ │ +bool al_attach_mixer_to_mixer(ALLEGRO_MIXER *stream, ALLEGRO_MIXER *mixer) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Attaches the mixer passed as the first argument onto the mixer passed as the │ │ │ │ │ second argument. The first mixer (that is going to be attached) must not │ │ │ │ │ already be attached to anything. Both mixers must use the same frequency, audio │ │ │ │ │ depth and channel configuration. │ │ │ │ │ Returns true on success, false on error. │ │ │ │ │ It is invalid to attach a mixer to itself. │ │ │ │ │ See also: _a_l___d_e_t_a_c_h___m_i_x_e_r. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___m_i_x_e_r___c_h_a_i_n_._c │ │ │ │ │ * _e_x___a_u_d_i_o___c_h_a_i_n_._c_p_p │ │ │ │ │ ********** aall__aattttaacchh__ssaammppllee__iinnssttaannccee__ttoo__mmiixxeerr ********** │ │ │ │ │ bool al_attach_sample_instance_to_mixer(ALLEGRO_SAMPLE_INSTANCE *spl, │ │ │ │ │ ALLEGRO_MIXER *mixer) │ │ │ │ │ +bool al_attach_sample_instance_to_mixer(ALLEGRO_SAMPLE_INSTANCE *spl, │ │ │ │ │ + ALLEGRO_MIXER *mixer) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Attach a sample instance to a mixer. The instance must not already be attached │ │ │ │ │ to anything. │ │ │ │ │ Returns true on success, false on failure. │ │ │ │ │ See also: _a_l___d_e_t_a_c_h___s_a_m_p_l_e___i_n_s_t_a_n_c_e. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_c_o_d_e_c___m_u_l_t_i_._c │ │ │ │ │ * _e_x___m_i_x_e_r___c_h_a_i_n_._c │ │ │ │ │ * _e_x___a_c_o_d_e_c_._c │ │ │ │ │ ********** aall__aattttaacchh__aauuddiioo__ssttrreeaamm__ttoo__mmiixxeerr ********** │ │ │ │ │ bool al_attach_audio_stream_to_mixer(ALLEGRO_AUDIO_STREAM *stream, │ │ │ │ │ ALLEGRO_MIXER *mixer) │ │ │ │ │ +bool al_attach_audio_stream_to_mixer(ALLEGRO_AUDIO_STREAM *stream, │ │ │ │ │ +ALLEGRO_MIXER *mixer) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Attach an audio stream to a mixer. The stream must not already be attached to │ │ │ │ │ anything. │ │ │ │ │ Returns true on success, false on failure. │ │ │ │ │ See also: _a_l___d_e_t_a_c_h___a_u_d_i_o___s_t_r_e_a_m. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_a_w_._c │ │ │ │ │ * _e_x___s_t_r_e_a_m___f_i_l_e_._c │ │ │ │ │ * _e_x___r_e_s_a_m_p_l_e___t_e_s_t_._c │ │ │ │ │ ********** aall__ggeett__mmiixxeerr__ffrreeqquueennccyy ********** │ │ │ │ │ unsigned int al_get_mixer_frequency(const ALLEGRO_MIXER *mixer) │ │ │ │ │ +unsigned int al_get_mixer_frequency(const ALLEGRO_MIXER *mixer) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the mixer frequency (in Hz). │ │ │ │ │ See also: _a_l___s_e_t___m_i_x_e_r___f_r_e_q_u_e_n_c_y │ │ │ │ │ ********** aall__sseett__mmiixxeerr__ffrreeqquueennccyy ********** │ │ │ │ │ bool al_set_mixer_frequency(ALLEGRO_MIXER *mixer, unsigned int val) │ │ │ │ │ +bool al_set_mixer_frequency(ALLEGRO_MIXER *mixer, unsigned int val) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Set the mixer frequency (in Hz). This will only work if the mixer is not │ │ │ │ │ attached to anything. │ │ │ │ │ Returns true on success, false on failure. │ │ │ │ │ See also: _a_l___g_e_t___m_i_x_e_r___f_r_e_q_u_e_n_c_y │ │ │ │ │ ********** aall__ggeett__mmiixxeerr__cchhaannnneellss ********** │ │ │ │ │ ALLEGRO_CHANNEL_CONF al_get_mixer_channels(const ALLEGRO_MIXER *mixer) │ │ │ │ │ +ALLEGRO_CHANNEL_CONF al_get_mixer_channels(const ALLEGRO_MIXER *mixer) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the mixer channel configuration. │ │ │ │ │ See also: _A_L_L_E_G_R_O___C_H_A_N_N_E_L___C_O_N_F. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_y_n_t_h_._c_p_p │ │ │ │ │ ********** aall__ggeett__mmiixxeerr__ddeepptthh ********** │ │ │ │ │ ALLEGRO_AUDIO_DEPTH al_get_mixer_depth(const ALLEGRO_MIXER *mixer) │ │ │ │ │ +ALLEGRO_AUDIO_DEPTH al_get_mixer_depth(const ALLEGRO_MIXER *mixer) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the mixer audio depth. │ │ │ │ │ See also: _A_L_L_E_G_R_O___A_U_D_I_O___D_E_P_T_H. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_y_n_t_h_._c_p_p │ │ │ │ │ ********** aall__ggeett__mmiixxeerr__ggaaiinn ********** │ │ │ │ │ float al_get_mixer_gain(const ALLEGRO_MIXER *mixer) │ │ │ │ │ +float al_get_mixer_gain(const ALLEGRO_MIXER *mixer) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the mixer gain (amplification factor). The default is 1.0. │ │ │ │ │ Since: 5.0.6, 5.1.0 │ │ │ │ │ See also: _a_l___s_e_t___m_i_x_e_r___g_a_i_n. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___c_h_a_i_n_._c_p_p │ │ │ │ │ ********** aall__sseett__mmiixxeerr__ggaaiinn ********** │ │ │ │ │ bool al_set_mixer_gain(ALLEGRO_MIXER *mixer, float new_gain) │ │ │ │ │ +bool al_set_mixer_gain(ALLEGRO_MIXER *mixer, float new_gain) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Set the mixer gain (amplification factor). │ │ │ │ │ Returns true on success, false on failure. │ │ │ │ │ Since: 5.0.6, 5.1.0 │ │ │ │ │ See also: _a_l___g_e_t___m_i_x_e_r___g_a_i_n │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___p_r_o_p_s_._c_p_p │ │ │ │ │ * _e_x___a_u_d_i_o___c_h_a_i_n_._c_p_p │ │ │ │ │ ********** aall__ggeett__mmiixxeerr__qquuaalliittyy ********** │ │ │ │ │ ALLEGRO_MIXER_QUALITY al_get_mixer_quality(const ALLEGRO_MIXER *mixer) │ │ │ │ │ +ALLEGRO_MIXER_QUALITY al_get_mixer_quality(const ALLEGRO_MIXER *mixer) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the mixer quality. │ │ │ │ │ See also: _A_L_L_E_G_R_O___M_I_X_E_R___Q_U_A_L_I_T_Y, _a_l___s_e_t___m_i_x_e_r___q_u_a_l_i_t_y │ │ │ │ │ ********** aall__sseett__mmiixxeerr__qquuaalliittyy ********** │ │ │ │ │ bool al_set_mixer_quality(ALLEGRO_MIXER *mixer, ALLEGRO_MIXER_QUALITY │ │ │ │ │ new_quality) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Set the mixer quality. This can only succeed if the mixer does not have │ │ │ │ │ anything attached to it. │ │ │ │ │ Returns true on success, false on failure. │ │ │ │ │ See also: _A_L_L_E_G_R_O___M_I_X_E_R___Q_U_A_L_I_T_Y, _a_l___g_e_t___m_i_x_e_r___q_u_a_l_i_t_y │ │ │ │ │ ********** aall__ggeett__mmiixxeerr__ppllaayyiinngg ********** │ │ │ │ │ bool al_get_mixer_playing(const ALLEGRO_MIXER *mixer) │ │ │ │ │ +bool al_get_mixer_playing(const ALLEGRO_MIXER *mixer) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return true if the mixer is playing. │ │ │ │ │ See also: _a_l___s_e_t___m_i_x_e_r___p_l_a_y_i_n_g. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___c_h_a_i_n_._c_p_p │ │ │ │ │ ********** aall__sseett__mmiixxeerr__ppllaayyiinngg ********** │ │ │ │ │ bool al_set_mixer_playing(ALLEGRO_MIXER *mixer, bool val) │ │ │ │ │ +bool al_set_mixer_playing(ALLEGRO_MIXER *mixer, bool val) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Change whether the mixer is playing. │ │ │ │ │ Returns true on success, false on failure. │ │ │ │ │ See also: _a_l___g_e_t___m_i_x_e_r___p_l_a_y_i_n_g. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___c_h_a_i_n_._c_p_p │ │ │ │ │ ********** aall__ggeett__mmiixxeerr__aattttaacchheedd ********** │ │ │ │ │ bool al_get_mixer_attached(const ALLEGRO_MIXER *mixer) │ │ │ │ │ +bool al_get_mixer_attached(const ALLEGRO_MIXER *mixer) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return true if the mixer is attached to something. │ │ │ │ │ See also: _a_l___m_i_x_e_r___h_a_s___a_t_t_a_c_h_m_e_n_t_s, _a_l___a_t_t_a_c_h___s_a_m_p_l_e___i_n_s_t_a_n_c_e___t_o___m_i_x_e_r, │ │ │ │ │ _a_l___a_t_t_a_c_h___a_u_d_i_o___s_t_r_e_a_m___t_o___m_i_x_e_r, _a_l___a_t_t_a_c_h___m_i_x_e_r___t_o___m_i_x_e_r, _a_l___d_e_t_a_c_h___m_i_x_e_r │ │ │ │ │ ********** aall__mmiixxeerr__hhaass__aattttaacchhmmeennttss ********** │ │ │ │ │ bool al_mixer_has_attachments(const ALLEGRO_MIXER* mixer) │ │ │ │ │ +bool al_mixer_has_attachments(const ALLEGRO_MIXER* mixer) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Returns true if the mixer has something attached to it. │ │ │ │ │ See also: _a_l___g_e_t___m_i_x_e_r___a_t_t_a_c_h_e_d, _a_l___a_t_t_a_c_h___s_a_m_p_l_e___i_n_s_t_a_n_c_e___t_o___m_i_x_e_r, │ │ │ │ │ _a_l___a_t_t_a_c_h___a_u_d_i_o___s_t_r_e_a_m___t_o___m_i_x_e_r, _a_l___a_t_t_a_c_h___m_i_x_e_r___t_o___m_i_x_e_r, _a_l___d_e_t_a_c_h___m_i_x_e_r │ │ │ │ │ Since: 5.2.9 │ │ │ │ │ ********** aall__ddeettaacchh__mmiixxeerr ********** │ │ │ │ │ bool al_detach_mixer(ALLEGRO_MIXER *mixer) │ │ │ │ │ +bool al_detach_mixer(ALLEGRO_MIXER *mixer) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Detach the mixer from whatever it is attached to, if anything. │ │ │ │ │ See also: _a_l___a_t_t_a_c_h___m_i_x_e_r___t_o___m_i_x_e_r. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___c_h_a_i_n_._c_p_p │ │ │ │ │ ********** aall__sseett__mmiixxeerr__ppoossttpprroocceessss__ccaallllbbaacckk ********** │ │ │ │ │ bool al_set_mixer_postprocess_callback(ALLEGRO_MIXER *mixer, │ │ │ │ │ void (*pp_callback)(void *buf, unsigned int samples, void *data), │ │ │ │ │ void *pp_callback_userdata) │ │ │ │ │ +bool al_set_mixer_postprocess_callback(ALLEGRO_MIXER *mixer, │ │ │ │ │ + void (*pp_callback)(void *buf, unsigned int samples, void *data), │ │ │ │ │ + void *pp_callback_userdata) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ 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. │ │ │ │ │ NNoottee:: The callback is called from a dedicated audio thread. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___r_e_s_a_m_p_l_e___t_e_s_t_._c │ │ │ │ │ * _e_x___s_y_n_t_h_._c_p_p │ │ │ │ │ * _e_x___m_i_x_e_r___p_p_._c │ │ │ │ │ ************ MMiisscceellaanneeoouuss ************ │ │ │ │ │ ********** AALLLLEEGGRROO__AAUUDDIIOO__DDEEPPTTHH ********** │ │ │ │ │ enum ALLEGRO_AUDIO_DEPTH │ │ │ │ │ +enum ALLEGRO_AUDIO_DEPTH │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Sample depth and type as well as signedness. Mixers only use 32-bit signed │ │ │ │ │ float (-1..+1), or 16-bit signed integers. Signedness is determined by an │ │ │ │ │ “unsigned” bit-flag applied to the depth value. │ │ │ │ │ * ALLEGRO_AUDIO_DEPTH_INT8 │ │ │ │ │ * ALLEGRO_AUDIO_DEPTH_INT16 │ │ │ │ │ * ALLEGRO_AUDIO_DEPTH_INT24 │ │ │ │ │ @@ -1957,28 +2150,30 @@ │ │ │ │ │ * ALLEGRO_AUDIO_DEPTH_UINT24 │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_a_w_._c │ │ │ │ │ * _e_x___s_t_r_e_a_m___f_i_l_e_._c │ │ │ │ │ * _e_x___a_c_o_d_e_c___m_u_l_t_i_._c │ │ │ │ │ ********** AALLLLEEGGRROO__AAUUDDIIOO__PPAANN__NNOONNEE ********** │ │ │ │ │ #define ALLEGRO_AUDIO_PAN_NONE (-1000.0f) │ │ │ │ │ +#define ALLEGRO_AUDIO_PAN_NONE (-1000.0f) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ A special value for the pan property of sample instances and audio streams. Use │ │ │ │ │ this value to disable panning on sample instances and audio streams, and play │ │ │ │ │ them without attentuation implied by panning support. │ │ │ │ │ ALLEGRO_AUDIO_PAN_NONE is different from a pan value of 0.0 (centered) because, │ │ │ │ │ when panning is enabled, we try to maintain a constant sound power level as a │ │ │ │ │ sample is panned from left to right. A sound coming out of one speaker should │ │ │ │ │ sound as loud as it does when split over two speakers. As a consequence, a │ │ │ │ │ sample with pan value 0.0 will be 3 dB softer than the original level. │ │ │ │ │ (Please correct us if this is wrong.) │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_u_d_i_o___p_r_o_p_s_._c_p_p │ │ │ │ │ ********** AALLLLEEGGRROO__CCHHAANNNNEELL__CCOONNFF ********** │ │ │ │ │ enum ALLEGRO_CHANNEL_CONF │ │ │ │ │ +enum ALLEGRO_CHANNEL_CONF │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Speaker configuration (mono, stereo, 2.1, etc). │ │ │ │ │ * ALLEGRO_CHANNEL_CONF_1 │ │ │ │ │ * ALLEGRO_CHANNEL_CONF_2 │ │ │ │ │ * ALLEGRO_CHANNEL_CONF_3 │ │ │ │ │ * ALLEGRO_CHANNEL_CONF_4 │ │ │ │ │ * ALLEGRO_CHANNEL_CONF_5_1 │ │ │ │ │ @@ -1986,14 +2181,15 @@ │ │ │ │ │ * ALLEGRO_CHANNEL_CONF_7_1 │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_a_w_._c │ │ │ │ │ * _e_x___s_t_r_e_a_m___f_i_l_e_._c │ │ │ │ │ * _e_x___a_c_o_d_e_c___m_u_l_t_i_._c │ │ │ │ │ ********** AALLLLEEGGRROO__PPLLAAYYMMOODDEE ********** │ │ │ │ │ enum ALLEGRO_PLAYMODE │ │ │ │ │ +enum ALLEGRO_PLAYMODE │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Sample and stream playback mode. │ │ │ │ │ * ALLEGRO_PLAYMODE_ONCE - the sample/stream is played from start to finish │ │ │ │ │ an then it stops. │ │ │ │ │ * ALLEGRO_PLAYMODE_LOOP - the sample/stream is played from start to finish │ │ │ │ │ (or between the two loop points). When it reaches the end, it restarts │ │ │ │ │ from the beginning. │ │ │ │ │ @@ -2006,14 +2202,15 @@ │ │ │ │ │ for streams. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_t_r_e_a_m___f_i_l_e_._c │ │ │ │ │ * _e_x___k_c_m___d_i_r_e_c_t_._c │ │ │ │ │ * _e_x___m_i_x_e_r___c_h_a_i_n_._c │ │ │ │ │ ********** AALLLLEEGGRROO__AAUUDDIIOO__EEVVEENNTT__TTYYPPEE ********** │ │ │ │ │ enum ALLEGRO_AUDIO_EVENT_TYPE │ │ │ │ │ +enum ALLEGRO_AUDIO_EVENT_TYPE │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Events sent by _a_l___g_e_t___a_u_d_i_o___s_t_r_e_a_m___e_v_e_n_t___s_o_u_r_c_e or │ │ │ │ │ _a_l___g_e_t___a_u_d_i_o___r_e_c_o_r_d_e_r___e_v_e_n_t___s_o_u_r_c_e. │ │ │ │ │ ******** AALLLLEEGGRROO__EEVVEENNTT__AAUUDDIIOO__SSTTRREEAAMM__FFRRAAGGMMEENNTT ******** │ │ │ │ │ Sent when a stream fragment is ready to be filled in. See │ │ │ │ │ _a_l___g_e_t___a_u_d_i_o___s_t_r_e_a_m___f_r_a_g_m_e_n_t. │ │ │ │ │ ******** AALLLLEEGGRROO__EEVVEENNTT__AAUUDDIIOO__SSTTRREEAAMM__FFIINNIISSHHEEDD ******** │ │ │ │ │ @@ -2023,34 +2220,39 @@ │ │ │ │ │ to _A_L_L_E_G_R_O___A_U_D_I_O___R_E_C_O_R_D_E_R___E_V_E_N_T via _a_l___g_e_t___a_u_d_i_o___r_e_c_o_r_d_e_r___e_v_e_n_t. │ │ │ │ │ You must always check the values for the buffer and samples as they are not │ │ │ │ │ guaranteed to be exactly what was originally specified. │ │ │ │ │ Since: 5.1.1 │ │ │ │ │ _UU_nn_ss_tt_aa_bb_ll_ee_ _AA_PP_II:: The API may need a slight redesign. │ │ │ │ │ ********** aall__ggeett__aalllleeggrroo__aauuddiioo__vveerrssiioonn ********** │ │ │ │ │ uint32_t al_get_allegro_audio_version(void) │ │ │ │ │ +uint32_t al_get_allegro_audio_version(void) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Returns the (compiled) version of the addon, in the same format as │ │ │ │ │ _a_l___g_e_t___a_l_l_e_g_r_o___v_e_r_s_i_o_n. │ │ │ │ │ ********** aall__ggeett__aauuddiioo__ddeepptthh__ssiizzee ********** │ │ │ │ │ size_t al_get_audio_depth_size(ALLEGRO_AUDIO_DEPTH depth) │ │ │ │ │ +size_t al_get_audio_depth_size(ALLEGRO_AUDIO_DEPTH depth) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the size of a sample, in bytes, for the given format. The format is one │ │ │ │ │ of the values listed under _A_L_L_E_G_R_O___A_U_D_I_O___D_E_P_T_H. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_y_n_t_h_._c_p_p │ │ │ │ │ ********** aall__ggeett__cchhaannnneell__ccoouunntt ********** │ │ │ │ │ size_t al_get_channel_count(ALLEGRO_CHANNEL_CONF conf) │ │ │ │ │ +size_t al_get_channel_count(ALLEGRO_CHANNEL_CONF conf) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Return the number of channels for the given channel configuration, which is one │ │ │ │ │ of the values listed under _A_L_L_E_G_R_O___C_H_A_N_N_E_L___C_O_N_F. │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___a_c_o_d_e_c_._c │ │ │ │ │ ********** aall__ffiillll__ssiilleennccee ********** │ │ │ │ │ void al_fill_silence(void *buf, unsigned int samples, │ │ │ │ │ ALLEGRO_AUDIO_DEPTH depth, ALLEGRO_CHANNEL_CONF chan_conf) │ │ │ │ │ +void al_fill_silence(void *buf, unsigned int samples, │ │ │ │ │ + ALLEGRO_AUDIO_DEPTH depth, ALLEGRO_CHANNEL_CONF chan_conf) │ │ │ │ │ _S_o_u_r_c_e_ _C_o_d_e │ │ │ │ │ Fill a buffer with silence, for the given format and channel configuration. The │ │ │ │ │ buffer must have enough space for the given number of samples, and be properly │ │ │ │ │ aligned. │ │ │ │ │ Since: 5.1.8 │ │ │ │ │ Examples: │ │ │ │ │ * _e_x___s_a_w_._c │ │ │ ├── ./usr/share/doc/allegro5-doc/refman/color.html │ │ │ │ @@ -263,15 +263,16 @@ │ │ │ │ between the three color channels into account as well. In general, most │ │ │ │ monitors nowadays try to be close to the sRGB specification. And so if │ │ │ │ in an Allegro game you display something with color │ │ │ │al_map_rgb_f(0.5, 0.5, 0,5)
│ │ │ │then it will appear at about half brightness (even though the actual │ │ │ │ brightness output of the monitor will be less than half).
│ │ │ │al_color_cmyk
│ │ │ │ -│ │ │ │ +(float c, float m, float y, float k) ALLEGRO_COLOR al_color_cmyk
│ │ │ │ │ │ │ │(float c, float m, float y, float k) │ │ │ │ + ALLEGRO_COLOR al_color_cmyk(float c, float m, float y, float k) ALLEGRO_COLOR al_color_cmyk
Return an ALLEGRO_COLOR │ │ │ │ structure from CMYK values (cyan, magenta, yellow, black).
│ │ │ │See also: al_color_cmyk_to_rgb, Examples:
│ │ │ ││ │ │ │
│ │ │ │- ex_color.cpp
│ │ │ │al_color_cmyk_to_rgb
│ │ │ ││ │ │ │ + float key, float *red, float *green, float *blue) │ │ │ │ +void al_color_cmyk_to_rgb(float cyan, float magenta, float yellow, │ │ │ │ + float key, float *red, float *green, float *blue) │ │ │ │ │ │ │ │void al_color_cmyk_to_rgb(float cyan, float magenta, float yellow, │ │ │ │ -float key, float *red, float *green, float *blue)
Convert CMYK values to RGB values.
│ │ │ │See also: al_color_cmyk, al_color_rgb_to_cmyk
│ │ │ │Examples:
│ │ │ ││ │ │ │
│ │ │ │- ex_color.cpp
│ │ │ │al_color_hsl
│ │ │ │ -│ │ │ │ +(float h, float s, float l) ALLEGRO_COLOR al_color_hsl
│ │ │ │ │ │ │ │(float h, float s, float l) │ │ │ │ + ALLEGRO_COLOR al_color_hsl(float h, float s, float l) ALLEGRO_COLOR al_color_hsl
Return an ALLEGRO_COLOR │ │ │ │ structure from HSL (hue, saturation, lightness) values.
│ │ │ │Parameters:
│ │ │ ││ │ │ │ @@ -318,15 +322,17 @@ │ │ │ │
│ │ │ │- ex_clip.c
│ │ │ │- ex_palette.c
│ │ │ │al_color_hsl_to_rgb
│ │ │ ││ │ │ │ + float *red, float *green, float *blue) │ │ │ │ +void al_color_hsl_to_rgb(float hue, float saturation, float lightness, │ │ │ │ + float *red, float *green, float *blue) │ │ │ │ │ │ │ │void al_color_hsl_to_rgb(float hue, float saturation, float lightness, │ │ │ │ -float *red, float *green, float *blue)
Convert values in HSL color model to RGB color model.
│ │ │ │Parameters:
│ │ │ ││ │ │ │
- hue - Color hue angle in the range 0..360
│ │ │ │ @@ -342,15 +348,16 @@ │ │ │ ││ │ │ │
│ │ │ │- ex_color.cpp
│ │ │ │- ex_palette.c
│ │ │ │al_color_hsv
│ │ │ │ -│ │ │ │ +(float h, float s, float v) ALLEGRO_COLOR al_color_hsv
│ │ │ │ │ │ │ │(float h, float s, float v) │ │ │ │ + ALLEGRO_COLOR al_color_hsv(float h, float s, float v) ALLEGRO_COLOR al_color_hsv
Return an ALLEGRO_COLOR │ │ │ │ structure from HSV (hue, saturation, value) values.
│ │ │ │Parameters:
│ │ │ ││ │ │ │ @@ -368,15 +375,17 @@ │ │ │ │
│ │ │ │- ex_color.cpp
│ │ │ │- ex_multisample.c
│ │ │ │al_color_hsv_to_rgb
│ │ │ ││ │ │ │ + float *red, float *green, float *blue) │ │ │ │ +void al_color_hsv_to_rgb(float hue, float saturation, float value, │ │ │ │ + float *red, float *green, float *blue) │ │ │ │ │ │ │ │void al_color_hsv_to_rgb(float hue, float saturation, float value, │ │ │ │ -float *red, float *green, float *blue)
Convert values in HSV color model to RGB color model.
│ │ │ │Parameters:
│ │ │ ││ │ │ │
- hue - Color hue angle in the range 0..360
│ │ │ │ @@ -390,15 +399,16 @@ │ │ │ │ href="color.html#al_color_hsl_to_rgb">al_color_hsl_to_rgb │ │ │ │Examples:
│ │ │ ││ │ │ │
│ │ │ │- ex_color.cpp
│ │ │ │al_color_html
│ │ │ │ -│ │ │ │ +(char const *string) ALLEGRO_COLOR al_color_html
│ │ │ │ │ │ │ │(char const *string) │ │ │ │ + ALLEGRO_COLOR al_color_html(char const *string) ALLEGRO_COLOR al_color_html
Interprets an HTML-style hex number (e.g. #00faff) as a color. The │ │ │ │ accepted format is the same as al_color_html_to_rgb.
│ │ │ │Returns the interpreted color, or │ │ │ │ @@ -409,15 +419,17 @@ │ │ │ │ Allegro 5.0.x.
│ │ │ │
See also: al_color_html_to_rgb, al_color_rgb_to_html
│ │ │ │bool al_color_html_to_rgb(char const *string,
│ │ │ │ -float *red, float *green, float *blue)
Interprets an HTML-style hex number (e.g. #00faff) as a color. The │ │ │ │ only accepted formats are “#RRGGBB” and “RRGGBB” where R, G, B are │ │ │ │ hexadecimal digits [0-9A-Fa-f].
│ │ │ │Returns true on success, false on failure. On failure all components │ │ │ │ @@ -426,15 +438,17 @@ │ │ │ │
Note: the behaviour on invalid strings is different from │ │ │ │ Allegro 5.0.x.
│ │ │ │ │ │ │ │See also: al_color_html, al_color_rgb_to_html
│ │ │ │void al_color_rgb_to_html(float red, float green, float blue,
│ │ │ │ -char *string)
Create an HTML-style string representation of an ALLEGRO_COLOR, e.g. #00faff.
│ │ │ │Parameters:
│ │ │ │Examples:
│ │ │ │(char const *name) ALLEGRO_COLOR al_color_name
(char const *name)
│ │ │ │ + ALLEGRO_COLOR al_color_name(char const *name) ALLEGRO_COLOR al_color_name
Return an ALLEGRO_COLOR │ │ │ │ with the given name. If the color is not found then black is │ │ │ │ returned.
│ │ │ │See ex_drag_and_drop.c │ │ │ │
bool al_color_name_to_rgb(char const *name, float *r, float *g, float *b)
bool al_color_name_to_rgb(char const *name, float *r, float *g, float *b)
│ │ │ │ +bool al_color_name_to_rgb(char const *name, float *r, float *g, float *b)
Parameters:
│ │ │ │Returns: true if a name from the list above was passed, else │ │ │ │ false.
│ │ │ │See also: al_color_name
│ │ │ │void al_color_rgb_to_cmyk(float red, float green, float blue,
│ │ │ │ -float *cyan, float *magenta, float *yellow, float *key)
Each RGB color can be represented in CMYK with a K component of 0 │ │ │ │ with the following formula:
│ │ │ │C = 1 - R
│ │ │ │ M = 1 - G
│ │ │ │ @@ -539,15 +557,17 @@
│ │ │ │ Examples:
│ │ │ │
│ │ │ │ - ex_color.cpp
│ │ │ │
│ │ │ │ al_color_rgb_to_hsl
│ │ │ │ void al_color_rgb_to_hsl(float red, float green, float blue,
│ │ │ │ -float *hue, float *saturation, float *lightness)
│ │ │ │ +float *hue, float *saturation, float *lightness)
│ │ │ │ + void al_color_rgb_to_hsl(float red, float green, float blue,
│ │ │ │ +float *hue, float *saturation, float *lightness)
│ │ │ │
│ │ │ │ Given an RGB triplet with components in the range 0..1, return the │ │ │ │ hue in degrees from 0..360 and saturation and lightness in the range │ │ │ │ 0..1.
│ │ │ │See also: ex_color.cpp
void al_color_rgb_to_hsv(float red, float green, float blue,
│ │ │ │ -float *hue, float *saturation, float *value)
Given an RGB triplet with components in the range 0..1, return the │ │ │ │ hue in degrees from 0..360 and saturation and value in the range │ │ │ │ 0..1.
│ │ │ │See also:
│ │ │ │ Given an RGB triplet with components in the range 0..1, find a color
│ │ │ │ name describing it approximately. See also: al_color_name_to_rgb, Examples: Convert RGB values to XYZ color space. Since: 5.2.3 See also: al_color_xyz, al_color_xyz_to_rgb Return an ALLEGRO_COLOR
│ │ │ │ structure from XYZ values. The CIE 1931 XYZ color space consists of
│ │ │ │ three components in the range 0..1. The Y component corresponds to
│ │ │ │ luminance and the X and Z components define the color. Since: 5.2.3 See also: al_color_xyz_to_rgb, al_color_rgb_to_xyz Convert XYZ color values to RGB color space. Since: 5.2.3 See also: al_color_xyz, al_color_rgb_to_xyz Convert RGB values to xyY color space. Since: 5.2.3 See also: al_color_xyy, al_color_xyy_to_rgb Return an ALLEGRO_COLOR
│ │ │ │ structure from xyY values. The Y component in the xyY color space is the
│ │ │ │ same as the Y in XYZ. However the x and y values are computed from XYZ like this: Since: 5.2.3 See also: al_color_xyy_to_rgb, al_color_rgb_to_xyy Convert xyY color values to RGB color space. Since: 5.2.3 See also: al_color_xyy, al_color_rgb_to_xyy Convert RGB values to L*a*b* color space. Since: 5.2.3 See also: al_color_lab, al_color_lab_to_rgb Examples: Return an ALLEGRO_COLOR
│ │ │ │ structure from CIE L*a*b* values. The L* component corresponds to
│ │ │ │ luminance from 0..1. The a* and b* components are in the range
│ │ │ │ -1..+1. Convert CIE L*a*b* color values to RGB color space. Since: 5.2.3 See also: al_color_lab, al_color_rgb_to_lab Examples: Convert RGB values to CIE LCH color space. Since: 5.2.3 See also: al_color_lch, al_color_lch_to_rgb Examples: Return an ALLEGRO_COLOR
│ │ │ │ structure from CIE LCH values. LCH colors are very similar to HSL, with
│ │ │ │ the same meaning of L and H and C corresponding to S. However LCH is
│ │ │ │ more visually uniform. Furthermore, this function expects the angle for
│ │ │ │ @@ -770,30 +811,34 @@
│ │ │ │ Examples: Convert CIE LCH color values to RGB color space. Since: 5.2.3 See also: al_color_lch, al_color_rgb_to_lch Examples: This function computes the CIEDE2000 color difference between two RGB
│ │ │ │ colors. This is a visually uniform color difference, unlike for example
│ │ │ │ the RGB distance. When using the RGB distance (Euklidean distance between two RGB
│ │ │ │ @@ -816,28 +861,30 @@
│ │ │ │ Examples: Convert RGB values to YUV color space. See also: al_color_yuv, al_color_yuv_to_rgb Examples: Return an ALLEGRO_COLOR
│ │ │ │ structure from YUV values. See also: al_color_yuv_to_rgb, Examples: Convert YUV color values to RGB color space. See also: al_color_yuv, al_color_rgb_to_yuv Examples: Returns the (compiled) version of the addon, in the same format as al_get_allegro_version. Checks if all components of the color are between 0 and 1. Some of
│ │ │ │ the color conversions in this addon support color spaces with more
│ │ │ │ colors than can be represented in sRGB and when converted to RGB will
│ │ │ │ result in invalid color components outside the 0..1 range. Since: 5.2.3 Convert RGB values to the Oklab color space. Since: 5.2.8 See also: al_color_oklab, al_color_oklab_to_rgb Examples: Return an ALLEGRO_COLOR
│ │ │ │ structure from Oklab values. The L component corresponds to luminance
│ │ │ │ from 0..1. The a and b components are in the range -1..+1. Examples: Convert Oklab color values to RGB. Since: 5.2.8 See also: al_color_oklab, al_color_rgb_to_oklab Convert gamma corrected sRGB values (i.e. normal RGB) to linear sRGB
│ │ │ │ space. Since: 5.2.8 See also: al_color_linear,
│ │ │ │ @@ -938,15 +995,16 @@
│ │ │ │ href="color.html#al_color_linear_to_rgb">al_color_linear_to_rgbal_color_rgb_to_name
│ │ │ │ -char const *al_color_rgb_to_name(float r, float g, float b)
char const *al_color_rgb_to_name(float r, float g, float b)
│ │ │ │ +char const *al_color_rgb_to_name(float r, float g, float b)
│ │ │ │
│ │ │ │ al_color_rgb_to_xyz
│ │ │ │ void al_color_rgb_to_xyz(float red, float green, float blue,
│ │ │ │ -float *x, float *y, float *z)
al_color_xyz
│ │ │ │ -(float x, float y, float z) ALLEGRO_COLOR al_color_xyz
(float x, float y, float z)
│ │ │ │ + ALLEGRO_COLOR al_color_xyz(float x, float y, float z) ALLEGRO_COLOR al_color_xyz
al_color_xyz_to_rgb
│ │ │ │ void al_color_xyz_to_rgb(float x, float y, float z,
│ │ │ │ -float *red, float *green, float *blue)
al_color_rgb_to_xyy
│ │ │ │ void al_color_rgb_to_xyy(float red, float green, float blue,
│ │ │ │ -float *x, float *y, float *y2)
al_color_xyy
│ │ │ │ -(float x, float y, float y2) ALLEGRO_COLOR al_color_xyy
(float x, float y, float y2)
│ │ │ │ + ALLEGRO_COLOR al_color_xyy(float x, float y, float y2) ALLEGRO_COLOR al_color_xyy
al_color_xyy_to_rgb
│ │ │ │ void al_color_xyy_to_rgb(float x, float y, float y2,
│ │ │ │ -float *red, float *green, float *blue)
al_color_rgb_to_lab
│ │ │ │ void al_color_rgb_to_lab(float red, float green, float blue,
│ │ │ │ -float *l, float *a, float *b)
│ │ │ │
│ │ │ │ al_color_lab
│ │ │ │ -(float l, float a, float b) ALLEGRO_COLOR al_color_lab
(float l, float a, float b)
│ │ │ │ + ALLEGRO_COLOR al_color_lab(float l, float a, float b) ALLEGRO_COLOR al_color_lab
al_color_lab_to_rgb
│ │ │ │ void al_color_lab_to_rgb(float l, float a, float b,
│ │ │ │ -float *red, float *green, float *blue)
│ │ │ │
│ │ │ │ al_color_rgb_to_lch
│ │ │ │ void al_color_rgb_to_lch(float red, float green, float blue,
│ │ │ │ -float *l, float *c, float *h)
│ │ │ │
│ │ │ │ al_color_lch
│ │ │ │ -(float l, float c, float h) ALLEGRO_COLOR al_color_lch
(float l, float c, float h)
│ │ │ │ + ALLEGRO_COLOR al_color_lch(float l, float c, float h) ALLEGRO_COLOR al_color_lch
│ │ │ │
│ │ │ │ al_color_lch_to_rgb
│ │ │ │ void al_color_lch_to_rgb(float l, float c, float h,
│ │ │ │ -float *red, float *green, float *blue)
│ │ │ │
│ │ │ │ al_color_distance_ciede2000
│ │ │ │ double al_color_distance_ciede2000(ALLEGRO_COLOR color1,
│ │ │ │ -) { ALLEGRO_COLOR color2
│ │ │ │
│ │ │ │ al_color_rgb_to_yuv
│ │ │ │ void al_color_rgb_to_yuv(float red, float green, float blue,
│ │ │ │ -float *y, float *u, float *v)
│ │ │ │
│ │ │ │ al_color_yuv
│ │ │ │ -(float y, float u, float v) ALLEGRO_COLOR al_color_yuv
(float y, float u, float v)
│ │ │ │ + ALLEGRO_COLOR al_color_yuv(float y, float u, float v) ALLEGRO_COLOR al_color_yuv
│ │ │ │
│ │ │ │ al_color_yuv_to_rgb
│ │ │ │ void al_color_yuv_to_rgb(float y, float u, float v,
│ │ │ │ -float *red, float *green, float *blue)
│ │ │ │
│ │ │ │ al_get_allegro_color_version
│ │ │ │ -uint32_t al_get_allegro_color_version(void)
uint32_t al_get_allegro_color_version(void)
│ │ │ │ +uint32_t al_get_allegro_color_version(void)
al_is_color_valid
│ │ │ │
│ │ │ │ al_color_rgb_to_oklab
│ │ │ │ void al_color_rgb_to_oklab(float red, float green, float blue,
│ │ │ │ -float *ol, float *oa, float *ob)
│ │ │ │
│ │ │ │ al_color_oklab
│ │ │ │ -(float l, float a, float b) ALLEGRO_COLOR al_color_oklab
(float l, float a, float b)
│ │ │ │ + ALLEGRO_COLOR al_color_oklab(float l, float a, float b) ALLEGRO_COLOR al_color_oklab
│ │ │ │ @@ -912,25 +965,29 @@
│ │ │ │
│ │ │ │
│ │ │ │ al_color_oklab_to_rgb
│ │ │ │ void al_color_oklab_to_rgb(float ol, float oa, float ob,
│ │ │ │ -float *red, float *green, float *blue)
al_color_rgb_to_linear
│ │ │ │ void al_color_rgb_to_linear(float red, float green, float blue,
│ │ │ │ -float *r, float *g, float *b)
Examples:
│ │ │ │(float r, float g, float b) ALLEGRO_COLOR al_color_linear
(float r, float g, float b)
│ │ │ │ + ALLEGRO_COLOR al_color_linear(float r, float g, float b) ALLEGRO_COLOR al_color_linear
Return an ALLEGRO_COLOR │ │ │ │ structure from linear sRGB values. Allegro RGB values are assumed to be │ │ │ │ sRGB. The sRGB standard is in wide use by various display devices. It │ │ │ │ accounts for a standard gamma correction applied to RGB colors before │ │ │ │ @@ -970,15 +1028,17 @@ │ │ │ │
Examples:
│ │ │ │void al_color_linear_to_rgb(float r, float g, float b,
│ │ │ │ -float *red, float *green, float *blue)
Convert linear sRGB color values to gamma corrected (i.e. normal) RGB │ │ │ │ values.
│ │ │ │Since: 5.2.8
│ │ │ │See also: [al_color_linera],
│ │ │ │ An abstract configuration structure. Examples: An opaque structure used for iterating across sections in a
│ │ │ │ configuration structure. See also: al_get_first_config_section,
│ │ │ │ @@ -284,15 +286,16 @@
│ │ │ │ href="config.html#al_get_next_config_section">al_get_next_config_section* cfg = al_load_config_file("test.cfg");
│ │ │ │ ALLEGRO_CONFIG("%s\n", al_get_config_value(cfg, "", "monster name")); /* Prints: Allegro Developer */
│ │ │ │ printf("%s\n", al_get_config_value(cfg, "weapon 0", "damage")); /* Prints: 443 */
│ │ │ │ printf("%s\n", al_get_config_value(cfg, "weapon 1", "damage")); /* Prints: 503 */
│ │ │ │ printf(cfg); al_destroy_config
ALLEGRO_CONFIG
│ │ │ │ -typedef struct ALLEGRO_CONFIG ALLEGRO_CONFIG;
typedef struct ALLEGRO_CONFIG ALLEGRO_CONFIG;
│ │ │ │ +typedef struct ALLEGRO_CONFIG ALLEGRO_CONFIG;
│ │ │ │
│ │ │ │ ALLEGRO_CONFIG_SECTION
│ │ │ │ -typedef struct ALLEGRO_CONFIG_SECTION ALLEGRO_CONFIG_SECTION;
typedef struct ALLEGRO_CONFIG_SECTION ALLEGRO_CONFIG_SECTION;
│ │ │ │ +typedef struct ALLEGRO_CONFIG_SECTION ALLEGRO_CONFIG_SECTION;
Examples:
│ │ │ │typedef struct ALLEGRO_CONFIG_ENTRY ALLEGRO_CONFIG_ENTRY;
typedef struct ALLEGRO_CONFIG_ENTRY ALLEGRO_CONFIG_ENTRY;
│ │ │ │ +typedef struct ALLEGRO_CONFIG_ENTRY ALLEGRO_CONFIG_ENTRY;
An opaque structure used for iterating across entries in a │ │ │ │ configuration section.
│ │ │ │See also: al_get_first_config_entry, │ │ │ │ @@ -587,14 +590,11 @@ │ │ │ │ href="https://github.com/liballeg/allegro5/blob/master/src/config.c#L515">Source │ │ │ │ Code
│ │ │ │Merge one configuration structure into another. Values in │ │ │ │ configuration ‘add’ override those in ‘master’. ‘master’ is modified. │ │ │ │ Comments from ‘add’ are not retained.
│ │ │ │See also: al_merge_config
│ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │