Commit Graph

774 Commits

Author SHA1 Message Date
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
David Reid a6cd93401d Version 0.10.30 2021-01-10 22:42:17 +10:00
David Reid 67863c48f3 Fix a crash in ma_audio_buffer_read_pcm_frames(). 2021-01-10 17:18:21 +10:00
David Reid 4f96309cbf Add experimental loop detection to the routing system. 2021-01-06 19:06:39 +10:00
David Reid 5478074840 Update revision history. 2021-01-03 18:23:43 +10:00
David Reid 816a5a34dd Add ma_offset_pcm_frames_{const_}ptr_f32.
This also silences a warning on GCC.
2021-01-03 18:08:29 +10:00
David Reid 8fc8d25bcd Qualify spinlock parameters as volatile. 2021-01-02 16:37:57 +10:00
David Reid d533bb4558 Update revision history. 2020-12-30 07:29:18 +10:00
Jérémy Masclaux 7b24f95fe0 Remove some warnings (warning C4100: unreferenced formal parameter) 2020-12-29 17:49:21 +01:00
David Reid 8f675e6c31 Version 0.10.29 2020-12-26 18:09:28 +10:00
David Reid 4e9becd5b3 Update dr_flac and dr_mp3. 2020-12-26 18:04:14 +10:00
David Reid daac3d3412 Update revision history. 2020-12-24 21:44:09 +10:00
David Reid 9cb1925c37 Fix a bug resulting in superfluous allocations with device enumeration.
Public issue https://github.com/mackron/miniaudio/issues/251
2020-12-24 21:19:31 +10:00
David Reid 18314d6afc Update revision history. 2020-12-22 21:12:50 +10:00
David Reid 10049067e7 Core Audio: Fix some compilation errors on iOS. 2020-12-22 17:59:05 +10:00
David Reid 5a8c88d129 Core Audio: Try fixing a possible re-routing bug.
Public issue https://github.com/mackron/miniaudio/issues/101
2020-12-22 17:25:59 +10:00
David Reid 1d0acd6a9c Update revision history. 2020-12-19 21:27:55 +10:00
David Reid bff79eb8c8 Fix some subtle multi-threading errors due to lacking atomic loads.
Public issue https://github.com/mackron/miniaudio/issues/237
2020-12-19 11:07:38 +10:00
David Reid db53994f7c Version 0.10.28 2020-12-16 20:39:26 +10:00
David Reid 101e811ead Minor clarification to documentation.
Public issue https://github.com/mackron/miniaudio/issues/247
2020-12-16 18:35:59 +10:00
David Reid ea6281fa93 Fix compilation errors with AAudio.
Public issue https://github.com/mackron/miniaudio/issues/247
2020-12-16 18:18:19 +10:00
David Reid 37cff3f075 Force runtime linking on AAudio for the moment.
Change of plans from the previous commit.
2020-12-15 21:53:21 +10:00
David Reid 4985c2e4cc AAudio: Add support for the MA_NO_RUNTIME_LINKING option. 2020-12-15 21:41:12 +10:00
David Reid 6c60953e9c Add support for MA_NO_RUNTIME_LINKING to the OpenSL backend.
Public issue https://github.com/mackron/miniaudio/issues/247
2020-12-15 19:44:43 +10:00
David Reid d9a95b08d8 Add some logging to context initialization.
Public issue https://github.com/mackron/miniaudio/issues/247
2020-12-15 18:32:21 +10:00
David Reid 21e7c4136a OpenSL: Add some extra logging to context initialization.
Public issue https://github.com/mackron/miniaudio/issues/247
2020-12-12 12:41:57 +10:00
David Reid 8c56989ed7 Update revision history. 2020-12-12 12:15:18 +10:00
David Reid a9c33d152e Fix a crash when initializing a POSIX thread.
Public issue https://github.com/mackron/miniaudio/issues/247
2020-12-12 12:14:14 +10:00
David Reid caad0bc436 Version 0.10.27 2020-12-04 20:21:29 +10:00
David Reid feb2abca94 Update c89atomic. 2020-12-04 19:31:14 +10:00
David Reid 06891a4f69 Update revision history. 2020-12-04 18:18:59 +10:00
David Reid 4cbe200b85 Use an atomic load on the master volume. 2020-12-04 18:07:11 +10:00
David Reid e8499f99bb Fix a typo in the previous commit. 2020-12-04 18:02:43 +10:00
David Reid 54ae032a11 Use atomics for getting/setting master volume.
Public issue https://github.com/mackron/miniaudio/issues/237
2020-12-04 17:56:44 +10:00
David Reid 2e23d86398 Update c89atomic. 2020-12-04 17:51:53 +10:00
David Reid ff53646549 Fix a typo. 2020-12-04 17:12:02 +10:00
David Reid ae9449cdba Update dr_mp3. 2020-12-03 17:49:14 +10:00
David Reid 40fbbdd02c Fix a bug in the decoder due to using an uninitialized variable. 2020-12-03 17:45:11 +10:00
David Reid 8669f2001e Update dr_mp3. 2020-12-02 19:20:06 +10:00
David Reid c4a07602c6 Update dr_wav. 2020-12-02 18:12:47 +10:00
David Reid 9ce20dc12c Silence some static analysis warnings. 2020-12-02 17:58:55 +10:00
David Reid 929e70a544 Fix some static analaysis warnings. 2020-12-02 17:43:23 +10:00