Commit Graph

2273 Commits

Author SHA1 Message Date
David Reid 5c0724ad59 Fix an extremely unlikely bug with the resource manager.
This checks the result of reading from the decoder when asynchronously
loading a file. In practice the existing check already covers this, but
it's technically possible for an error result the be skipped over.
2025-02-23 14:20:16 +10:00
David Reid c3b0a7fbbc Fix a bug in ma_decoder_read_pcm_frames().
This will abort reading early if the underlying data source returns an
error.
2025-02-23 14:14:23 +10:00
David Reid e4363a90be Fix a channel mapping bug.
Thanks to the Clang static analyzer for this one!
2025-02-23 14:03:34 +10:00
David Reid 6453c9ff22 AAudio: Remove some duplicate code. 2025-02-23 13:46:19 +10:00
David Reid e79e35a5ef Fix compilation errors. 2025-02-23 13:08:56 +10:00
David Reid 7a250aa9f9 Merge branch 'dev' into dev-0.12 2025-02-23 12:55:40 +10:00
David Reid 8c52072f43 Remove const qualifiers from decoding backend vtable arrays. 2025-02-23 12:54:19 +10:00
David Reid 166fd6dfc7 Silence some static analysis warnings. 2025-02-23 12:03:22 +10:00
David Reid 54373128ee Fix a subtle undefined behaviour error. 2025-02-23 11:49:31 +10:00
David Reid c74c90f686 Minor comment changes. 2025-02-23 11:35:26 +10:00
David Reid 01302b9715 Fix a parameter order error.
This did not affect functionality at all because the implementation of
the relevant function is just a simple bitwise OR.
2025-02-23 09:34:48 +10:00
David Reid b5f1ff125e Update documentation for ma_context_get_devices(). 2025-02-23 09:31:52 +10:00
znakeeye 7a1135d448 Goto label placed outside braces for C compliance. 2025-02-23 09:25:16 +10:00
znakeeye 9f9fc2333e Improved synchronization for AAudio rerouting. This should fix the crash observed in ma_device_init__aaudio (when re-routing). 2025-02-23 09:25:16 +10:00
David Reid 3541d1b8cc Merge branch 'dev' into dev-0.12 2025-02-22 12:06:45 +10:00
David Reid 3fd7c9f199 Fix a bug when no data callback is specified in the device config.
Public issue https://github.com/mackron/miniaudio/issues/893
2025-02-22 10:14:04 +10:00
David Reid 31c0159ad3 Fix a bug with the resource manager and custom decoders. 2025-02-21 20:21:44 +10:00
David Reid 562b3483d1 Merge branch 'dev' into dev-0.12 2025-02-21 20:21:02 +10:00
David Reid 57fbc6dd36 WASAPI: Uninitialize a mutex in device uninitialization. 2025-02-21 10:30:22 +10:00
David Reid 178797502e Remove an unnecessary cast. 2025-02-21 08:48:05 +10:00
David Reid 0576191d7d Fix a compilation error with the last commit. 2025-02-21 08:26:52 +10:00
David Reid 6bc3fec34e Try fixing a const-correctness error. 2025-02-21 07:39:16 +10:00
David Reid 2542be5db8 Merge remote-tracking branch 'origin/dev' into dev 2025-02-20 17:46:38 +10:00
David Reid 67d1aca341 iOS: Try fixing an initialization error with capture devices.
Public issue https://github.com/mackron/miniaudio/issues/868
2025-02-20 17:43:40 +10:00
David Reid 08d6d1fac0 Fix a pedantic warning with Clang. 2025-02-20 12:04:16 +10:00
David Reid 0ea924ae7a Merge branch 'dev' into dev-0.12 2025-02-19 12:09:13 +10:00
David Reid 8ad250ccf6 Updates to custom decoders. 2025-02-19 12:02:37 +10:00
David Reid 466a1354ce Experiment with a fix for older versions of Clang. 2025-02-19 10:30:09 +10:00
David Reid 724dac6af1 Fix compilation errors. 2025-02-18 18:26:07 +10:00
David Reid 391cca6e79 Merge branch 'dev' into dev-0.12 2025-02-18 18:03:01 +10:00
David Reid 62d64d14bd Fix an error with band-pass filters. 2025-02-18 17:26:53 +10:00
David Reid 445cdcb82b AAudio: Fix a possible compilation error on older SDKs. 2025-02-17 10:28:43 +10:00
David Reid 34092dbfc8 Fix an unused parameter warning. 2025-02-17 09:44:09 +10:00
David Reid 14b986448f Minor change to ma_calculate_buffer_size_in_milliseconds_from_frames(). 2025-02-17 09:36:50 +10:00
David Reid a6ac898663 Minor adjustment to a calculation. 2025-02-17 09:30:40 +10:00
Andrew Opalach 017f8944d3 WASAPI: Release mapped buffer before stopping device 2025-02-17 09:24:59 +10:00
Andrew Opalach e15fd218be WASAPI: Fix drain on device stop 2025-02-17 09:24:59 +10:00
David Reid 4c7021e53d WASAPI: Fix an error when stopping a device. 2025-02-16 17:44:21 +10:00
David Reid 856494d253 Update docs for missing build options.
Public issue https://github.com/mackron/miniaudio/issues/942
2025-02-16 15:45:56 +10:00
David Reid a0aac6b5ec Remove reference to MA_HAS_OPUS. 2025-02-16 15:17:37 +10:00
David Reid 60c7c776b4 PulseAudio: Fix a possible race condition with device init. 2025-02-16 14:59:16 +10:00
David Reid 125e9226fb Fix an error with ma_sound processing. 2025-02-16 13:18:52 +10:00
David Reid 4deb3d4c6a Remove a stray space. 2025-02-16 13:17:52 +10:00
David Reid 3ffdbdc710 Add miniaudio.c.
This is in preparation for splitting miniaudio into a split .c/h pair,
away from a single header.

`MINIAUDIO_IMPLEMENTATION` is still supported, but will be removed in
version 0.12 and should be considered deprecated. It's recommended to
start the transition to the new .c file.
2025-02-16 10:30:00 +10:00
David Reid 9b9e71ab6c PulseAudio: Fix an error with the construction of the stream name. 2025-02-13 11:15:32 +10:00
znakeeye f39bbe2f4d Revert "Fix for NDK issue 360. dlclose() skipped pre-API 28. This fixes weird crashes during uninit."
This reverts commit 14f698fcf2.
2025-02-13 07:49:22 +10:00
znakeeye 79bb4d7a37 Improved fix for dlclose() bug on Android. Now applying fix for all backends on Android < 28. 2025-02-13 07:49:22 +10:00
znakeeye f970144a3d Fix for NDK issue 360. dlclose() skipped pre-API 28. This fixes weird crashes during uninit. 2025-02-13 07:49:22 +10:00
znakeeye afc7e17fe6 Added MA_NO_RUNTIME_LINKING support for AAudio backend. 2025-02-13 07:49:22 +10:00
David Reid ca3ecd9086 Merge branch 'dev' into dev-0.12 2025-02-08 07:21:38 +10:00