Commit Graph

177 Commits

Author SHA1 Message Date
David Reid f581a23f30 Fix a comment. 2024-03-01 09:35:01 +10:00
David Reid 5a0d1ad433 Merge branch 'dev' into dev-0.12 2024-03-01 08:37:16 +10:00
RainRat 030b9554c2 fix typos 2024-03-01 08:35:45 +10:00
David Reid f07c4cd3a1 Update engine_custom_decoder example. 2024-03-01 07:55:41 +10:00
David Reid d10a287f23 Rename custom_decoder_engine example to engine_custom_decoder.
This just makes it easier to find engine related examples in the
example list.
2024-03-01 07:30:08 +10:00
David Reid 61ec4b17c6 Update docs and add support for backend-specific userdata for decoders. 2024-03-01 07:06:54 +10:00
David Reid 8c2398b1ef Update the custom decoder example. 2024-02-29 16:01:27 +10:00
David Reid 9a6eefd4a8 Rename some variables in preparation for changes to decoding backends. 2024-02-29 15:35:37 +10:00
David Reid 5888bfadca Merge branch 'dev' into dev-0.12 2024-02-29 14:35:46 +10:00
David Reid 3bdf611768 Fix an invalid comment. 2024-02-29 14:30:48 +10:00
David Reid feea26496c Update Steam Audio example. 2024-02-28 17:17:13 +10:00
David Reid e3af234720 Silence a warning in the node graph example. 2024-02-28 08:15:13 +10:00
David Reid 5cb0c05675 Update Steam Audio example to work with latest version. 2024-02-28 08:10:34 +10:00
David Reid f01ce432be Merge branch 'dev' into dev-0.12 2024-02-25 09:37:21 +10:00
David Reid 766a155fb3 Stop using MA_ASSERT in examples.
This is useful because MA_ASSERT is only defined in the implementation
section of miniaudio.h which can cause issues when people copy/paste
the code and use it in a file that does not have visibility of the
implementation.

Note that there are still more references to implementation-defined
macros, but these have been moved to the public section in the dev-0.12
branch so I'm not bothering to change those just yet.

Public issue https://github.com/mackron/miniaudio/issues/787
2023-12-17 08:42:19 +10:00
David Reid 7ed8b8c5a5 Merge branch 'master' into dev-0.12 2023-11-04 07:07:28 +10:00
David Reid 537c4ca36c Update the simple_playback_sine example. 2023-09-05 06:48:49 +10:00
David Reid 7e01c6535b More work on custom device backends.
With this commit, custom backends can now be implemented as
self-contained modules that can easily be plugged in and mixed and
matched depending on a programs requirements. The order in which
custom backends are specified in the context config determine their
priority.

This commit updates the custom_backend example by moving the SDL
code out into its own file in "extras/backends/sdl". The example will
now just include the SDL code files like normal. This represents a more
realistic scenario.
2023-08-07 16:14:05 +10:00
David Reid 7266a1a6da Merge branch 'master' into dev-0.12 2023-08-07 11:06:21 +10:00
David Reid 810cdc2380 Improvements to Audio Worklets support for Web Audio.
Public issue https://github.com/mackron/miniaudio/issues/597
2023-08-05 17:02:26 +10:00
David Reid 04ab2a2d7b Merge branch 'dev' into dev-0.12 2023-05-27 15:45:00 +10:00
David Reid a8f3cb857e Fix compilation errors with MA_NO_DEVICE_IO. 2023-05-22 18:09:04 +10:00
David Reid 58166e2267 API CHANGE: Updates to custom backends.
Custom backends must now use the `ma_device_backend_vtable` object to
define their callbacks. All of these functions are largely the same,
except they all now take a `void*` as their first parameter which
represents the user data pointer.

The ma_backend_callbacks parameter has been removed from onContextInit
which means you must now statically define your callbacks in the
ma_device_backend_vtable object that you pass into the context config.

The `custom` member of the context config has been replaced with a new
set of members to support the ability to plug in multiple vtables.
2023-04-01 12:06:52 +10:00
David Reid 4cd066807b Add an example for high- and low-level interop.
This example captures data from the microphone using the low-level API
and then plays back the data through the engine. The intermediary data
source is a ring buffer.
2023-03-25 12:08:11 +10:00
David Reid 1f37940923 Minor improvement to the simple_playback_sine example. 2023-02-28 11:23:24 +10:00
David Reid 25885e4163 WebAudio: Add early experimental support for AudioWorklets.
Public issue https://github.com/mackron/miniaudio/issues/597.
2023-02-25 20:37:26 +10:00
cdigit 6de98570f6 Update duplex_effect.c 2023-01-14 10:33:24 +11:00
David Reid 034cc5f82a Fix engine_advanced example. 2022-10-02 13:20:29 +10:00
David Reid 9589a62f0c Fix example. 2022-01-20 17:20:26 +10:00
David Reid 3a3616e0ee Update Steam Audio example. 2022-01-03 16:37:16 +10:00
David Reid 7ee6d1d792 Add support for configuring the size of input caches in nodes.
This is important for fixed sized processing.
2022-01-01 21:31:06 +10:00
David Reid f3915423b6 Update the Steam Audio example. 2022-01-01 21:20:13 +10:00
David Reid cba36680bd Add support for fixed sized data callbacks.
This is the new default. The size of the buffer will be based on the
periodSizeInFrames and periodSizeInMilliseconds config variable. To go
back to the previous system, where the data callback could specify any
number of frames, set the noFixedSizedCallback config variable to true.
2022-01-01 21:14:22 +10:00
David Reid 2ad40dc7da Minor rewording and fix a typo. 2022-01-01 16:25:36 +10:00
David Reid a0b4e7824b Update comment. 2022-01-01 13:32:14 +10:00
David Reid 153b2ebd48 Add example for using the engine with SDL. 2022-01-01 13:21:30 +10:00
David Reid cf024cb71f Fix an error in the simple_mixing example.
Public issue https://github.com/mackron/miniaudio/issues/388
2022-01-01 07:42:42 +10:00
David Reid 98282df3f8 Add engine_steamaudio example. 2021-12-27 20:55:16 +10:00
David Reid 3344df4f1c Minor updates to example description. 2021-12-18 18:15:21 +10:00
David Reid bb0d5506de Add an example for using effects with the engine. 2021-12-18 13:17:18 +10:00
David Reid fdc43c4c95 Minor updates to examples. 2021-12-18 13:14:57 +10:00
David Reid 0704e1fd24 Add a diagram for the node graph to documentation. 2021-12-15 19:41:55 +10:00
David Reid 13b905ca64 Add node graph example. 2021-12-15 18:10:43 +10:00
David Reid 9598247096 Remove old files and update examples. 2021-12-10 21:13:34 +10:00
David Reid dc912eb123 Fix some examples. 2021-12-10 07:03:25 +10:00
David Reid efa95d998f Remove the loop parameter from ma_data_source_read_pcm_frames(). 2021-10-13 18:51:17 +10:00
David Reid d177cb5e60 Update readme. 2021-08-14 19:18:26 +10:00
David Reid 2671e07560 Add examples for the high level API. 2021-08-14 18:41:26 +10:00
David Reid 369d3b8df7 Fix compilation errors with examples. 2021-07-31 10:22:20 +10:00
David Reid ce86d63181 Update simple_loopback example. 2021-07-28 17:34:54 +10:00