- WASAPI: No longer return an error from ma_context_get_device_info() when an exclusive mode format
cannot be retrieved.
- WASAPI: Attempt to fix some bugs with device uninitialization.
- PulseAudio: Yet another refactor, this time to remove the dependency on `pa_threaded_mainloop`.
- Web Audio: Fix a bug on Chrome and any other browser using the same engine.
- Web Audio: Automatically start the device on some user input if the device has been started. This
is to work around Google's policy of not starting audio if no user input has yet been performed.
- Fix a bug where thread handles are not being freed.
- Fix some static analysis warnings in FLAC, WAV and MP3 decoders.
- Fix a warning due to referencing _MSC_VER when it is undefined.
- Update to latest version of c89atomic.
- Internal refactoring to migrate over to the new backend callback system for the following backends:
- PulseAudio
- ALSA
- Core Audio
- AAudio
- OpenSL|ES
- OSS
- audio(4)
- sndio
v0.10.31 - 2021-01-17
- Make some functions const correct.
- Update ma_data_source_read_pcm_frames() to initialize pFramesRead to 0 for safety.
- Add the MA_ATOMIC annotation for use with variables that should be used atomically and remove unnecessary volatile qualifiers.
- Add support for enabling only specific backends at compile time. This is the reverse of the pre-existing system. With the new
system, all backends are first disabled with `MA_ENABLE_ONLY_SPECIFIC_BACKENDS`, which is then followed with `MA_ENABLE_*`. The
old system where you disable backends with `MA_NO_*` still exists and is still the default.
v0.10.30 - 2021-01-10
- Fix a crash in ma_audio_buffer_read_pcm_frames().
- Update spinlock APIs to take a volatile parameter as input.
- Silence some unused parameter warnings.
- Fix a warning on GCC when compiling as C++.
v0.10.29 - 2020-12-26
- Fix some subtle multi-threading bugs on non-x86 platforms.
- Fix a bug resulting in superfluous memory allocations when enumerating devices.
- Core Audio: Fix a compilation error when compiling for iOS.
v0.10.28 - 2020-12-16
- Fix a crash when initializing a POSIX thread.
- OpenSL|ES: Respect the MA_NO_RUNTIME_LINKING option.
v0.10.27 - 2020-12-04
- Add support for dynamically configuring some properties of `ma_noise` objects post-initialization.
- Add support for configuring the channel mixing mode in the device config.
- Fix a bug with simple channel mixing mode (drop or silence excess channels).
- Fix some bugs with trying to access uninitialized variables.
- Fix some errors with stopping devices for synchronous backends where the backend's stop callback would get fired twice.
- Fix a bug in the decoder due to using an uninitialized variable.
- Fix some data race errors.
v0.10.26 - 2020-11-24
- WASAPI: Fix a bug where the exclusive mode format may not be retrieved correctly due to accessing freed memory.
- Fix a bug with ma_waveform where glitching occurs after changing frequency.
- Fix compilation with OpenWatcom.
- Fix compilation with TCC.
- Fix compilation with Digital Mars.
- Fix compilation warnings.
- Remove bitfields from public structures to aid in binding maintenance.
v0.10.25 - 2020-11-15
- PulseAudio: Fix a bug where the stop callback isn't fired.
- WebAudio: Fix an error that occurs when Emscripten increases the size of it's heap.
- Custom Backends: Change the onContextInit and onDeviceInit callbacks to take a parameter which is a pointer to the config that was
passed into ma_context_init() and ma_device_init(). This replaces the deviceType parameter of onDeviceInit.
- Fix compilation warnings on older versions of GCC.
v0.10.24 - 2020-11-10
- Fix a bug where initialization of a backend can fail due to some bad state being set from a prior failed attempt at initializing a
lower priority backend.
v0.10.23 - 2020-11-09
- AAudio: Add support for configuring a playback stream's usage.
- Fix a compilation error when all built-in asynchronous backends are disabled at compile time.
- Fix compilation errors when compiling as C++.
v0.10.22 - 2020-11-08
- Add support for custom backends.
- Add support for detecting default devices during device enumeration and with `ma_context_get_device_info()`.
- Refactor to the PulseAudio backend. This simplifies the implementation and fixes a capture bug.
- ALSA: Fix a bug in `ma_context_get_device_info()` where the PCM handle is left open in the event of an error.
- Core Audio: Further improvements to sample rate selection.
- Core Audio: Fix some bugs with capture mode.
- OpenSL: Add support for configuring stream types and recording presets.
- AAudio: Add support for configuring content types and input presets.
- Fix bugs in `ma_decoder_init_file*()` where the file handle is not closed after a decoding error.
- Fix some compilation warnings on GCC and Clang relating to the Speex resampler.
- Fix a compilation error for the Linux build when the ALSA and JACK backends are both disabled.
- Fix a compilation error for the BSD build.
- Fix some compilation errors on older versions of GCC.
- Add documentation for `MA_NO_RUNTIME_LINKING`.
v0.10.21 - 2020-10-30
- Add ma_is_backend_enabled() and ma_get_enabled_backends() for retrieving enabled backends at run-time.
- WASAPI: Fix a copy and paste bug relating to loopback mode.
- Core Audio: Fix a bug when using multiple contexts.
- Core Audio: Fix a compilation warning.
- Core Audio: Improvements to sample rate selection.
- Core Audio: Improvements to format/channels/rate selection when requesting defaults.
- Core Audio: Add notes regarding the Apple notarization process.
- Fix some bugs due to null pointer dereferences.
v0.10.20 - 2020-10-06
- Fix build errors with UWP.
- Minor documentation updates.
v0.10.19 - 2020-09-22
- WASAPI: Return an error when exclusive mode is requested, but the native format is not supported by miniaudio.
- Fix a bug where ma_decoder_seek_to_pcm_frames() never returns MA_SUCCESS even though it was successful.
- Store the sample rate in the `ma_lpf` and `ma_hpf` structures.
v0.10.18 - 2020-08-30
- Fix build errors with VC6.
- Fix a bug in channel converter for s32 format.
- Change channel converter configs to use the default channel map instead of a blank channel map when no channel map is specified when initializing the
config. This fixes an issue where the optimized mono expansion path would never get used.
- Use a more appropriate default format for FLAC decoders. This will now use ma_format_s16 when the FLAC is encoded as 16-bit.
- Update FLAC decoder.
- Update links to point to the new repository location (https://github.com/mackron/miniaudio).
v0.10.17 - 2020-08-28
- Fix an error where the WAV codec is incorrectly excluded from the build depending on which compile time options are set.
- Fix a bug in ma_audio_buffer_read_pcm_frames() where it isn't returning the correct number of frames processed.
- Fix compilation error on Android.
- Core Audio: Fix a bug with full-duplex mode.
- Add ma_decoder_get_cursor_in_pcm_frames().
- Update WAV codec.
v0.10.16 - 2020-08-14
- WASAPI: Fix a potential crash due to using an uninitialized variable.
- OpenSL: Enable runtime linking.
- OpenSL: Fix a multithreading bug when initializing and uninitializing multiple contexts at the same time.
- iOS: Improvements to device enumeration.
- Fix a crash in ma_data_source_read_pcm_frames() when the output frame count parameter is NULL.
- Fix a bug in ma_data_source_read_pcm_frames() where looping doesn't work.
- Fix some compilation warnings on Windows when both DirectSound and WinMM are disabled.
- Fix some compilation warnings when no decoders are enabled.
- Add ma_audio_buffer_get_available_frames().
- Add ma_decoder_get_available_frames().
- Add sample rate to ma_data_source_get_data_format().
- Change volume APIs to take 64-bit frame counts.
- Updates to documentation.
v0.10.15 - 2020-07-15
- Fix a bug when converting bit-masked channel maps to miniaudio channel maps. This affects the WASAPI and OpenSL backends.
v0.10.14 - 2020-07-14
- Fix compilation errors on Android.
- Fix compilation errors with -march=armv6.
- Updates to the documentation.
v0.10.13 - 2020-07-11
- Fix some potential buffer overflow errors with channel maps when channel counts are greater than MA_MAX_CHANNELS.
- Fix compilation error on Emscripten.
- Silence some unused function warnings.
- Increase the default buffer size on the Web Audio backend. This fixes glitching issues on some browsers.
- Bring FLAC decoder up-to-date with dr_flac.
- Bring MP3 decoder up-to-date with dr_mp3.
v0.10.12 - 2020-07-04
- Fix compilation errors on the iOS build.
v0.10.11 - 2020-06-28
- Fix some bugs with device tracking on Core Audio.
- Updates to documentation.
v0.10.10 - 2020-06-26
- Add include guard for the implementation section.
- Mark ma_device_sink_info_callback() as static.
- Fix compilation errors with MA_NO_DECODING and MA_NO_ENCODING.
- Fix compilation errors with MA_NO_DEVICE_IO
v0.10.9 - 2020-06-24
- Amalgamation of dr_wav, dr_flac and dr_mp3. With this change, including the header section of these libraries before the implementation of miniaudio is no
longer required. Decoding of WAV, FLAC and MP3 should be supported seamlessly without any additional libraries. Decoders can be excluded from the build
with the following options:
- MA_NO_WAV
- MA_NO_FLAC
- MA_NO_MP3
If you get errors about multiple definitions you need to either enable the options above, move the implementation of dr_wav, dr_flac and/or dr_mp3 to before
the implementation of miniaudio, or update dr_wav, dr_flac and/or dr_mp3.
- Changes to the internal atomics library. This has been replaced with c89atomic.h which is embedded within this file.
- Fix a bug when a decoding backend reports configurations outside the limits of miniaudio's decoder abstraction.
- Fix the UWP build.
- Fix the Core Audio build.
- Fix the -std=c89 build on GCC.
v0.10.8 - 2020-06-22
- Remove dependency on ma_context from mutexes.
- Change ma_data_source_read_pcm_frames() to return a result code and output the frames read as an output parameter.
- Change ma_data_source_seek_pcm_frames() to return a result code and output the frames seeked as an output parameter.
- Change ma_audio_buffer_unmap() to return MA_AT_END when the end has been reached. This should be considered successful.
- Change playback.pDeviceID and capture.pDeviceID to constant pointers in ma_device_config.
- Add support for initializing decoders from a virtual file system object. This is achieved via the ma_vfs API and allows the application to customize file
IO for the loading and reading of raw audio data. Passing in NULL for the VFS will use defaults. New APIs:
- ma_decoder_init_vfs()
- ma_decoder_init_vfs_wav()
- ma_decoder_init_vfs_flac()
- ma_decoder_init_vfs_mp3()
- ma_decoder_init_vfs_vorbis()
- ma_decoder_init_vfs_w()
- ma_decoder_init_vfs_wav_w()
- ma_decoder_init_vfs_flac_w()
- ma_decoder_init_vfs_mp3_w()
- ma_decoder_init_vfs_vorbis_w()
- Add support for memory mapping to ma_data_source.
- ma_data_source_map()
- ma_data_source_unmap()
- Add ma_offset_pcm_frames_ptr() and ma_offset_pcm_frames_const_ptr() which can be used for offsetting a pointer by a specified number of PCM frames.
- Add initial implementation of ma_yield() which is useful for spin locks which will be used in some upcoming work.
- Add documentation for log levels.
- The ma_event API has been made public in preparation for some uncoming work.
- Fix a bug in ma_decoder_seek_to_pcm_frame() where the internal sample rate is not being taken into account for determining the seek location.
- Fix some bugs with the linear resampler when dynamically changing the sample rate.
- Fix compilation errors with MA_NO_DEVICE_IO.
- Fix some warnings with GCC and -std=c89.
- Fix some formatting warnings with GCC and -Wall and -Wpedantic.
- Fix some warnings with VC6.
- Minor optimization to ma_copy_pcm_frames(). This is now a no-op when the input and output buffers are the same.
v0.10.7 - 2020-05-25
- Fix a compilation error in the C++ build.
- Silence a warning.
v0.10.6 - 2020-05-24
- Change ma_clip_samples_f32() and ma_clip_pcm_frames_f32() to take a 64-bit sample/frame count.
- Change ma_zero_pcm_frames() to clear to 128 for ma_format_u8.
- Add ma_silence_pcm_frames() which replaces ma_zero_pcm_frames(). ma_zero_pcm_frames() will be removed in version 0.11.
- Add support for u8, s24 and s32 formats to ma_channel_converter.
- Add compile-time and run-time version querying.
- MA_VERSION_MINOR
- MA_VERSION_MAJOR
- MA_VERSION_REVISION
- MA_VERSION_STRING
- ma_version()
- ma_version_string()
- Add ma_audio_buffer for reading raw audio data directly from memory.
- Fix a bug in shuffle mode in ma_channel_converter.
- Fix compilation errors in certain configurations for ALSA and PulseAudio.
- The data callback now initializes the output buffer to 128 when the playback sample format is ma_format_u8.
v0.10.5 - 2020-05-05
- Change ma_zero_pcm_frames() to take a 64-bit frame count.
- Add ma_copy_pcm_frames().
- Add MA_NO_GENERATION build option to exclude the `ma_waveform` and `ma_noise` APIs from the build.
- Add support for formatted logging to the VC6 build.
- Fix a crash in the linear resampler when LPF order is 0.
- Fix compilation errors and warnings with older versions of Visual Studio.
- Minor documentation updates.
v0.10.4 - 2020-04-12
- Fix a data conversion bug when converting from the client format to the native device format.
v0.10.3 - 2020-04-07
- Bring up to date with breaking changes to dr_mp3.
- Remove MA_NO_STDIO. This was causing compilation errors and the maintenance cost versus practical benefit is no longer worthwhile.
- Fix a bug with data conversion where it was unnecessarily converting to s16 or f32 and then straight back to the original format.
- Fix compilation errors and warnings with Visual Studio 2005.
- ALSA: Disable ALSA's automatic data conversion by default and add configuration options to the device config:
- alsa.noAutoFormat
- alsa.noAutoChannels
- alsa.noAutoResample
- WASAPI: Add some overrun recovery for ma_device_type_capture devices.
v0.10.2 - 2020-03-22
- Decorate some APIs with MA_API which were missed in the previous version.
- Fix a bug in ma_linear_resampler_set_rate() and ma_linear_resampler_set_rate_ratio().
v0.10.1 - 2020-03-17
- Add MA_API decoration. This can be customized by defining it before including miniaudio.h.
- Fix a bug where opening a file would return a success code when in fact it failed.
- Fix compilation errors with Visual Studio 6 and 2003.
- Fix warnings on macOS.
v0.10.0 - 2020-03-07
- API CHANGE: Refactor data conversion APIs
- ma_format_converter has been removed. Use ma_convert_pcm_frames_format() instead.
- ma_channel_router has been replaced with ma_channel_converter.
- ma_src has been replaced with ma_resampler
- ma_pcm_converter has been replaced with ma_data_converter
- API CHANGE: Add support for custom memory allocation callbacks. The following APIs have been updated to take an extra parameter for the allocation
callbacks:
- ma_malloc()
- ma_realloc()
- ma_free()
- ma_aligned_malloc()
- ma_aligned_free()
- ma_rb_init() / ma_rb_init_ex()
- ma_pcm_rb_init() / ma_pcm_rb_init_ex()
- API CHANGE: Simplify latency specification in device configurations. The bufferSizeInFrames and bufferSizeInMilliseconds parameters have been replaced with
periodSizeInFrames and periodSizeInMilliseconds respectively. The previous variables defined the size of the entire buffer, whereas the new ones define the
size of a period. The following APIs have been removed since they are no longer relevant:
- ma_get_default_buffer_size_in_milliseconds()
- ma_get_default_buffer_size_in_frames()
- API CHANGE: ma_device_set_stop_callback() has been removed. If you require a stop callback, you must now set it via the device config just like the data
callback.
- API CHANGE: The ma_sine_wave API has been replaced with ma_waveform. The following APIs have been removed:
- ma_sine_wave_init()
- ma_sine_wave_read_f32()
- ma_sine_wave_read_f32_ex()
- API CHANGE: ma_convert_frames() has been updated to take an extra parameter which is the size of the output buffer in PCM frames. Parameters have also been
reordered.
- API CHANGE: ma_convert_frames_ex() has been changed to take a pointer to a ma_data_converter_config object to specify the input and output formats to
convert between.
- API CHANGE: ma_calculate_frame_count_after_src() has been renamed to ma_calculate_frame_count_after_resampling().
- Add support for the following filters:
- Biquad (ma_biquad)
- First order low-pass (ma_lpf1)
- Second order low-pass (ma_lpf2)
- Low-pass with configurable order (ma_lpf)
- First order high-pass (ma_hpf1)
- Second order high-pass (ma_hpf2)
- High-pass with configurable order (ma_hpf)
- Second order band-pass (ma_bpf2)
- Band-pass with configurable order (ma_bpf)
- Second order peaking EQ (ma_peak2)
- Second order notching (ma_notch2)
- Second order low shelf (ma_loshelf2)
- Second order high shelf (ma_hishelf2)
- Add waveform generation API (ma_waveform) with support for the following:
- Sine
- Square
- Triangle
- Sawtooth
- Add noise generation API (ma_noise) with support for the following:
- White
- Pink
- Brownian
- Add encoding API (ma_encoder). This only supports outputting to WAV files via dr_wav.
- Add ma_result_description() which is used to retrieve a human readable description of a given result code.
- Result codes have been changed. Binding maintainers will need to update their result code constants.
- More meaningful result codes are now returned when a file fails to open.
- Internal functions have all been made static where possible.
- Fix potential crash when ma_device object's are not aligned to MA_SIMD_ALIGNMENT.
- Fix a bug in ma_decoder_get_length_in_pcm_frames() where it was returning the length based on the internal sample rate rather than the output sample rate.
- Fix bugs in some backends where the device is not drained properly in ma_device_stop().
- Improvements to documentation.
v0.9.10 - 2020-01-15
- Fix compilation errors due to #if/#endif mismatches.
- WASAPI: Fix a bug where automatic stream routing is being performed for devices that are initialized with an explicit device ID.
- iOS: Fix a crash on device uninitialization.
v0.9.9 - 2020-01-09
- Fix compilation errors with MinGW.
- Fix compilation errors when compiling on Apple platforms.
- WASAPI: Add support for disabling hardware offloading.
- WASAPI: Add support for disabling automatic stream routing.
- Core Audio: Fix bugs in the case where the internal device uses deinterleaved buffers.
- Core Audio: Add support for controlling the session category (AVAudioSessionCategory) and options (AVAudioSessionCategoryOptions).
- JACK: Fix bug where incorrect ports are connected.
v0.9.8 - 2019-10-07
- WASAPI: Fix a potential deadlock when starting a full-duplex device.
- WASAPI: Enable automatic resampling by default. Disable with config.wasapi.noAutoConvertSRC.
- Core Audio: Fix bugs with automatic stream routing.
- Add support for controlling whether or not the content of the output buffer passed in to the data callback is pre-initialized
to zero. By default it will be initialized to zero, but this can be changed by setting noPreZeroedOutputBuffer in the device
config. Setting noPreZeroedOutputBuffer to true will leave the contents undefined.
- Add support for clipping samples after the data callback has returned. This only applies when the playback sample format is
configured as ma_format_f32. If you are doing clipping yourself, you can disable this overhead by setting noClip to true in
the device config.
- Add support for master volume control for devices.
- Use ma_device_set_master_volume() to set the volume to a factor between 0 and 1, where 0 is silence and 1 is full volume.
- Use ma_device_set_master_volume_db() to set the volume in decibels where 0 is full volume and < 0 reduces the volume.
- Fix warnings emitted by GCC when `__inline__` is undefined or defined as nothing.
v0.9.7 - 2019-08-28
- Add support for loopback mode (WASAPI only).
- To use this, set the device type to ma_device_type_loopback, and then fill out the capture section of the device config.
- If you need to capture from a specific output device, set the capture device ID to that of a playback device.
- Fix a crash when an error is posted in ma_device_init().
- Fix a compilation error when compiling for ARM architectures.
- Fix a bug with the audio(4) backend where the device is incorrectly being opened in non-blocking mode.
- Fix memory leaks in the Core Audio backend.
- Minor refactoring to the WinMM, ALSA, PulseAudio, OSS, audio(4), sndio and null backends.
v0.9.6 - 2019-08-04
- Add support for loading decoders using a wchar_t string for file paths.
- Don't trigger an assert when ma_device_start() is called on a device that is already started. This will now log a warning
and return MA_INVALID_OPERATION. The same applies for ma_device_stop().
- Try fixing an issue with PulseAudio taking a long time to start playback.
- Fix a bug in ma_convert_frames() and ma_convert_frames_ex().
- Fix memory leaks in the WASAPI backend.
- Fix a compilation error with Visual Studio 2010.
v0.9.5 - 2019-05-21
- Add logging to ma_dlopen() and ma_dlsym().
- Add ma_decoder_get_length_in_pcm_frames().
- Fix a bug with capture on the OpenSL|ES backend.
- Fix a bug with the ALSA backend where a device would not restart after being stopped.
v0.9.4 - 2019-05-06
- Add support for C89. With this change, miniaudio should compile clean with GCC/Clang with "-std=c89 -ansi -pedantic" and
Microsoft compilers back to VC6. Other compilers should also work, but have not been tested.
v0.9.3 - 2019-04-19
- Fix compiler errors on GCC when compiling with -std=c99.
v0.9.2 - 2019-04-08
- Add support for per-context user data.
- Fix a potential bug with context configs.
- Fix some bugs with PulseAudio.
v0.9.1 - 2019-03-17
- Fix a bug where the output buffer is not getting zeroed out before calling the data callback. This happens when
the device is running in passthrough mode (not doing any data conversion).
- Fix an issue where the data callback is getting called too frequently on the WASAPI and DirectSound backends.
- Fix error on the UWP build.
- Fix a build error on Apple platforms.
v0.9 - 2019-03-06
- Rebranded to "miniaudio". All namespaces have been renamed from "mal" to "ma".
- API CHANGE: ma_device_init() and ma_device_config_init() have changed significantly:
- The device type, device ID and user data pointer have moved from ma_device_init() to the config.
- All variations of ma_device_config_init_*() have been removed in favor of just ma_device_config_init().
- ma_device_config_init() now takes only one parameter which is the device type. All other properties need
to be set on the returned object directly.
- The onDataCallback and onStopCallback members of ma_device_config have been renamed to "dataCallback"
and "stopCallback".
- The ID of the physical device is now split into two: one for the playback device and the other for the
capture device. This is required for full-duplex. These are named "pPlaybackDeviceID" and "pCaptureDeviceID".
- API CHANGE: The data callback has changed. It now uses a unified callback for all device types rather than
being separate for each. It now takes two pointers - one containing input data and the other output data. This
design in required for full-duplex. The return value is now void instead of the number of frames written. The
- WASAPI: No longer return an error from ma_context_get_device_info() when an exclusive mode format
cannot be retrieved.
- WASAPI: Attempt to fix some bugs with device uninitialization.
- PulseAudio: Yet another refactor, this time to remove the dependency on `pa_threaded_mainloop`.
- Web Audio: Fix a bug on Chrome and any other browser using the same engine.
- Web Audio: Automatically start the device on some user input if the device has been started. This
is to work around Google's policy of not starting audio if no user input has yet been performed.
- Fix a bug where thread handles are not being freed.
- Fix some static analysis warnings in FLAC, WAV and MP3 decoders.
- Fix a warning due to referencing _MSC_VER when it is undefined.
- Update to latest version of c89atomic.
- Internal refactoring to migrate over to the new backend callback system for the following backends:
- PulseAudio
- ALSA
- Core Audio
- AAudio
- OpenSL|ES
- OSS
- audio(4)
- sndio
v0.10.31 - 2021-01-17
- Make some functions const correct.
- Update ma_data_source_read_pcm_frames() to initialize pFramesRead to 0 for safety.
- Add the MA_ATOMIC annotation for use with variables that should be used atomically and remove unnecessary volatile qualifiers.
- Add support for enabling only specific backends at compile time. This is the reverse of the pre-existing system. With the new
system, all backends are first disabled with `MA_ENABLE_ONLY_SPECIFIC_BACKENDS`, which is then followed with `MA_ENABLE_*`. The
old system where you disable backends with `MA_NO_*` still exists and is still the default.
v0.10.30 - 2021-01-10
- Fix a crash in ma_audio_buffer_read_pcm_frames().
- Update spinlock APIs to take a volatile parameter as input.
- Silence some unused parameter warnings.
- Fix a warning on GCC when compiling as C++.
v0.10.29 - 2020-12-26
- Fix some subtle multi-threading bugs on non-x86 platforms.
- Fix a bug resulting in superfluous memory allocations when enumerating devices.
- Core Audio: Fix a compilation error when compiling for iOS.
v0.10.28 - 2020-12-16
- Fix a crash when initializing a POSIX thread.
- OpenSL|ES: Respect the MA_NO_RUNTIME_LINKING option.
v0.10.27 - 2020-12-04
- Add support for dynamically configuring some properties of `ma_noise` objects post-initialization.
- Add support for configuring the channel mixing mode in the device config.
- Fix a bug with simple channel mixing mode (drop or silence excess channels).
- Fix some bugs with trying to access uninitialized variables.
- Fix some errors with stopping devices for synchronous backends where the backend's stop callback would get fired twice.
- Fix a bug in the decoder due to using an uninitialized variable.
- Fix some data race errors.
v0.10.26 - 2020-11-24
- WASAPI: Fix a bug where the exclusive mode format may not be retrieved correctly due to accessing freed memory.
- Fix a bug with ma_waveform where glitching occurs after changing frequency.
- Fix compilation with OpenWatcom.
- Fix compilation with TCC.
- Fix compilation with Digital Mars.
- Fix compilation warnings.
- Remove bitfields from public structures to aid in binding maintenance.
v0.10.25 - 2020-11-15
- PulseAudio: Fix a bug where the stop callback isn't fired.
- WebAudio: Fix an error that occurs when Emscripten increases the size of it's heap.
- Custom Backends: Change the onContextInit and onDeviceInit callbacks to take a parameter which is a pointer to the config that was
passed into ma_context_init() and ma_device_init(). This replaces the deviceType parameter of onDeviceInit.
- Fix compilation warnings on older versions of GCC.
v0.10.24 - 2020-11-10
- Fix a bug where initialization of a backend can fail due to some bad state being set from a prior failed attempt at initializing a
lower priority backend.
v0.10.23 - 2020-11-09
- AAudio: Add support for configuring a playback stream's usage.
- Fix a compilation error when all built-in asynchronous backends are disabled at compile time.
- Fix compilation errors when compiling as C++.
v0.10.22 - 2020-11-08
- Add support for custom backends.
- Add support for detecting default devices during device enumeration and with `ma_context_get_device_info()`.
- Refactor to the PulseAudio backend. This simplifies the implementation and fixes a capture bug.
- ALSA: Fix a bug in `ma_context_get_device_info()` where the PCM handle is left open in the event of an error.
- Core Audio: Further improvements to sample rate selection.
- Core Audio: Fix some bugs with capture mode.
- OpenSL: Add support for configuring stream types and recording presets.
- AAudio: Add support for configuring content types and input presets.
- Fix bugs in `ma_decoder_init_file*()` where the file handle is not closed after a decoding error.
- Fix some compilation warnings on GCC and Clang relating to the Speex resampler.
- Fix a compilation error for the Linux build when the ALSA and JACK backends are both disabled.
- Fix a compilation error for the BSD build.
- Fix some compilation errors on older versions of GCC.
- Add documentation for `MA_NO_RUNTIME_LINKING`.
v0.10.21 - 2020-10-30
- Add ma_is_backend_enabled() and ma_get_enabled_backends() for retrieving enabled backends at run-time.
- WASAPI: Fix a copy and paste bug relating to loopback mode.
- Core Audio: Fix a bug when using multiple contexts.
- Core Audio: Fix a compilation warning.
- Core Audio: Improvements to sample rate selection.
- Core Audio: Improvements to format/channels/rate selection when requesting defaults.
- Core Audio: Add notes regarding the Apple notarization process.
- Fix some bugs due to null pointer dereferences.
v0.10.20 - 2020-10-06
- Fix build errors with UWP.
- Minor documentation updates.
v0.10.19 - 2020-09-22
- WASAPI: Return an error when exclusive mode is requested, but the native format is not supported by miniaudio.
- Fix a bug where ma_decoder_seek_to_pcm_frames() never returns MA_SUCCESS even though it was successful.
- Store the sample rate in the `ma_lpf` and `ma_hpf` structures.
v0.10.18 - 2020-08-30
- Fix build errors with VC6.
- Fix a bug in channel converter for s32 format.
- Change channel converter configs to use the default channel map instead of a blank channel map when no channel map is specified when initializing the
config. This fixes an issue where the optimized mono expansion path would never get used.
- Use a more appropriate default format for FLAC decoders. This will now use ma_format_s16 when the FLAC is encoded as 16-bit.
- Update FLAC decoder.
- Update links to point to the new repository location (https://github.com/mackron/miniaudio).
v0.10.17 - 2020-08-28
- Fix an error where the WAV codec is incorrectly excluded from the build depending on which compile time options are set.
- Fix a bug in ma_audio_buffer_read_pcm_frames() where it isn't returning the correct number of frames processed.
- Fix compilation error on Android.
- Core Audio: Fix a bug with full-duplex mode.
- Add ma_decoder_get_cursor_in_pcm_frames().
- Update WAV codec.
v0.10.16 - 2020-08-14
- WASAPI: Fix a potential crash due to using an uninitialized variable.
- OpenSL: Enable runtime linking.
- OpenSL: Fix a multithreading bug when initializing and uninitializing multiple contexts at the same time.
- iOS: Improvements to device enumeration.
- Fix a crash in ma_data_source_read_pcm_frames() when the output frame count parameter is NULL.
- Fix a bug in ma_data_source_read_pcm_frames() where looping doesn't work.
- Fix some compilation warnings on Windows when both DirectSound and WinMM are disabled.
- Fix some compilation warnings when no decoders are enabled.
- Add ma_audio_buffer_get_available_frames().
- Add ma_decoder_get_available_frames().
- Add sample rate to ma_data_source_get_data_format().
- Change volume APIs to take 64-bit frame counts.
- Updates to documentation.
v0.10.15 - 2020-07-15
- Fix a bug when converting bit-masked channel maps to miniaudio channel maps. This affects the WASAPI and OpenSL backends.
v0.10.14 - 2020-07-14
- Fix compilation errors on Android.
- Fix compilation errors with -march=armv6.
- Updates to the documentation.
v0.10.13 - 2020-07-11
- Fix some potential buffer overflow errors with channel maps when channel counts are greater than MA_MAX_CHANNELS.
- Fix compilation error on Emscripten.
- Silence some unused function warnings.
- Increase the default buffer size on the Web Audio backend. This fixes glitching issues on some browsers.
- Bring FLAC decoder up-to-date with dr_flac.
- Bring MP3 decoder up-to-date with dr_mp3.
v0.10.12 - 2020-07-04
- Fix compilation errors on the iOS build.
v0.10.11 - 2020-06-28
- Fix some bugs with device tracking on Core Audio.
- Updates to documentation.
v0.10.10 - 2020-06-26
- Add include guard for the implementation section.
- Mark ma_device_sink_info_callback() as static.
- Fix compilation errors with MA_NO_DECODING and MA_NO_ENCODING.
- Fix compilation errors with MA_NO_DEVICE_IO
v0.10.9 - 2020-06-24
- Amalgamation of dr_wav, dr_flac and dr_mp3. With this change, including the header section of these libraries before the implementation of miniaudio is no
longer required. Decoding of WAV, FLAC and MP3 should be supported seamlessly without any additional libraries. Decoders can be excluded from the build
with the following options:
- MA_NO_WAV
- MA_NO_FLAC
- MA_NO_MP3
If you get errors about multiple definitions you need to either enable the options above, move the implementation of dr_wav, dr_flac and/or dr_mp3 to before
the implementation of miniaudio, or update dr_wav, dr_flac and/or dr_mp3.
- Changes to the internal atomics library. This has been replaced with c89atomic.h which is embedded within this file.
- Fix a bug when a decoding backend reports configurations outside the limits of miniaudio's decoder abstraction.
- Fix the UWP build.
- Fix the Core Audio build.
- Fix the -std=c89 build on GCC.
v0.10.8 - 2020-06-22
- Remove dependency on ma_context from mutexes.
- Change ma_data_source_read_pcm_frames() to return a result code and output the frames read as an output parameter.
- Change ma_data_source_seek_pcm_frames() to return a result code and output the frames seeked as an output parameter.
- Change ma_audio_buffer_unmap() to return MA_AT_END when the end has been reached. This should be considered successful.
- Change playback.pDeviceID and capture.pDeviceID to constant pointers in ma_device_config.
- Add support for initializing decoders from a virtual file system object. This is achieved via the ma_vfs API and allows the application to customize file
IO for the loading and reading of raw audio data. Passing in NULL for the VFS will use defaults. New APIs:
- ma_decoder_init_vfs()
- ma_decoder_init_vfs_wav()
- ma_decoder_init_vfs_flac()
- ma_decoder_init_vfs_mp3()
- ma_decoder_init_vfs_vorbis()
- ma_decoder_init_vfs_w()
- ma_decoder_init_vfs_wav_w()
- ma_decoder_init_vfs_flac_w()
- ma_decoder_init_vfs_mp3_w()
- ma_decoder_init_vfs_vorbis_w()
- Add support for memory mapping to ma_data_source.
- ma_data_source_map()
- ma_data_source_unmap()
- Add ma_offset_pcm_frames_ptr() and ma_offset_pcm_frames_const_ptr() which can be used for offsetting a pointer by a specified number of PCM frames.
- Add initial implementation of ma_yield() which is useful for spin locks which will be used in some upcoming work.
- Add documentation for log levels.
- The ma_event API has been made public in preparation for some uncoming work.
- Fix a bug in ma_decoder_seek_to_pcm_frame() where the internal sample rate is not being taken into account for determining the seek location.
- Fix some bugs with the linear resampler when dynamically changing the sample rate.
- Fix compilation errors with MA_NO_DEVICE_IO.
- Fix some warnings with GCC and -std=c89.
- Fix some formatting warnings with GCC and -Wall and -Wpedantic.
- Fix some warnings with VC6.
- Minor optimization to ma_copy_pcm_frames(). This is now a no-op when the input and output buffers are the same.
v0.10.7 - 2020-05-25
- Fix a compilation error in the C++ build.
- Silence a warning.
v0.10.6 - 2020-05-24
- Change ma_clip_samples_f32() and ma_clip_pcm_frames_f32() to take a 64-bit sample/frame count.
- Change ma_zero_pcm_frames() to clear to 128 for ma_format_u8.
- Add ma_silence_pcm_frames() which replaces ma_zero_pcm_frames(). ma_zero_pcm_frames() will be removed in version 0.11.
- Add support for u8, s24 and s32 formats to ma_channel_converter.
- Add compile-time and run-time version querying.
- MA_VERSION_MINOR
- MA_VERSION_MAJOR
- MA_VERSION_REVISION
- MA_VERSION_STRING
- ma_version()
- ma_version_string()
- Add ma_audio_buffer for reading raw audio data directly from memory.
- Fix a bug in shuffle mode in ma_channel_converter.
- Fix compilation errors in certain configurations for ALSA and PulseAudio.
- The data callback now initializes the output buffer to 128 when the playback sample format is ma_format_u8.
v0.10.5 - 2020-05-05
- Change ma_zero_pcm_frames() to take a 64-bit frame count.
- Add ma_copy_pcm_frames().
- Add MA_NO_GENERATION build option to exclude the `ma_waveform` and `ma_noise` APIs from the build.
- Add support for formatted logging to the VC6 build.
- Fix a crash in the linear resampler when LPF order is 0.
- Fix compilation errors and warnings with older versions of Visual Studio.
- Minor documentation updates.
v0.10.4 - 2020-04-12
- Fix a data conversion bug when converting from the client format to the native device format.
v0.10.3 - 2020-04-07
- Bring up to date with breaking changes to dr_mp3.
- Remove MA_NO_STDIO. This was causing compilation errors and the maintenance cost versus practical benefit is no longer worthwhile.
- Fix a bug with data conversion where it was unnecessarily converting to s16 or f32 and then straight back to the original format.
- Fix compilation errors and warnings with Visual Studio 2005.
- ALSA: Disable ALSA's automatic data conversion by default and add configuration options to the device config:
- alsa.noAutoFormat
- alsa.noAutoChannels
- alsa.noAutoResample
- WASAPI: Add some overrun recovery for ma_device_type_capture devices.
v0.10.2 - 2020-03-22
- Decorate some APIs with MA_API which were missed in the previous version.
- Fix a bug in ma_linear_resampler_set_rate() and ma_linear_resampler_set_rate_ratio().
v0.10.1 - 2020-03-17
- Add MA_API decoration. This can be customized by defining it before including miniaudio.h.
- Fix a bug where opening a file would return a success code when in fact it failed.
- Fix compilation errors with Visual Studio 6 and 2003.
- Fix warnings on macOS.
v0.10.0 - 2020-03-07
- API CHANGE: Refactor data conversion APIs
- ma_format_converter has been removed. Use ma_convert_pcm_frames_format() instead.
- ma_channel_router has been replaced with ma_channel_converter.
- ma_src has been replaced with ma_resampler
- ma_pcm_converter has been replaced with ma_data_converter
- API CHANGE: Add support for custom memory allocation callbacks. The following APIs have been updated to take an extra parameter for the allocation
callbacks:
- ma_malloc()
- ma_realloc()
- ma_free()
- ma_aligned_malloc()
- ma_aligned_free()
- ma_rb_init() / ma_rb_init_ex()
- ma_pcm_rb_init() / ma_pcm_rb_init_ex()
- API CHANGE: Simplify latency specification in device configurations. The bufferSizeInFrames and bufferSizeInMilliseconds parameters have been replaced with
periodSizeInFrames and periodSizeInMilliseconds respectively. The previous variables defined the size of the entire buffer, whereas the new ones define the
size of a period. The following APIs have been removed since they are no longer relevant:
- ma_get_default_buffer_size_in_milliseconds()
- ma_get_default_buffer_size_in_frames()
- API CHANGE: ma_device_set_stop_callback() has been removed. If you require a stop callback, you must now set it via the device config just like the data
callback.
- API CHANGE: The ma_sine_wave API has been replaced with ma_waveform. The following APIs have been removed:
- ma_sine_wave_init()
- ma_sine_wave_read_f32()
- ma_sine_wave_read_f32_ex()
- API CHANGE: ma_convert_frames() has been updated to take an extra parameter which is the size of the output buffer in PCM frames. Parameters have also been
reordered.
- API CHANGE: ma_convert_frames_ex() has been changed to take a pointer to a ma_data_converter_config object to specify the input and output formats to
convert between.
- API CHANGE: ma_calculate_frame_count_after_src() has been renamed to ma_calculate_frame_count_after_resampling().
- Add support for the following filters:
- Biquad (ma_biquad)
- First order low-pass (ma_lpf1)
- Second order low-pass (ma_lpf2)
- Low-pass with configurable order (ma_lpf)
- First order high-pass (ma_hpf1)
- Second order high-pass (ma_hpf2)
- High-pass with configurable order (ma_hpf)
- Second order band-pass (ma_bpf2)
- Band-pass with configurable order (ma_bpf)
- Second order peaking EQ (ma_peak2)
- Second order notching (ma_notch2)
- Second order low shelf (ma_loshelf2)
- Second order high shelf (ma_hishelf2)
- Add waveform generation API (ma_waveform) with support for the following:
- Sine
- Square
- Triangle
- Sawtooth
- Add noise generation API (ma_noise) with support for the following:
- White
- Pink
- Brownian
- Add encoding API (ma_encoder). This only supports outputting to WAV files via dr_wav.
- Add ma_result_description() which is used to retrieve a human readable description of a given result code.
- Result codes have been changed. Binding maintainers will need to update their result code constants.
- More meaningful result codes are now returned when a file fails to open.
- Internal functions have all been made static where possible.
- Fix potential crash when ma_device object's are not aligned to MA_SIMD_ALIGNMENT.
- Fix a bug in ma_decoder_get_length_in_pcm_frames() where it was returning the length based on the internal sample rate rather than the output sample rate.
- Fix bugs in some backends where the device is not drained properly in ma_device_stop().
- Improvements to documentation.
v0.9.10 - 2020-01-15
- Fix compilation errors due to #if/#endif mismatches.
- WASAPI: Fix a bug where automatic stream routing is being performed for devices that are initialized with an explicit device ID.
- iOS: Fix a crash on device uninitialization.
v0.9.9 - 2020-01-09
- Fix compilation errors with MinGW.
- Fix compilation errors when compiling on Apple platforms.
- WASAPI: Add support for disabling hardware offloading.
- WASAPI: Add support for disabling automatic stream routing.
- Core Audio: Fix bugs in the case where the internal device uses deinterleaved buffers.
- Core Audio: Add support for controlling the session category (AVAudioSessionCategory) and options (AVAudioSessionCategoryOptions).
- JACK: Fix bug where incorrect ports are connected.
v0.9.8 - 2019-10-07
- WASAPI: Fix a potential deadlock when starting a full-duplex device.
- WASAPI: Enable automatic resampling by default. Disable with config.wasapi.noAutoConvertSRC.
- Core Audio: Fix bugs with automatic stream routing.
- Add support for controlling whether or not the content of the output buffer passed in to the data callback is pre-initialized
to zero. By default it will be initialized to zero, but this can be changed by setting noPreZeroedOutputBuffer in the device
config. Setting noPreZeroedOutputBuffer to true will leave the contents undefined.
- Add support for clipping samples after the data callback has returned. This only applies when the playback sample format is
configured as ma_format_f32. If you are doing clipping yourself, you can disable this overhead by setting noClip to true in
the device config.
- Add support for master volume control for devices.
- Use ma_device_set_master_volume() to set the volume to a factor between 0 and 1, where 0 is silence and 1 is full volume.
- Use ma_device_set_master_volume_db() to set the volume in decibels where 0 is full volume and < 0 reduces the volume.
- Fix warnings emitted by GCC when `__inline__` is undefined or defined as nothing.
v0.9.7 - 2019-08-28
- Add support for loopback mode (WASAPI only).
- To use this, set the device type to ma_device_type_loopback, and then fill out the capture section of the device config.
- If you need to capture from a specific output device, set the capture device ID to that of a playback device.
- Fix a crash when an error is posted in ma_device_init().
- Fix a compilation error when compiling for ARM architectures.
- Fix a bug with the audio(4) backend where the device is incorrectly being opened in non-blocking mode.
- Fix memory leaks in the Core Audio backend.
- Minor refactoring to the WinMM, ALSA, PulseAudio, OSS, audio(4), sndio and null backends.
v0.9.6 - 2019-08-04
- Add support for loading decoders using a wchar_t string for file paths.
- Don't trigger an assert when ma_device_start() is called on a device that is already started. This will now log a warning
and return MA_INVALID_OPERATION. The same applies for ma_device_stop().
- Try fixing an issue with PulseAudio taking a long time to start playback.
- Fix a bug in ma_convert_frames() and ma_convert_frames_ex().
- Fix memory leaks in the WASAPI backend.
- Fix a compilation error with Visual Studio 2010.
v0.9.5 - 2019-05-21
- Add logging to ma_dlopen() and ma_dlsym().
- Add ma_decoder_get_length_in_pcm_frames().
- Fix a bug with capture on the OpenSL|ES backend.
- Fix a bug with the ALSA backend where a device would not restart after being stopped.
v0.9.4 - 2019-05-06
- Add support for C89. With this change, miniaudio should compile clean with GCC/Clang with "-std=c89 -ansi -pedantic" and
Microsoft compilers back to VC6. Other compilers should also work, but have not been tested.
v0.9.3 - 2019-04-19
- Fix compiler errors on GCC when compiling with -std=c99.
v0.9.2 - 2019-04-08
- Add support for per-context user data.
- Fix a potential bug with context configs.
- Fix some bugs with PulseAudio.
v0.9.1 - 2019-03-17
- Fix a bug where the output buffer is not getting zeroed out before calling the data callback. This happens when
the device is running in passthrough mode (not doing any data conversion).
- Fix an issue where the data callback is getting called too frequently on the WASAPI and DirectSound backends.
- Fix error on the UWP build.
- Fix a build error on Apple platforms.
v0.9 - 2019-03-06
- Rebranded to "miniaudio". All namespaces have been renamed from "mal" to "ma".
- API CHANGE: ma_device_init() and ma_device_config_init() have changed significantly:
- The device type, device ID and user data pointer have moved from ma_device_init() to the config.
- All variations of ma_device_config_init_*() have been removed in favor of just ma_device_config_init().
- ma_device_config_init() now takes only one parameter which is the device type. All other properties need
to be set on the returned object directly.
- The onDataCallback and onStopCallback members of ma_device_config have been renamed to "dataCallback"
and "stopCallback".
- The ID of the physical device is now split into two: one for the playback device and the other for the
capture device. This is required for full-duplex. These are named "pPlaybackDeviceID" and "pCaptureDeviceID".
- API CHANGE: The data callback has changed. It now uses a unified callback for all device types rather than
being separate for each. It now takes two pointers - one containing input data and the other output data. This
design in required for full-duplex. The return value is now void instead of the number of frames written. The