Commit Graph

205 Commits

Author SHA1 Message Date
David Reid cdfd219377 Clean up some old code. 2025-07-06 11:46:29 +10:00
David Reid ab76f7a27d Fix a typo. 2025-07-06 10:20:52 +10:00
David Reid 1ab91b05c0 Delete a duplicate example. 2025-03-05 14:58:59 +10:00
David Reid 569edb8436 Merge branch 'dev' into dev-0.12 2025-02-25 06:49:01 +10:00
David Reid 46d8abf3de Add teardown to custom_decoder_engine. 2025-02-25 06:48:34 +10:00
David Reid c5dda3c769 Merge branch 'dev' into dev-0.12 2025-02-24 16:35:53 +10:00
David Reid 2a79d124c1 Fix some bugs in the resource_manager_advanced example. 2025-02-24 12:39:42 +10:00
David Reid 17b8dbf948 Remove an invalid comment from some examples. 2025-02-24 10:03:21 +10:00
David Reid 7a250aa9f9 Merge branch 'dev' into dev-0.12 2025-02-23 12:55:40 +10:00
David Reid 8c52072f43 Remove const qualifiers from decoding backend vtable arrays. 2025-02-23 12:54:19 +10:00
David Reid 60c0b9eeba Merge branch 'dev' into dev-0.12 2025-02-22 13:09:30 +10:00
David Reid 1fbad32949 Stop using MINIAUDIO_IMPLEMENTATION in examples. 2025-02-22 13:09:11 +10:00
David Reid 3541d1b8cc Merge branch 'dev' into dev-0.12 2025-02-22 12:06:45 +10:00
David Reid c13504629e Minor update to custom_backend example. 2025-02-22 09:35:16 +10:00
David Reid 562b3483d1 Merge branch 'dev' into dev-0.12 2025-02-21 20:21:02 +10:00
David Reid e3151f2df1 Silence an unreachable code warning with MSVC. 2025-02-19 12:32:12 +10:00
David Reid 0ea924ae7a Merge branch 'dev' into dev-0.12 2025-02-19 12:09:13 +10:00
David Reid 8ad250ccf6 Updates to custom decoders. 2025-02-19 12:02:37 +10:00
David Reid eee86a0ae1 Fix the C++ build for some examples. 2025-02-19 08:28:01 +10:00
David Reid 724dac6af1 Fix compilation errors. 2025-02-18 18:26:07 +10:00
David Reid 391cca6e79 Merge branch 'dev' into dev-0.12 2025-02-18 18:03:01 +10:00
David Reid 46788d59a8 Rework the libvorbis and libopus custom decoders.
These decoders have been moved into their own subfolders under the
extras/decoders folder:

  extras/decoders/libvorbis
  extras/decoders/libopus

In addition to being relocated, they have also been split into separate
.c/h pairs. They now work like a more conventional library. The
implementation of these libraries have also been decoupled from the
miniaudio implementation which means they depend only on the header
section of miniaudio.h now.

With this change the custom_decoder and custom_decoder_engine examples
have been updated. To compile these you now need to link in the
miniaudio_libvorbis.c and miniaudio_libopus.c files via your build
tool. For your own code, you can still include the .c files directly
into your code if you want to compile as a single translation unit.
2025-02-17 16:57:47 +10:00
David Reid 01d6297bec Fix some warnings with some more examples. 2025-02-17 16:52:54 +10:00
David Reid de5f370d09 Fix some warnings with examples. 2025-02-17 16:01:19 +10:00
David Reid ca3ecd9086 Merge branch 'dev' into dev-0.12 2025-02-08 07:21:38 +10:00
David Reid fc905ec97f Add simple_spatialization example. 2025-01-11 18:42:34 +10:00
David Reid 33499941ae Merge branch 'dev' into dev-0.12 2025-01-11 17:03:23 +10:00
David Reid fcddfe6204 Update ma_pcm_rb data source implementation.
The data source implementation of a ma_pcm_rb could possibly return a
frame count of 0 which would in turn result in
ma_data_source_read_pcm_frames() returning MA_AT_END which does not
make sense for a ring buffer since it has no notion of an end.
2025-01-11 16:30:15 +10:00
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