Skip to content

Commit

Permalink
all: update to miniaudio v0.11.11 @ c153a94
Browse files Browse the repository at this point in the history
  • Loading branch information
larpon committed Jan 9, 2023
1 parent 053dd36 commit ebb1437
Show file tree
Hide file tree
Showing 9 changed files with 2,598 additions and 843 deletions.
34 changes: 34 additions & 0 deletions c/miniaudio/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
v0.11.11 - 2022-11-04
=====================
* Silence an unused variable warning.
* Remove references to ccall() from the Empscripten build.
* Improve Android detection.
* WASAPI: Some minor improvements to overrun recovery for capture and duplex modes.


v0.11.10 - 2022-10-20
=====================
* Add support for setting the device notification callback when initializing an engine object.
* Add support for more than 2 outputs to splitter nodes.
* Fix a crash when initializing a channel converter.
* Fix a channel mapping error where weights are calculated incorrectly.
* Fix an unaligned access error.
* Fix logging with the C++ build.
* Fix some undefined behavior errors, including some memset()'s to null pointers of 0 bytes.
* Fix logging of device info for loopback devices.
* WASAPI: Fix an error where 32-bit formats are not properly detected.
* WASAPI: Fix a bug where the device is not drained when stopped.
* WASAPI: Fix an issue with loopback mode that results in waiting indefinitely and the callback never getting fired.
* WASAPI: Add support for the Avrt API to specify the audio thread's latency sensitivity requirements. Use the `deviceConfig.wasapi.usage` configuration option.
* PulseAudio: Pass the requested sample rate, if set, to PulseAudio so that it uses the requested sample rate internally rather than always using miniaudio's resampler.
* PulseAudio: Fix a rare null pointer dereference.
* ALSA: Fix a potential crash on older versions of Linux.
* Core Audio: Fix a very unlikely memory leak.
* Core Audio: Update a deprecated symbol.
* AAudio: Fix an error where the wrong tokens are being used for usage, content types and input preset hints.
* WebAudio: Do some cleanup of the internal global JavaScript object when the last context has been uninitialized.
* Win32: Fix an error when the channel mask reported by Windows is all zero.
* Various documentation fixes.
* Bring dr_wav, dr_flac and dr_mp3 up-to-date with latest versions.


v0.11.9 - 2022-04-20
====================
* Fix some bugs where looping doesn't work with the resource manager.
Expand Down
12 changes: 6 additions & 6 deletions c/miniaudio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
<h4 align="center">A single file library for audio playback and capture.</h4>

<p align="center">
<a href="https://discord.gg/9vpqbjU"><img src="https://img.shields.io/discord/712952679415939085?label=discord&logo=discord" alt="discord"></a>
<a href="https://twitter.com/mackron"><img src="https://img.shields.io/twitter/follow/mackron?style=flat&label=twitter&color=1da1f2&logo=twitter" alt="twitter"></a>
<a href="https://www.reddit.com/r/miniaudio"><img src="https://img.shields.io/reddit/subreddit-subscribers/miniaudio?label=r%2Fminiaudio&logo=reddit" alt="reddit"></a>
<a href="https://discord.gg/9vpqbjU"><img src="https://img.shields.io/discord/712952679415939085?label=discord&logo=discord&style=flat-square" alt="discord"></a>
<a href="https://fosstodon.org/@mackron"><img src="https://img.shields.io/mastodon/follow/109293691403797709?color=blue&domain=https%3A%2F%2Ffosstodon.org&label=mastodon&logo=mastodon&style=flat-square" alt="mastodon"></a>
<a href="https://www.reddit.com/r/miniaudio"><img src="https://img.shields.io/reddit/subreddit-subscribers/miniaudio?label=r%2Fminiaudio&logo=reddit&style=flat-square" alt="reddit"></a>
<a href="https://twitter.com/mackron"><img src="https://img.shields.io/twitter/follow/mackron?label=twitter&color=1da1f2&logo=twitter&style=flat-square" alt="twitter"></a>
</p>

<p align="center">
Expand All @@ -17,8 +18,7 @@
<a href="#supported-platforms">Supported Platforms</a> -
<a href="#backends">Backends</a> -
<a href="#major-features">Major Features</a> -
<a href="#building">Building</a> -
<a href="#unofficial-bindings">Unofficial Bindings</a>
<a href="#building">Building</a>
</p>

Examples
Expand Down Expand Up @@ -74,7 +74,7 @@ void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uin
return;
}
ma_decoder_read_pcm_frames(pDecoder, pOutput, frameCount);
ma_decoder_read_pcm_frames(pDecoder, pOutput, frameCount, NULL);
(void)pInput;
}
Expand Down
3 changes: 3 additions & 0 deletions c/miniaudio/examples/engine_advanced.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,9 @@ int main(int argc, char** argv)
ma_device_uninit(&devices[iEngine]);
}

/* The context can only be uninitialized after the devices. */
ma_context_uninit(&context);

/*
Do the resource manager last. This way we can guarantee the data callbacks of each device aren't trying to access
and data managed by the resource manager.
Expand Down
4 changes: 2 additions & 2 deletions c/miniaudio/extras/miniaudio_libopus.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,9 @@ MA_API ma_result ma_libopus_read_pcm_frames(ma_libopus* pOpus, void* pFramesOut,
}

if (format == ma_format_f32) {
libopusResult = op_read_float(pOpus->of, ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, format, channels), framesToRead * channels, NULL);
libopusResult = op_read_float(pOpus->of, (float*)ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, format, channels), framesToRead * channels, NULL);
} else {
libopusResult = op_read (pOpus->of, ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, format, channels), framesToRead * channels, NULL);
libopusResult = op_read (pOpus->of, (opus_int16*)ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, format, channels), framesToRead * channels, NULL);
}

if (libopusResult < 0) {
Expand Down
Loading

0 comments on commit ebb1437

Please sign in to comment.