Commit Graph

4253 Commits

Author SHA1 Message Date
David Reid e78a86d30b Cleanup of the CMake script. 2026-01-02 15:50:15 +10:00
David Reid 46b2cdd0cf Improve SDL2 integration in the CMake script. 2026-01-02 14:44:26 +10:00
David Reid ce41f6cfc9 SDL2: Fix a compilation error due.
This is due to calling an internal miniaudio function.
2026-01-02 14:14:10 +10:00
David Reid da764a5a28 PipeWire: Fix an error when runtime linking is disabled. 2026-01-02 12:34:42 +10:00
David Reid e9fad62f44 Improve default device enumeration with the SDL2 backend. 2026-01-01 19:36:37 +10:00
David Reid d0392288c4 Remove an old device job thread object.
This was used by AAudio for dealing with rerouting, but with the new
backend architecture it is no longer needed.
2026-01-01 19:04:49 +10:00
David Reid a5ef023cee Remove some global variables.
These are replaced by functions. The problem is that declaring a
variable as MA_API will result in errors when it's declared as static.
2026-01-01 18:39:43 +10:00
David Reid 45c7a64299 Add support for device selection the deviceio test. 2026-01-01 15:58:37 +10:00
David Reid 1d308f69bc Add a basic single-threaded test to deviceio test. 2026-01-01 14:52:01 +10:00
David Reid db6bc371eb WebAudio: Remove dependency on -sASYNCIFY for the Audio Worklets path.
Public issue https://github.com/mackron/miniaudio/issues/863
2026-01-01 13:10:15 +10:00
David Reid 1f2e59548b Web Audio: Minor change for multi-threaded mode. 2026-01-01 10:47:39 +10:00
David Reid edc44cbcaa PipeWire: Optimization to multi-threaded mode. 2026-01-01 09:38:21 +10:00
David Reid 1d0a598485 Rename MA_THREADING_MODE_MULTITHREADED.
This not having an underscore while SINGLE_THREADED did was driving me
crazy.
2026-01-01 09:19:43 +10:00
David Reid ff9ff16341 CMake: Remove is_backend_enabled()
This is no longer necessary since we can just use MINIAUDIO_NO_[BACKEND]
as the standard way to check if a backend is enabled.
2025-12-31 20:25:11 +10:00
David Reid 7cbb204abb CMake: Experiment to make it easier to check if a backend is enabled. 2025-12-31 20:17:46 +10:00
David Reid 0e6eaae06b CMake: Don't compile the the PipeWire backend if device IO is disabled. 2025-12-31 19:34:58 +10:00
David Reid c6429bb866 Try fixing a CMake error. 2025-12-31 19:24:16 +10:00
David Reid 552cf613b3 PipeWire: Add support for disabling runtime linking. 2025-12-31 18:19:52 +10:00
David Reid 114b9594c1 PipeWire: Finish work on removing the SPA dependency. 2025-12-31 18:18:17 +10:00
David Reid e1dfc9d77f PipeWire: Remove dependency on spa_format_audio_raw_parse(). 2025-12-31 13:30:49 +10:00
David Reid d2a93567df PipeWire: Remove dependency on spa_pod_builder. 2025-12-31 09:04:00 +10:00
David Reid c67b29de38 PipeWire: More work on removing the SPA dependency. 2025-12-30 18:00:07 +10:00
David Reid 9ebc3efa95 PipeWire: First tentative step towards removing the SPA dependency. 2025-12-30 16:40:16 +10:00
David Reid e086de4eb3 Web Audio: Get single-threaded mode working to spec. 2025-12-30 14:54:36 +10:00
David Reid 07af5ea6f7 Remove an unnecessary function.
The naming of this function is now a bit misleading with the new changes
to the backend system.
2025-12-30 10:32:09 +10:00
David Reid f073a40a1c Fix some warnings for the PipeWire backend. 2025-12-30 10:18:56 +10:00
David Reid d04c1985d6 Fix an error with the Web Audio backend. 2025-12-30 10:13:44 +10:00
David Reid cc4db76c26 Minor update to documentation for the single-threaded example. 2025-12-30 09:32:11 +10:00
David Reid a16756ec3b Add an example for single-threaded mode. 2025-12-30 09:26:38 +10:00
David Reid 350cc0be1f Fix a bug with starting and stopping a device in single-threaded mode. 2025-12-30 09:25:37 +10:00
David Reid 7483e55aee Add ma_device_get_threading_mode(). 2025-12-29 19:39:29 +10:00
David Reid 0f4bc3ca9a Add support for configuring the threading mode for a device. 2025-12-29 19:12:34 +10:00
David Reid b0894c34b1 Add ma_device_step() in preparation for single-threaded mode. 2025-12-29 19:02:18 +10:00
David Reid fa2c1b49b3 Remove unused callbacks from the device backend system. 2025-12-29 18:02:51 +10:00
David Reid 3d79043d7d WASAPI: Move thread characteristic stuff from start/stop to init/uninit.
All audio functions now run from the same thread, so this feels like a
more appropriate location for these functions to me.
2025-12-29 15:43:27 +10:00
David Reid 9df9b19a59 WASAPI: Refactoring of the device rerouting system.
This now performs rerouting from the step callback which is always done
from the main thread. This should address issues relating to COM
initialization and some rerouting race conditions.

There is a very slight change in behaviour here. Previously when a
device is detached (such as headphones being unplugged), the device
would actually be stopped proper, but now it is no longer stopped and
the stop notification is not fired when the device is deactivated.
2025-12-29 15:32:23 +10:00
David Reid d72811c127 WASAPI: Remove some unnecessary variables. 2025-12-29 10:35:00 +10:00
David Reid aaf868f92a WASAPI: Refactoring for the new backend architecture. 2025-12-29 10:31:25 +10:00
David Reid d0b8b07c49 DirectSound: Refactoring for the new backend architecture. 2025-12-28 19:55:59 +10:00
David Reid a4406088f4 WinMM: Refactoring for the new backend architecture. 2025-12-28 11:07:55 +10:00
David Reid c6d44b67e1 PulseAudio: Stop firing the stop callback in response to a suspension. 2025-12-26 19:26:43 +10:00
David Reid 521c224b02 JACK: Stop double-posting the stop callback. 2025-12-26 19:16:55 +10:00
David Reid 5d1c089d15 OpenSL: Stop double-posting the stop callback. 2025-12-26 19:16:43 +10:00
David Reid f270f515e4 AAudio: Stop double-posting the stop callback. 2025-12-26 19:15:03 +10:00
David Reid d10526fb3a Core Audio: Stop double-posting stop callbacks. 2025-12-26 19:04:10 +10:00
David Reid ef59b93a4d Fix a bug with asynchronous style backends.
This was resulting in glitching in duplex mode when internal sample
rates differ.
2025-12-26 18:36:11 +10:00
David Reid b6799e92e0 Update gitignore. 2025-12-26 12:03:50 +10:00
David Reid f932077982 Core Audio: Refactoring for the new backend architecture. 2025-12-26 12:02:57 +10:00
David Reid 5296384289 ALSA: Fix an error with non-blocking mode. 2025-12-25 11:29:10 +10:00
David Reid 4cb0851ccc sndio: Refactoring for the new backend architecture. 2025-12-25 11:28:14 +10:00