Commit Graph

2204 Commits

Author SHA1 Message Date
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 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
David Reid 7cb349fc60 audio(4): Refactoring for the new backend architecture. 2025-12-24 19:16:39 +10:00
David Reid 8c735da4eb OSS: Refactoring for the new backend architecture. 2025-12-24 17:43:20 +10:00
David Reid a2c7e697d1 ALSA: Refactoring for the new backend architecture. 2025-12-24 14:35:06 +10:00
David Reid 61fd14955a PulseAudio: Minor restructure in preparation for the new backend system. 2025-12-24 06:31:40 +10:00
David Reid 5eafc0e9c1 Merge branch 'dev' into dev-0.12 2025-12-23 19:07:52 +10:00
David Reid 364844231d Fix an bug with error recovery when failing to initialize a decoder.
Public issue https://github.com/mackron/miniaudio/issues/1080
2025-12-23 19:04:53 +10:00
David Reid 631bc047d8 Minor C89 compatibility fix. 2025-12-23 14:47:48 +10:00
David Reid bd35758b87 AAudio: Try fixing a glitch when starting a device.
This is only happening when the device is started after being stopped.
The initial start does not glitch.
2025-12-23 13:08:39 +10:00
David Reid 737fb79aae AAudio: Simplify device rerouting.
This now does rerouting in the step which runs on the audio thread,
which is the same thread that init, uininit, start and stop runs on, and
no longer goes through the job system.
2025-12-23 10:17:38 +10:00
David Reid fd6ee4711b Generalize some backend stepping logic for the new backend architecture. 2025-12-22 17:10:03 +10:00
David Reid e6922b360c Minor refactor the AAudio backend. 2025-12-22 13:41:37 +10:00
David Reid 1bb2180005 Minor refactor the OpenSL backend. 2025-12-22 11:50:53 +10:00
David Reid e598eb7fe6 Minor refactor to the null backend. 2025-12-22 11:50:44 +10:00
David Reid ad7084c9ef SDL2: Add wakeup callback. 2025-12-20 18:21:31 +10:00
David Reid d6487d0569 Make ma_blocking_mode public in preparation for some changes. 2025-12-17 07:34:51 +10:00
David Reid 6931d7d159 Cleanup. 2025-12-17 07:34:31 +10:00
David Reid 38a543caa4 Try fixing some glitching with the AAudio backend. 2025-12-17 06:46:50 +10:00
David Reid 60d757a226 Return result codes from step/wait/loop callbacks. 2025-12-16 18:08:32 +10:00
David Reid df79b33aeb Update the JACK backend to the new backend architecture. 2025-12-16 18:02:13 +10:00
David Reid 9d2c943862 Update OpenSL backend to the new backend architecture. 2025-12-14 17:34:07 +10:00
David Reid 4151c05973 Update AAudio backend to the new backend architecture. 2025-12-14 16:08:44 +10:00
David Reid 442e9f4db8 Merge branch 'dev' into dev-0.12 2025-12-14 06:48:16 +10:00
David Reid 9ea38e9f3a Update dr_wav and dr_flac. 2025-12-14 06:38:32 +10:00
David Reid af19bdb6ff Fix a bug where MA_NO_DECODING would disable the WAV encoder.
Public issue https://github.com/mackron/miniaudio/issues/1076
2025-12-13 17:26:06 +10:00
David Reid 0c41e62827 Make timing functions public for the benefit of custom backends. 2025-12-04 08:52:17 +10:00
David Reid 2f759f7b62 Convert the SDL2 backend to the new backend architecture. 2025-12-01 10:46:59 +10:00
David Reid 97441567fa Fix a typo. 2025-12-01 05:58:55 +10:00
David Reid 248f27b6e2 Remove an unnecessary comment. 2025-11-30 19:47:50 +10:00
David Reid 1c5e2400ce Fix an error when stopping a device.
Public issue https://github.com/mackron/miniaudio/pull/1055
2025-11-30 06:34:04 +10:00
Guillaume Prieur 1f717d6ba7 Remove object references in coreaudio context state that are for apple desktop only in other builds 2025-11-30 06:02:48 +10:00
Guillaume Prieur b41a7eabe7 Add missing result declaration 2025-11-30 06:02:10 +10:00
David Reid 477020295a Merge branch 'dev' into dev-0.12 2025-11-30 06:01:16 +10:00
David Reid 8c1dc255db Remove Cosmopolitan pre-processing checks.
https://github.com/mackron/miniaudio/pull/1070
2025-11-30 05:39:49 +10:00
Louis du Verdier 6d65be5e0e Do not set POSIX thread scheduler policy on systems reporting that they do not support it 2025-11-29 14:20:45 +10:00