Commit Graph

1015 Commits

Author SHA1 Message Date
David Reid 78a226107c Remove some old unused code. 2021-02-01 17:22:46 +10:00
David Reid bb63705a5a Revert an experimental fix for WASAPI automatic stream routing. 2021-02-01 17:22:17 +10:00
David Reid 56abb1100b Rename a badly named variable. 2021-01-31 18:13:35 +10:00
David Reid 2f46aaf126 Rename a callback. 2021-01-31 18:09:03 +10:00
David Reid 8a8917dfe9 Remove the "usingDefault*" members of ma_device. 2021-01-31 18:01:07 +10:00
David Reid 1c493d6fa4 More post-refactoring cleanup. 2021-01-31 17:58:08 +10:00
David Reid 6c74b309c9 Cleanup old backend callback stuff. 2021-01-31 17:40:31 +10:00
David Reid 81ab94685b sndio: Migrate over to the new backend callback system. 2021-01-31 17:13:36 +10:00
David Reid 7023f7e7fe audio4: Migrate over to the new backend callback system. 2021-01-31 16:28:15 +10:00
David Reid c68700baaf OSS: Migrate over to the new backend callback system. 2021-01-31 14:16:13 +10:00
David Reid 0809d8fa3b Minor refactoring for buffer size calculations. 2021-01-31 11:27:53 +10:00
David Reid b2d71b9a10 OpenSL: Fix compilation errors. 2021-01-31 10:20:12 +10:00
David Reid ddb8f845f7 AAudio: Migrate over to the new backend callback system. 2021-01-31 10:17:06 +10:00
David Reid 3391a4826f OpenSL: Migrate over to the new backend callback system. 2021-01-30 22:25:41 +10:00
David Reid 375b942ffd ALSA: Migrate over to the new backend callback system. 2021-01-30 20:14:00 +10:00
David Reid 154da2d6ed Merge branch 'dev' of https://github.com/mackron/miniaudio into dev 2021-01-30 15:21:12 +10:00
David Reid 4c594e325e Update revision history. 2021-01-30 15:21:03 +10:00
David Reid f8659b2a41 Core Audio: Migrate to the new backend callback system. 2021-01-30 13:37:27 +10:00
David Reid 1acbd524cc WASAPI: Fix a potential deadlock with exclusive + duplex mode. 2021-01-26 18:41:01 +10:00
David Reid e3536a1c25 Update revision history. 2021-01-26 18:28:35 +10:00
David Reid 3b3f60ab67 Yet another refactor to the PulseAudio backend.
Public issue https://github.com/mackron/miniaudio/issues/262
2021-01-26 14:30:27 +10:00
David Reid bb512a8fbe WASAPI: Fix a bug introduced in the previous commit.
This was resulting in a loop consuming 100% of the CPU.
2021-01-26 08:15:37 +10:00
David Reid ee2e769406 WASAPI: Another attempt at fixing exclusive mode.
Public issue https://github.com/mackron/miniaudio/issues/265
2021-01-26 07:46:36 +10:00
David Reid 47dccc520e iOS: Fix a compilation warning with MA_DEBUG_OUTPUT. 2021-01-25 21:21:41 +10:00
David Reid d6a56e40f0 iOS: A small change to the experimental fix from the previous commit. 2021-01-25 21:13:00 +10:00
David Reid 9ec3887479 iOS: Experiment with some improvements to automatic stream routing. 2021-01-25 21:04:43 +10:00
David Reid 09f2f9b827 Update logging messages for capture mode. 2021-01-25 20:37:30 +10:00
David Reid a74385a21b WASAPI: Try fixing a deadlock in exclusive mode.
Public issue https://github.com/mackron/miniaudio/issues/265
2021-01-25 19:21:45 +10:00
David Reid 1ceecebb57 WASAPI: Add some debug output for WASAPI and automatic stream routing.
Public issue https://github.com/mackron/miniaudio/issues/258
2021-01-25 18:58:54 +10:00
David Reid 565131e645 Add some internal functions for converting between radians and degrees.
These are in preparation for some spatialization functionality.
2021-01-25 14:02:20 +10:00
David Reid 14c1346dc1 Fix date on the revision history. 2021-01-25 07:51:05 +10:00
David Reid 3b3e18d8ec Add MA_FLT_MAX in preparation for some work on the high level API. 2021-01-24 17:42:07 +10:00
David Reid 48282d24fa Add a clarifying comment. 2021-01-24 16:53:34 +10:00
David Reid 8f494c411c Fix a bug where thread handles are not being freed. 2021-01-22 07:25:49 +10:00
David Reid 81a3b5d01f Update c89atomic. 2021-01-20 19:44:02 +10:00
David Reid d8c2135e0b Update to latest version of c89atomic. 2021-01-19 19:22:30 +10:00
David Reid 53512c39b7 Version 0.10.31 2021-01-17 21:40:01 +10:00
David Reid 3eb0f400e6 Add support for wide strings (wchar_t) to the resource manager. 2021-01-17 21:11:21 +10:00
David Reid 71b06a8908 Add some wchar_t string functions.
This is in preparation for some work coming to the upcoming resource
manager.
2021-01-17 20:35:09 +10:00
David Reid 045fd9e732 Update dr_libs. 2021-01-17 20:28:57 +10:00
David Reid 2e22affe38 Update ma_audio_buffer_ref_init() to take a buffer.
This saves a mandatory call to ma_audio_buffer_ref_set_data(). With
this change, an ma_audio_buffer_ref_init() call is all that is required
to initialize a usable data source.
2021-01-16 20:36:19 +10:00
David Reid 7c22845925 Rename ma_audio_buffer_ref_reset() to ma_audio_buffer_ref_set_data(). 2021-01-16 18:28:08 +10:00
David Reid d3d98ee3a2 Add ma_audio_buffer_ref.
This is a data source whose backing data is an application-controlled
pointer. No data is copied. It's a way of efficiently wrapping a raw
buffer and using it as a data source.
2021-01-16 17:51:50 +10:00
David Reid 2b761c3c7f Update revision history. 2021-01-14 20:24:07 +10:00
David Reid 1ac06d44b3 Fix documentation on new backend enabling macros.
Public issue https://github.com/mackron/miniaudio/issues/260
2021-01-14 19:57:26 +10:00
David Reid 422ef79240 Add support for enabling only specific backends at compile time.
This enables the ability to explicitly enable only the backends a
program is interested in. Essentially it's the reverse of the pre-
existing method whereby instead of disabling backends, all backends are
disabled by default, and then specific backends are enabled. Example:

    #define MA_ENABLE_ONLY_SPECIFIC_BACKENDS
    #define MA_ENABLE_WASAPI /* Only care about WASAPI on Windows. */
    #define MA_ENABLE_ALSA   /* Only care about ALSA on Linux. */

Note that even if MA_ENABLE_* is used, the backend will still only be
enabled if the compilation environment and target platform actually
supports it. You can therefore use the MA_ENABLE_* options without
needing to worry about platform detection.

Public issue https://github.com/mackron/miniaudio/issues/260
2021-01-14 19:54:12 +10:00
David Reid b16f74bf6b Update revision history. 2021-01-14 19:06:35 +10:00
David Reid 88fc453f5f Add the MA_ATOMIC annotation.
Variables are marked with this annotation to make it clear that access
to the variable should be done through atomics.

I've also review the use of volatile in this commit.

Public issue https://github.com/mackron/miniaudio/issues/259
2021-01-14 19:05:10 +10:00
David Reid 63df16a2df Add some safety checks when reading from data sources. 2021-01-13 22:44:08 +10:00
David Reid 1afec17bdb Make some functions const correct. 2021-01-12 20:03:56 +10:00