Releases: mackron/miniaudio
Releases · mackron/miniaudio
Version 0.11.23
v0.11.23 - 2025-09-11
- Fixed an error in
ma_channel_map_to_string()where the output string is not null terminated correctly. - Fixed an error with logging due to mishandling of va_list.
- Fixed some errors when compiling with
MA_NO_RUNTIME_LINKING. - Fixed an error with
ma_soundinitialization where the initial loop points are not set correctly. - Fixed an alignment error with the ring buffer.
- Fixed a memory leak in the resource manager when opening a file fails.
- Fixed an assertion failure in the resource manager when opening a file fails.
- Fixed a compilation warning relating to
MA_FALLTHROUGH - Fixed an undefined behavior error in the s16 to s32 conversion routine.
- Fixed an undefined behavior error relating to MurmurHash3.
- Fixed an undefined behavior error with the LCG random number generator.
- Fixed a compilation error with
MA_NO_SSE2. - Fixed some unused function warnings.
- Fixed a rare, but technically possible division by zero error.
- Some const correctness fixes for
ma_sound. - Improved compatibility with old versions of GCC.
- Miscellaneous documentation fixes.
- WAV, FLAC and MP3 decoders have been brought up to date with dr_libs. Of particular note, this should fix some long outstanding bugs with MP3 due to metadata not being handled correctly.
- POSIX: Added a fallback for when creation of a real-time thread fails. This fallback can be disabled with
MA_NO_PTHREAD_REALTIME_PRIORITY_FALLBACKif you need an explicit failure. - POSIX: pthread.h is no longer included when
MA_NO_THREADINGis defined. - WASAPI: Improved handling of COM initialization and shutdown to make it a bit more robust.
- WASAPI: Fix an error due to a missing struct member.
- PulseAudio: Fixed a crash when requesting a channel count greater than 32.
- AAudio: Fixed a crash when uninitializing the device while in the middle of rerouting.
Version 0.11.22
v0.11.22 - 2025-02-24
- Starting from version 0.12, miniaudio will be switching to a split .c/h pair, away from a single header. In preparation for this, a file named "miniaudio.c" has been added to repository. Currently this is just a simple wrapper around miniaudio.h and
MINIAUDIO_IMPLEMENTATION. Nothing has changed in miniaudio.h, however when version 0.12 is released you will need to use miniaudio.c for the implementation. It's recommended you start the transition away fromMINIAUDIO_IMPLEMENTATIONand towards miniaudio.c. If you want to keep building your project as a single translation unit, you can do#include "miniaudio.c"which will continue to be supported with version 0.12 and beyond. - In the extras folder, the
miniaudio_libvorbis.handminiaudio_libopus.hfiles have been deprecated. They have been replaced with versions in theextras/decodersfolder. They are now split into a separate .c and .h files. The old files still exist for compatibility, but you need to transition over to the new versions. The transition should be trivial. Compile the .c files like a normal source file, and include the .h file like a normal header. - Add
MA_SOUND_FLAG_LOOPINGandMA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_LOOPINGflags. These can be used to initialize sounds and resource managed data sources to loop by default. This is the recommended way to enable looping for streams. TheisLoopingconfig option inma_sound_configandma_resource_manager_data_source_confighas been deprecated. If you are using those, you should switch to the new flag or else you'll get compiler errors when upgrading to a future version. ma_rb_commit_read(),ma_rb_commit_write(),ma_pcm_rb_commit_read()andma_pcm_rb_commit_write()no longer returnMA_AT_END. The reason for this change is that there's no real notion of an "end" in a ring buffer which makes this result code confusing. In addition, it's possible for these functions to return something other thanMA_SUCCESSeven when the operation completed successfully which adds to the confusion. The correct way to check if there is any more room in the ring buffer is to look at the frame count returned by*rb_acquire_read/write().- The
ma_pcm_rbdata source implementation has been modified to pad output data with silence if there is not enough data in the ring buffer to fill the request. What this means is for anma_pcm_rb,ma_data_source_read_pcm_frames()should no longer return a frame count of less than what you requested, and will therefore never returnMA_AT_ENDwhich does not make sense for a ring buffer since it does not have the notion of an end. This change should make it much easier to use a ring buffer as the data source for ama_sound. - There has been a minor change to
ma_calculate_buffer_size_in_milliseconds_from_frames()to have it return a value rounded up to the nearest integer. - When initialization of a decoder fails, it will now return the first error code encountered rather than always returning
MA_NO_BACKENDregardless of the error. - Add
ma_device_id_equal()for comparing device IDs. - Add support for
MA_NO_RUNTIME_LINKINGto the AAudio backend. - Fix a buffer overrun bug with
ma_soundprocessing. - Fix a bug relating to node detachment.
- Fix a bug where amplification with
ma_device_set_master_volume()does not work. - Fix a bug where sounds loaded with
MA_SOUND_FLAG_DECODEdo not loop. - Fix a bug with initialization of the band pass biquad filter.
- Fix a bug where a device would output distorted audio if initialized without a data callback.
- Fix various compiler and static analysis warnings.
- Various documentation updates.
- WASAPI: Fix an error when stopping the device. The "Failed to reset internal playback device." error should be significantly reduced in frequency.
- WASAPI: Fix an error when stopping the device where it was possible miniaudio would not wait for the device to be drained due to an error with the wait time calculation.
- WASAPI: Fix a COM related crash with device rerouting.
- DirectSound: Add support for specifying an explicit window handle for SetCooperativeLevel().
- ALSA: Fix a bug where a playback device can fail to start.
- ALSA: Fix some warnings relating to unhandled return value of
read(). - Web: Fix ScriptProcessorNode path when compiling with
--closure=1. Note that the Audio Worklets path is not currently working due to the callback specified inemscripten_create_wasm_audio_worklet_processor_asyncnever getting fired. - Web: Fix an error with the unlocked notification when compiling as C++.
- Web: Fix a JavaScript error when initializing and then uninitializing a context before any interactivity.
- Web: miniaudio will now enable threading when the
-pthreadcommand line flag is used. - Web: Infrastructure has been added to support configurable buffer sizes. In practice this is still restricted to 128 frames, but once Emscripten adds full support for configuration of the buffer size, it will be trivial to add support to miniaudio.
- AAudio: Fix some crashes relating to stream rerouting.
- AAudio: Fix an error where the device is silenced after rerouting. With this change, miniaudio will no longer give AAudio a hint to use your supplied period size which will therefore result in AAudio using its default latency configuration. If you want AAudio to try to use the period size you supply in the device config, which is the old behaviour, set
aaudio.allowSetBufferCapacityto true in the device config. Note, however, if you do this you may end up with errors when rerouting between devices. - AAudio: The default minimum SDK version has been increased from 26 to 27 when enabling AAudio. If you need to support version 26, you can use
#define MA_AAUDIO_MIN_ANDROID_SDK_VERSION 26. - AAudio: Fix ma_device_get_info() implementation.
- AAudio: Fix an error when an assertion can trigger due to AAudio reporting a frame count of 0.
- PulseAudio: Add a configuration option to control the PulseAudio-defined channel map to use.
- PulseAudio: Fix an extremely unlikely race condition with device initialization.
- PulseAudio: Fix a bug with the miniaudio-generated stream name. Previously this would create names like "miniaudi0" when it was supposed to be "miniaudio:0".
- iOS: Fix an error when trying to capture audio from the simulator with iOS version 16 and newer.
- sndio: Fix a crash with device uninitialization.