--- /srv/reproducible-results/rbuild-debian/r-b-build.wlBdFjxb/b1/allegro5_5.2.10.1+dfsg-1_amd64.changes
+++ /srv/reproducible-results/rbuild-debian/r-b-build.wlBdFjxb/b2/allegro5_5.2.10.1+dfsg-1_amd64.changes
├── Files
│ @@ -1,9 +1,9 @@
│
│ - 2b0876728d33c88d6dd931245e563b8c 1393852 doc optional allegro5-doc_5.2.10.1+dfsg-1_all.deb
│ + 4cbe387bf93eac00a696df4df515425f 1400552 doc optional allegro5-doc_5.2.10.1+dfsg-1_all.deb
│ 0d0f0e36c802263571c8a4a4d37986e6 19388 libdevel optional liballegro-acodec5-dev_5.2.10.1+dfsg-1_amd64.deb
│ 8d1e648c9bc4c82c916d2525be28be63 62524 debug optional liballegro-acodec5.2t64-dbgsym_5.2.10.1+dfsg-1_amd64.deb
│ d50d79d7644b1e9c093151f9e7f460f5 38260 libs optional liballegro-acodec5.2t64_5.2.10.1+dfsg-1_amd64.deb
│ 88c48ff68fbc70f244e6289381910e53 22164 libdevel optional liballegro-audio5-dev_5.2.10.1+dfsg-1_amd64.deb
│ 6510c1199bcb789a150f21f20a92d24c 110092 debug optional liballegro-audio5.2t64-dbgsym_5.2.10.1+dfsg-1_amd64.deb
│ 09e68b97528964626a7f9fd05d8e9b9b 61768 libs optional liballegro-audio5.2t64_5.2.10.1+dfsg-1_amd64.deb
│ 1392e795640f5aea611fc0be61a01f49 20432 libdevel optional liballegro-dialog5-dev_5.2.10.1+dfsg-1_amd64.deb
│ @@ -17,10 +17,10 @@
│ 1399e259e49d926a90ec19b73119cb5c 23612 libs optional liballegro-physfs5.2t64_5.2.10.1+dfsg-1_amd64.deb
│ da9f68d4e67494231657f1fe069ad829 19488 libdevel optional liballegro-ttf5-dev_5.2.10.1+dfsg-1_amd64.deb
│ 0b3e406b09b165e0e1094460d0646a2d 32212 debug optional liballegro-ttf5.2t64-dbgsym_5.2.10.1+dfsg-1_amd64.deb
│ 57da52b6a5515644c87552968ad4687d 28924 libs optional liballegro-ttf5.2t64_5.2.10.1+dfsg-1_amd64.deb
│ 69c5613595a2d5ef9e3f8db6ae2395b6 19768 libdevel optional liballegro-video5-dev_5.2.10.1+dfsg-1_amd64.deb
│ d92d7f58303a1dea788385c82e05a8c9 39632 debug optional liballegro-video5.2t64-dbgsym_5.2.10.1+dfsg-1_amd64.deb
│ ae0881f2a421de07bd741312c4544b0d 32828 libs optional liballegro-video5.2t64_5.2.10.1+dfsg-1_amd64.deb
│ - 0c66871380d3de3b82916dcdf4dc4aaa 117028 libdevel optional liballegro5-dev_5.2.10.1+dfsg-1_amd64.deb
│ + 539c5b7b4d3254281f7ffdddf394ff97 117028 libdevel optional liballegro5-dev_5.2.10.1+dfsg-1_amd64.deb
│ 1662b82e9a21e1fb38f59df73d8a5675 1305612 debug optional liballegro5.2t64-dbgsym_5.2.10.1+dfsg-1_amd64.deb
│ f00abcde8884d9fee54cc064f12fde02 437344 libs optional liballegro5.2t64_5.2.10.1+dfsg-1_amd64.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 1362004 2025-01-09 13:52:42.000000 data.tar.xz
│ │ +-rw-r--r-- 0 0 0 31644 2025-01-09 13:52:42.000000 control.tar.xz
│ │ +-rw-r--r-- 0 0 0 1368716 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
.voc file streaming is unimplemented.
Return true on success.
│ │ │ │ +Examples:
│ │ │ │ +bool al_is_acodec_addon_initialized(void)
Returns true if the acodec addon is initialized, otherwise returns │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -64,14 +64,18 @@ │ │ │ │ │ * Module files (.it, .mod, .s3m, .xm) are often composed with streaming in │ │ │ │ │ mind, and sometimes cannot be easily rendered into a finite length │ │ │ │ │ sample. Therefore they cannot be loaded with _a_l___l_o_a_d___s_a_m_p_l_e/ │ │ │ │ │ _a_l___l_o_a_d___s_a_m_p_l_e___f and must be streamed with _a_l___l_o_a_d___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___f. │ │ │ │ │ * .voc file streaming is unimplemented. │ │ │ │ │ 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) │ │ │ │ │ _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) │ │ │ ├── ./usr/share/doc/allegro5-doc/refman/audio.html │ │ │ │ @@ -564,14 +564,19 @@ │ │ │ │ Code
│ │ │ │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 │ │ │ │ ALLEGRO_SAMPLE_INSTANCE can be extracted using al_lock_sample_id.
│ │ │ │ +Examples:
│ │ │ │ +bool al_install_audio(void)
Install the audio subsystem.
│ │ │ │Returns true on success, false on failure.
│ │ │ │ @@ -582,22 +587,40 @@ │ │ │ │ this. │ │ │ │ │ │ │ │See also: al_reserve_samples, al_uninstall_audio, al_is_audio_installed, al_init_acodec_addon
│ │ │ │ +Examples:
│ │ │ │ +void al_uninstall_audio(void)
Uninstalls the audio subsystem.
│ │ │ │See also: al_install_audio
│ │ │ │ +Examples:
│ │ │ │ +bool al_is_audio_installed(void)
Returns true if al_install_audio was called │ │ │ │ @@ -624,14 +647,23 @@ │ │ │ │ sample instance N │ │ │ │
Returns true on success, false on error. al_install_audio must have been │ │ │ │ called first.
│ │ │ │See also: al_set_default_mixer, al_play_sample
│ │ │ │ +Examples:
│ │ │ │ +bool al_play_sample(ALLEGRO_SAMPLE *spl, float gain, float pan, float speed,
│ │ │ │ , ALLEGRO_SAMPLE_ID *ret_id) ALLEGRO_PLAYMODE loop
Plays a sample on one of the sample instances created by See also: al_load_sample, ALLEGRO_PLAYMODE, ALLEGRO_AUDIO_PAN_NONE, ALLEGRO_SAMPLE_ID, al_stop_sample, al_stop_samples, al_lock_sample_id.
│ │ │ │ +Examples:
│ │ │ │ +void al_stop_sample(ALLEGRO_SAMPLE_ID *spl_id)
Stop the sample started by al_play_sample.
│ │ │ │See also: al_stop_samples
│ │ │ │ +Examples:
│ │ │ │ +void al_stop_samples(void)
Stop all samples started by al_play_sample.
│ │ │ │See also: al_stop_sample
│ │ │ │ +Examples:
│ │ │ │ +* al_lock_sample_id(ALLEGRO_SAMPLE_ID *spl_id) ALLEGRO_SAMPLE_INSTANCE
Locks a ALLEGRO_SAMPLE_ID, │ │ │ │ returning the underlying See also: al_play_sample, al_unlock_sample_id
│ │ │ │Since: 5.2.3
│ │ │ ││ │ │ ││ │ │ │ +Unstable │ │ │ │ API: New API.
│ │ │ │
Examples:
│ │ │ │ +void al_unlock_sample_id(ALLEGRO_SAMPLE_ID *spl_id)
Unlocks a ALLEGRO_SAMPLE_ID, allowing │ │ │ │ @@ -720,14 +780,19 @@ │ │ │ │
See also: al_play_sample, al_lock_sample_id
│ │ │ │Since: 5.2.3
│ │ │ ││ │ │ ││ │ │ │ +Unstable │ │ │ │ API: New API.
│ │ │ │
Examples:
│ │ │ │ +*al_play_audio_stream(const char *filename) ALLEGRO_AUDIO_STREAM
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 │ │ │ │ @@ -747,14 +812,19 @@ │ │ │ │ href="audio.html#al_play_audio_stream_f">al_play_audio_stream_f, al_load_audio_stream
│ │ │ │Since: 5.2.8
│ │ │ ││ │ │ ││ │ │ │ +Unstable │ │ │ │ API: New API.
│ │ │ │
Examples:
│ │ │ │ +*al_play_audio_stream_f(ALLEGRO_FILE *fp, const char *ident) ALLEGRO_AUDIO_STREAM
Loads and plays an audio file from ALLEGRO_FILE stream, streaming it is │ │ │ │ @@ -792,14 +862,23 @@ │ │ │ │
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: ALLEGRO_SAMPLE_INSTANCE
│ │ │ │ +Examples:
│ │ │ │ +*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
See also: al_destroy_sample, ALLEGRO_AUDIO_DEPTH, ALLEGRO_CHANNEL_CONF
│ │ │ │ +Examples:
│ │ │ │ +*al_load_sample(const char *filename) ALLEGRO_SAMPLE
Loads a few different audio file formats based on their │ │ │ │ extension.
│ │ │ │ @@ -843,14 +931,23 @@ │ │ │ │Note: 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: al_register_sample_loader, │ │ │ │ al_init_acodec_addon
│ │ │ │ +Examples:
│ │ │ │ +*al_load_sample_f(ALLEGRO_FILE* fp, const char *ident) ALLEGRO_SAMPLE
Loads an audio file from an ALLEGRO_FILE stream into an This function will stop any sample instances which may be playing the │ │ │ │ buffer referenced by the ALLEGRO_SAMPLE.
│ │ │ │See also: al_destroy_sample_instance, │ │ │ │ al_stop_sample, al_stop_samples
│ │ │ │ +Examples:
│ │ │ │ +(const ALLEGRO_SAMPLE *spl) ALLEGRO_CHANNEL_CONF al_get_sample_channels
Return the channel configuration of the sample.
│ │ │ │ │ │ │ │Return a pointer to the raw sample data.
│ │ │ │See also: al_get_sample_channels, al_get_sample_depth, al_get_sample_frequency, │ │ │ │ al_get_sample_length
│ │ │ │ +Examples:
│ │ │ │ +For more fine-grained control over audio output, here’s a short │ │ │ │ description of the basic concepts:
│ │ │ │Voices represent audio devices on the system. Basically, every audio │ │ │ │ output chain that you want to be heard needs to end up in a voice. As │ │ │ │ voices are on the hardware/driver side of things, there is only limited │ │ │ │ control over their parameters (frequency, sample format, channel │ │ │ │ @@ -1085,126 +1196,212 @@ │ │ │ │ instances may be created from the same ALLEGRO_SAMPLE. An ALLEGRO_SAMPLE │ │ │ │ must not be destroyed while there are instances which reference it.
│ │ │ │To actually produce audio output, an ALLEGRO_SAMPLE_INSTANCE must be │ │ │ │ attached to an ALLEGRO_MIXER │ │ │ │ which eventually reaches an ALLEGRO_VOICE object.
│ │ │ │See also: ALLEGRO_SAMPLE
│ │ │ │ +Examples:
│ │ │ │ +*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 │ │ │ │ al_set_sample.
│ │ │ │See also: al_destroy_sample_instance
│ │ │ │ +Examples:
│ │ │ │ +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: al_create_sample_instance
│ │ │ │ +Examples:
│ │ │ │ +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
│ │ │ │ +Examples:
│ │ │ │ +bool al_stop_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl)
Stop an sample instance playing.
│ │ │ │See also: al_play_sample_instance
│ │ │ │ +Examples:
│ │ │ │ +(
│ │ │ │ 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.
│ │ │ │ +Examples:
│ │ │ │ +(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)
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)
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, │ │ │ │ al_get_sample_instance_time
│ │ │ │ +Examples:
│ │ │ │ +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 │ │ │ │ instance is currently playing.
│ │ │ │See also: al_get_sample_instance_length
│ │ │ │ +Examples:
│ │ │ │ +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
│ │ │ │ +Examples:
│ │ │ │ +float al_get_sample_instance_speed(const ALLEGRO_SAMPLE_INSTANCE *spl)
Return the relative playback speed of the sample instance.
│ │ │ │ │ │ │ │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: al_get_sample_instance_speed
│ │ │ │ +Examples:
│ │ │ │ +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)
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: al_get_sample_instance_gain
│ │ │ │ +Examples:
│ │ │ │ +float al_get_sample_instance_pan(const ALLEGRO_SAMPLE_INSTANCE *spl)
Get the pan value of the sample instance.
│ │ │ │See also:
│ │ │ │ Returns true on success, false on failure. Will fail if the sample
│ │ │ │ instance is attached directly to a voice. See also: al_get_sample_instance_pan,
│ │ │ │ ALLEGRO_AUDIO_PAN_NONE Examples: Return the length of the sample instance in seconds, assuming a
│ │ │ │ playback speed of 1.0. See also: al_get_sample_instance_length Examples: Return the playback mode of the sample instance.
│ │ │ │ +
│ │ │ │ al_get_sample_instance_time
│ │ │ │ float al_get_sample_instance_time(const ALLEGRO_SAMPLE_INSTANCE *spl)
│ │ │ │ +
│ │ │ │ al_get_sample_instance_playmode
│ │ │ │ (const ALLEGRO_SAMPLE_INSTANCE *spl) ALLEGRO_PLAYMODE al_get_sample_instance_playmode
Set the playback mode of the sample instance.
│ │ │ │Returns true on success, false on failure.
│ │ │ │See also: ALLEGRO_PLAYMODE, │ │ │ │ al_get_sample_instance_playmode
│ │ │ │ +Examples:
│ │ │ │ +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)
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: al_get_sample_instance_playing
│ │ │ │ +Examples:
│ │ │ │ +bool al_get_sample_instance_attached(const ALLEGRO_SAMPLE_INSTANCE *spl)
Return whether the sample instance is attached to something.
│ │ │ │ @@ -1343,14 +1598,19 @@ │ │ │ │Returns true on success.
│ │ │ │See also: al_attach_sample_instance_to_mixer, │ │ │ │ al_attach_sample_instance_to_voice, │ │ │ │ al_get_sample_instance_attached
│ │ │ │ +Examples:
│ │ │ │ +*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 │ │ │ │ @@ -1358,14 +1618,23 @@ │ │ │ │ have passed to al_set_sample. │ │ │ │ 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 al_create_sample). You can use al_get_sample_data on the │ │ │ │ return value to retrieve and compare it.
│ │ │ │See also: al_set_sample
│ │ │ │ +Examples:
│ │ │ │ +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.
│ │ │ │ @@ -1378,14 +1647,23 @@ │ │ │ │ Reattaching may not always succeed. │ │ │ │On success, the sample remains stopped. The playback position and │ │ │ │ loop end points are reset to their default values. The loop mode remains │ │ │ │ unchanged.
│ │ │ │Returns true on success, false on failure. On failure, the sample │ │ │ │ will be stopped and detached from its parent.
│ │ │ │See also: al_get_sample
│ │ │ │ +Examples:
│ │ │ │ +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 │ │ │ │ @@ -1411,14 +1689,19 @@ │ │ │ │
Returns true on success, false on failure (e.g. if this is not │ │ │ │ attached to a mixer).
│ │ │ │Since: 5.2.3
│ │ │ ││ │ │ ││ │ │ │ +Unstable │ │ │ │ API: New API.
│ │ │ │
Examples:
│ │ │ │ +typedef struct ALLEGRO_AUDIO_STREAM ALLEGRO_AUDIO_STREAM;
An ALLEGRO_AUDIO_STREAM object is used to stream generated audio to │ │ │ │ @@ -1467,14 +1750,23 @@ │ │ │ │ } │ │ │ │
If the stream is created by al_load_audio_stream or al_play_audio_stream then it │ │ │ │ will also generate an ALLEGRO_EVENT_AUDIO_STREAM_FINISHED │ │ │ │ event if it reaches the end of the file and is not set to loop.
│ │ │ │ +Examples:
│ │ │ │ +*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
│ │ │ ││ │ │ │ +Note: Unlike many Allegro objects, audio streams are not │ │ │ │ implicitly destroyed when Allegro is shut down. You must destroy them │ │ │ │ manually with al_destroy_audio_stream │ │ │ │ before the audio system is shut down.
│ │ │ │
Examples:
│ │ │ │ +*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.
│ │ │ │ @@ -1548,14 +1849,23 @@ │ │ │ │ file formats by default. You must use the allegro_acodec addon, or │ │ │ │ register your own format handler. │ │ │ │ │ │ │ │See also: al_load_audio_stream_f, al_register_audio_stream_loader, │ │ │ │ al_init_acodec_addon
│ │ │ │ +Examples:
│ │ │ │ +*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
│ │ │ │ Note: If the stream is still attached to a mixer or voice,
│ │ │ │ al_detach_audio_stream
│ │ │ │ is automatically called on it first. See also: al_drain_audio_stream. Examples: Retrieve the associated event source. See al_get_audio_stream_fragment
│ │ │ │ for a description of the ALLEGRO_EVENT_AUDIO_STREAM_FRAGMENT
│ │ │ │ event that audio streams emit. Examples: 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: al_destroy_audio_stream Examples: 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, al_load_audio_stream_f or
│ │ │ │ al_play_audio_stream_f. Examples: Return the stream frequency (in Hz).
│ │ │ │ +
│ │ │ │ al_get_audio_stream_event_source
│ │ │ │ *al_get_audio_stream_event_source(
│ │ │ │ ALLEGRO_EVENT_SOURCE *stream) ALLEGRO_AUDIO_STREAM
│ │ │ │ +
│ │ │ │ al_drain_audio_stream
│ │ │ │ void al_drain_audio_stream(ALLEGRO_AUDIO_STREAM *stream)
│ │ │ │ +
│ │ │ │ al_rewind_audio_stream
│ │ │ │ bool al_rewind_audio_stream(ALLEGRO_AUDIO_STREAM *stream)
│ │ │ │ +
│ │ │ │ al_get_audio_stream_frequency
│ │ │ │ unsigned int al_get_audio_stream_frequency(const ALLEGRO_AUDIO_STREAM *stream)
unsigned int al_get_audio_stream_length(const ALLEGRO_AUDIO_STREAM *stream)
Return the stream length in samples.
│ │ │ │ +Examples:
│ │ │ │ +float al_get_audio_stream_speed(const ALLEGRO_AUDIO_STREAM *stream)
Return the relative playback speed of the stream.
│ │ │ │See also: Return the playback gain of the stream. See also: al_set_audio_stream_gain. Examples: 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: al_get_audio_stream_gain. Examples: Get the pan value of the stream. See also:
│ │ │ │ Returns true on success, false on failure. Will fail if the audio
│ │ │ │ stream is attached directly to a voice. See also: al_get_audio_stream_pan,
│ │ │ │ ALLEGRO_AUDIO_PAN_NONE Examples: Return true if the stream is playing. See also: al_set_audio_stream_playing. Examples: Change whether the stream is playing. Returns true on success, false on failure. See also: al_get_audio_stream_playing Examples: Return the playback mode of the stream. Set the playback mode of the stream. Returns true on success, false on failure. See also: ALLEGRO_PLAYMODE,
│ │ │ │ al_get_audio_stream_playmode. Examples: Return whether the stream is attached to something. See also: Detach the stream from whatever it’s attached to, if anything. See also: al_attach_audio_stream_to_mixer,
│ │ │ │ al_attach_audio_stream_to_voice,
│ │ │ │ al_get_audio_stream_attached. Examples: Get the number of samples consumed by the parent since the audio
│ │ │ │ @@ -1830,25 +2226,43 @@
│ │ │ │ href="audio.html#al_get_audio_stream_frequency">al_get_audio_stream_frequency
│ │ │ │
│ │ │ │ float al_get_audio_stream_gain(const ALLEGRO_AUDIO_STREAM *stream)
│ │ │ │ +
│ │ │ │ al_set_audio_stream_gain
│ │ │ │ bool al_set_audio_stream_gain(ALLEGRO_AUDIO_STREAM *stream, float val)
│ │ │ │ +
│ │ │ │ al_get_audio_stream_pan
│ │ │ │ float al_get_audio_stream_pan(const ALLEGRO_AUDIO_STREAM *stream)
│ │ │ │ +
│ │ │ │ al_get_audio_stream_playing
│ │ │ │ bool al_get_audio_stream_playing(const ALLEGRO_AUDIO_STREAM *stream)
│ │ │ │ +
│ │ │ │ al_set_audio_stream_playing
│ │ │ │ bool al_set_audio_stream_playing(ALLEGRO_AUDIO_STREAM *stream, bool val)
│ │ │ │ +
│ │ │ │ al_get_audio_stream_playmode
│ │ │ │ (
│ │ │ │ ALLEGRO_PLAYMODE al_get_audio_stream_playmodeconst ALLEGRO_AUDIO_STREAM *stream)
│ │ │ │ +
│ │ │ │ al_get_audio_stream_attached
│ │ │ │ bool al_get_audio_stream_attached(const ALLEGRO_AUDIO_STREAM *stream)
│ │ │ │ +
│ │ │ │ al_get_audio_stream_played_samples
│ │ │ │ uint64_t al_get_audio_stream_played_samples(const ALLEGRO_AUDIO_STREAM *stream)
Examples:
│ │ │ │ +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 val
) is filled
│ │ │ │ with new data.
See also: al_get_audio_stream_fragment
│ │ │ │ +Examples:
│ │ │ │ +unsigned int al_get_audio_stream_fragments(const ALLEGRO_AUDIO_STREAM *stream)
Returns the number of fragments this stream uses. This is the same │ │ │ │ @@ -1882,14 +2296,19 @@ │ │ │ │ href="audio.html#al_load_audio_stream_f">al_load_audio_stream_f or │ │ │ │ al_play_audio_stream_f.
│ │ │ │See also: al_get_audio_stream_position_secs, │ │ │ │ al_get_audio_stream_length_secs
│ │ │ │ +Examples:
│ │ │ │ +double al_get_audio_stream_position_secs(ALLEGRO_AUDIO_STREAM *stream)
Return the position of the stream in seconds. Currently this can only │ │ │ │ @@ -1897,14 +2316,19 @@ │ │ │ │ href="audio.html#al_load_audio_stream">al_load_audio_stream, al_play_audio_stream, al_load_audio_stream_f or │ │ │ │ al_play_audio_stream_f.
│ │ │ │See also: al_get_audio_stream_length_secs
│ │ │ │ +Examples:
│ │ │ │ +double al_get_audio_stream_length_secs(ALLEGRO_AUDIO_STREAM *stream)
Return the length of the stream in seconds, if known. Otherwise │ │ │ │ @@ -1913,28 +2337,38 @@ │ │ │ │ href="audio.html#al_load_audio_stream">al_load_audio_stream, al_play_audio_stream, al_load_audio_stream_f or │ │ │ │ al_play_audio_stream_f.
│ │ │ │See also: al_get_audio_stream_position_secs
│ │ │ │ +Examples:
│ │ │ │ +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, al_load_audio_stream_f or │ │ │ │ al_play_audio_stream_f.
│ │ │ │ +Examples:
│ │ │ │ +Like al_set_sample_instance_channel_matrix │ │ │ │ but for streams.
│ │ │ │Since: 5.2.3
│ │ │ │ @@ -2145,14 +2579,21 @@ │ │ │ │ Code │ │ │ │An opaque datatype that represents a recording device.
│ │ │ │Since: 5.1.1
│ │ │ ││ │ │ ││ │ │ │ +Unstable │ │ │ │ API: The API may need a slight redesign.
│ │ │ │
Examples:
│ │ │ │ +typedef struct ALLEGRO_AUDIO_RECORDER_EVENT ALLEGRO_AUDIO_RECORDER_EVENT;
Structure that holds the audio recorder event data. Every event type │ │ │ │ @@ -2168,14 +2609,21 @@ │ │ │ │
Since 5.1.1
│ │ │ │See also: al_get_audio_recorder_event
│ │ │ ││ │ │ ││ │ │ │ +Unstable │ │ │ │ API: The API may need a slight redesign.
│ │ │ │
Examples:
│ │ │ │ +*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
On failure, returns NULL.
│ │ │ │Since: 5.1.1
│ │ │ ││ │ │ ││ │ │ │ +Unstable │ │ │ │ API: The API may need a slight redesign.
│ │ │ │
Examples:
│ │ │ │ +bool al_start_audio_recorder(ALLEGRO_AUDIO_RECORDER *r)
Begin recording into the fragment buffer. Once a complete fragment │ │ │ │ @@ -2226,14 +2681,21 @@ │ │ │ │ event will be triggered.
│ │ │ │Returns true if it was able to begin recording.
│ │ │ │Since: 5.1.1
│ │ │ ││ │ │ ││ │ │ │ +Unstable │ │ │ │ API: The API may need a slight redesign.
│ │ │ │
Examples:
│ │ │ │ +void al_stop_audio_recorder(ALLEGRO_AUDIO_RECORDER *r)
Stop capturing audio data. Note that the audio recorder is still │ │ │ │ @@ -2272,28 +2734,42 @@ │ │ │ │
Returns the event as an ALLEGRO_AUDIO_RECORDER_EVENT.
│ │ │ │Since: 5.1.1
│ │ │ ││ │ │ ││ │ │ │ +Unstable │ │ │ │ API: The API may need a slight redesign.
│ │ │ │
Examples:
│ │ │ │ +*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
│ │ │ ││ │ │ ││ │ │ │ +Unstable │ │ │ │ API: The API may need a slight redesign.
│ │ │ │
Examples:
│ │ │ │ +void al_destroy_audio_recorder(ALLEGRO_AUDIO_RECORDER *r)
Destroys the audio recorder and frees all resources associated with │ │ │ │ @@ -2301,62 +2777,98 @@ │ │ │ │
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
│ │ │ ││ │ │ ││ │ │ │ +Unstable │ │ │ │ API: The API may need a slight redesign.
│ │ │ │
Examples:
│ │ │ │ +typedef struct ALLEGRO_AUDIO_DEVICE ALLEGRO_AUDIO_DEVICE;
An opaque datatype that represents an audio device.
│ │ │ │ +Examples:
│ │ │ │ +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:
│ │ │ │ +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:
│ │ │ │ +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:
│ │ │ │ +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.
│ │ │ │See also: ALLEGRO_MIXER, ALLEGRO_SAMPLE, ALLEGRO_AUDIO_STREAM
│ │ │ │ +Examples:
│ │ │ │ +*al_create_voice(unsigned int freq,
│ │ │ │ ALLEGRO_VOICE , ALLEGRO_CHANNEL_CONF chan_conf) ALLEGRO_AUDIO_DEPTH depth
Reasonable default arguments are:
│ │ │ │(44100, ALLEGRO_AUDIO_DEPTH_INT16, ALLEGRO_CHANNEL_CONF_2) al_create_voice
See also: al_destroy_voice
│ │ │ │ +Examples:
│ │ │ │ +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
│ │ │ │ +Examples:
│ │ │ │ +void al_detach_voice(ALLEGRO_VOICE *voice)
Detaches the mixer, sample instance or audio stream from the │ │ │ │ @@ -2417,26 +2947,42 @@ │ │ │ │ The stream position, speed, gain and panning cannot be changed. At this │ │ │ │ time, we don’t recommend attaching audio streams directly to voices. Use │ │ │ │ a mixer inbetween.
│ │ │ │Returns true on success, false on failure.
│ │ │ │See also: al_detach_voice, │ │ │ │ al_voice_has_attachments
│ │ │ │ +Examples:
│ │ │ │ +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, │ │ │ │ al_voice_has_attachments
│ │ │ │ +Examples:
│ │ │ │ +bool al_attach_sample_instance_to_voice(ALLEGRO_SAMPLE_INSTANCE *spl,
│ │ │ │ *voice) ALLEGRO_VOICE
Source │ │ │ │ @@ -2448,14 +2994,21 @@ │ │ │ │ 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: al_detach_voice, │ │ │ │ al_voice_has_attachments
│ │ │ │ +Examples:
│ │ │ │ +unsigned int al_get_voice_frequency(const ALLEGRO_VOICE *voice)
Return the frequency of the voice (in Hz), e.g. 44100.
│ │ │ │ @@ -2482,26 +3035,36 @@ │ │ │ │ class="sourceCode c">bool al_get_voice_playing(const ALLEGRO_VOICE *voice)
│ │ │ │
│ │ │ │ Return true if the voice is currently playing.
│ │ │ │See also: al_set_voice_playing
│ │ │ │ +Examples:
│ │ │ │ +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.
│ │ │ │See also: al_get_voice_playing
│ │ │ │ +Examples:
│ │ │ │ +unsigned int al_get_voice_position(const ALLEGRO_VOICE *voice)
When the voice has a non-streaming object attached to it, e.g. a │ │ │ │ @@ -2547,14 +3110,23 @@ │ │ │ │ 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 reduces the volume of the left and right
│ │ │ │ channels by sqrt(2)
before adding them to the center
│ │ │ │ channel (if present).
Examples:
│ │ │ │ +enum ALLEGRO_MIXER_QUALITY
Reasonable default arguments are:
│ │ │ │(44100, ALLEGRO_AUDIO_DEPTH_FLOAT32, ALLEGRO_CHANNEL_CONF_2) al_create_mixer
Returns true on success, false on error.
│ │ │ │See also: al_destroy_mixer, │ │ │ │ ALLEGRO_AUDIO_DEPTH, ALLEGRO_CHANNEL_CONF
│ │ │ │ +Examples:
│ │ │ │ +void al_destroy_mixer(ALLEGRO_MIXER *mixer)
Destroys the mixer.
│ │ │ │See also: al_create_mixer
│ │ │ │ +Examples:
│ │ │ │ +*al_get_default_mixer(void) ALLEGRO_MIXER
Return the default mixer, or NULL if one has not been set. Although │ │ │ │ @@ -2605,14 +3195,23 @@ │ │ │ │ a single mixer attached to a voice is what you want. The default mixer │ │ │ │ is used by al_play_sample.
│ │ │ │See also: al_reserve_samples, al_play_sample, al_set_default_mixer, al_restore_default_mixer
│ │ │ │ +Examples:
│ │ │ │ +bool al_set_default_mixer(ALLEGRO_MIXER *mixer)
Sets the default mixer. All samples started with
│ │ │ │ Returns true on success, false on error. It is invalid to attach a mixer to itself. See also: al_detach_mixer. Examples: 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: al_detach_sample_instance. Examples: 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: al_detach_audio_stream. Examples: Return the mixer frequency (in Hz). Return the mixer channel configuration. See also: ALLEGRO_CHANNEL_CONF. Examples: Return the mixer audio depth. See also: ALLEGRO_AUDIO_DEPTH. Examples: 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: Set the mixer gain (amplification factor). Returns true on success, false on failure. Since: 5.0.6, 5.1.0 See also: al_get_mixer_gain Examples: Return the mixer quality. Return true if the mixer is playing. See also: al_set_mixer_playing. Examples: Change whether the mixer is playing. Returns true on success, false on failure. See also: al_get_mixer_playing. Examples: Return true if the mixer is attached to something. Detach the mixer from whatever it is attached to, if anything. See also: al_attach_mixer_to_mixer. Examples:
│ │ │ │ Note: The callback is called from a dedicated audio
│ │ │ │ thread. Examples:
│ │ │ │ +
│ │ │ │ al_attach_sample_instance_to_mixer
│ │ │ │ bool al_attach_sample_instance_to_mixer(ALLEGRO_SAMPLE_INSTANCE *spl,
│ │ │ │ *mixer) ALLEGRO_MIXER
│ │ │ │ +
│ │ │ │ al_attach_audio_stream_to_mixer
│ │ │ │ bool al_attach_audio_stream_to_mixer(ALLEGRO_AUDIO_STREAM *stream, ALLEGRO_MIXER *mixer)
│ │ │ │ +
│ │ │ │ al_get_mixer_frequency
│ │ │ │ unsigned int al_get_mixer_frequency(const ALLEGRO_MIXER *mixer)
(const ALLEGRO_MIXER *mixer) ALLEGRO_CHANNEL_CONF al_get_mixer_channels
│ │ │ │
│ │ │ │
│ │ │ │ +
│ │ │ │ al_get_mixer_depth
│ │ │ │ (const ALLEGRO_MIXER *mixer) ALLEGRO_AUDIO_DEPTH al_get_mixer_depth
│ │ │ │ +
│ │ │ │ al_get_mixer_gain
│ │ │ │ float al_get_mixer_gain(const ALLEGRO_MIXER *mixer)
│ │ │ │ +
│ │ │ │ al_set_mixer_gain
│ │ │ │ bool al_set_mixer_gain(ALLEGRO_MIXER *mixer, float new_gain)
│ │ │ │ +
│ │ │ │ al_get_mixer_quality
│ │ │ │ (const ALLEGRO_MIXER *mixer) ALLEGRO_MIXER_QUALITY al_get_mixer_quality
bool al_get_mixer_playing(const ALLEGRO_MIXER *mixer)
│ │ │ │
│ │ │ │
│ │ │ │ +
│ │ │ │ al_set_mixer_playing
│ │ │ │ bool al_set_mixer_playing(ALLEGRO_MIXER *mixer, bool val)
│ │ │ │ +
│ │ │ │ al_get_mixer_attached
│ │ │ │ bool al_get_mixer_attached(const ALLEGRO_MIXER *mixer)
bool al_detach_mixer(ALLEGRO_MIXER *mixer)
│ │ │ │
│ │ │ │
│ │ │ │ +
│ │ │ │ al_set_mixer_postprocess_callback
│ │ │ │ bool al_set_mixer_postprocess_callback(ALLEGRO_MIXER *mixer,
│ │ │ │ void (*pp_callback)(void *buf, unsigned int samples, void *data),
│ │ │ │ void *pp_callback_userdata)
│ │ │ │
│ │ │ │ +
│ │ │ │ +
│ │ │ │ Miscelaneous
│ │ │ │ ALLEGRO_AUDIO_DEPTH
│ │ │ │ enum ALLEGRO_AUDIO_DEPTH
For convenience:
│ │ │ │Examples:
│ │ │ │ +#define ALLEGRO_AUDIO_PAN_NONE (-1000.0f)
A special value for the pan property of sample instances and audio │ │ │ │ @@ -2903,14 +3582,19 @@ │ │ │ │
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:
│ │ │ │ +enum ALLEGRO_CHANNEL_CONF
Speaker configuration (mono, stereo, 2.1, etc).
│ │ │ │ @@ -2919,14 +3603,23 @@ │ │ │ │Examples:
│ │ │ │ +enum ALLEGRO_PLAYMODE
Sample and stream playback mode.
│ │ │ │ @@ -2940,14 +3633,23 @@ │ │ │ │ respects the loop end point. │ │ │ │Examples:
│ │ │ │ +enum ALLEGRO_AUDIO_EVENT_TYPE
Events sent by 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: Return the number of channels for the given channel configuration,
│ │ │ │ which is one of the values listed under ALLEGRO_CHANNEL_CONF. Examples: 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:size_t al_get_audio_depth_size(ALLEGRO_AUDIO_DEPTH depth)
│ │ │ │
│ │ │ │
│ │ │ │ +
│ │ │ │ al_get_channel_count
│ │ │ │ size_t al_get_channel_count(ALLEGRO_CHANNEL_CONF conf)
│ │ │ │ +
│ │ │ │ al_fill_silence
│ │ │ │ void al_fill_silence(void *buf, unsigned int samples,
│ │ │ │ , ALLEGRO_CHANNEL_CONF chan_conf) ALLEGRO_AUDIO_DEPTH depth
│ │ │ │ +
│ │ │ │
│ │ │ │
│ │ │ │