diff --git a/README.md b/README.md index fe107e50..8453a75b 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ Simple Playback Example #define DR_WAV_IMPLEMENTATION #include "../extras/dr_wav.h" // Enables WAV decoding. -#define MAL_IMPLEMENTATION +#define MINI_AL_IMPLEMENTATION #include "../mini_al.h" #include @@ -146,7 +146,7 @@ relevant backend library before the implementation of mini_al, like so: #include "dr_mp3.h" // Enables MP3 decoding. #include "dr_wav.h" // Enables WAV decoding. -#define MAL_IMPLEMENTATION +#define MINI_AL_IMPLEMENTATION #include "mini_al.h" ``` diff --git a/examples/advanced_config.c b/examples/advanced_config.c index 142325e9..75913e5a 100644 --- a/examples/advanced_config.c +++ b/examples/advanced_config.c @@ -1,4 +1,4 @@ -#define MAL_IMPLEMENTATION +#define MINI_AL_IMPLEMENTATION #include "../mini_al.h" #include diff --git a/examples/simple_capture.c b/examples/simple_capture.c index 9bffd066..a16357da 100644 --- a/examples/simple_capture.c +++ b/examples/simple_capture.c @@ -1,7 +1,7 @@ // This example simply captures data from your default microphone until you press Enter, after // which it plays back the captured audio. -#define MAL_IMPLEMENTATION +#define MINI_AL_IMPLEMENTATION #include "../mini_al.h" #include diff --git a/examples/simple_enumeration.c b/examples/simple_enumeration.c index e6769e13..f38a4040 100644 --- a/examples/simple_enumeration.c +++ b/examples/simple_enumeration.c @@ -1,4 +1,4 @@ -#define MAL_IMPLEMENTATION +#define MINI_AL_IMPLEMENTATION #include "../mini_al.h" #include diff --git a/examples/simple_playback.c b/examples/simple_playback.c index adfb62ad..97760b37 100644 --- a/examples/simple_playback.c +++ b/examples/simple_playback.c @@ -5,7 +5,7 @@ #define DR_WAV_IMPLEMENTATION #include "../extras/dr_wav.h" // Enables WAV decoding. -#define MAL_IMPLEMENTATION +#define MINI_AL_IMPLEMENTATION #include "../mini_al.h" #include diff --git a/examples/simple_playback_emscripten.c b/examples/simple_playback_emscripten.c index 156a1df0..917bf511 100644 --- a/examples/simple_playback_emscripten.c +++ b/examples/simple_playback_emscripten.c @@ -1,4 +1,4 @@ -#define MAL_IMPLEMENTATION +#define MINI_AL_IMPLEMENTATION #include "../mini_al.h" #include diff --git a/mini_al.h b/mini_al.h index 526dc8e5..f63675a1 100644 --- a/mini_al.h +++ b/mini_al.h @@ -38,7 +38,7 @@ // USAGE // ===== // mini_al is a single-file library. To use it, do something like the following in one .c file. -// #define MAL_IMPLEMENTATION +// #define MINI_AL_IMPLEMENTATION // #include "mini_al.h" // // You can then #include this file in other parts of the program as you would with any other header file. @@ -2390,7 +2390,7 @@ mal_uint64 mal_sine_wave_read(mal_sine_wave* pSignWave, mal_uint64 count, float* // /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -#ifdef MAL_IMPLEMENTATION +#if defined(MINI_AL_IMPLEMENTATION) || defined(MAL_IMPLEMENTATION) #include #include // For INT_MAX #include // sin(), etc. @@ -22378,13 +22378,15 @@ mal_uint64 mal_sine_wave_read(mal_sine_wave* pSineWave, mal_uint64 count, float* } -#endif // MAL_IMPLEMENTATION +#endif // MINI_AL_IMPLEMENTATION // REVISION HISTORY // ================ // // v0.x - 2018-xx-xx +// - Changed MAL_IMPLEMENTATION to MINI_AL_IMPLEMENTATION for consistency with other libraries. The old +// way is still supported for now, but you should update as it may be removed in the future. // - API CHANGE: Replace device enumeration APIs. mal_enumerate_devices() has been replaced with // mal_context_get_devices(). An additional low-level device enumration API has been introduced called // mal_context_enumerate_devices() which uses a callback to report devices. diff --git a/tests/mal_dithering.c b/tests/mal_dithering.c index 918f73bc..d3a6f0a5 100644 --- a/tests/mal_dithering.c +++ b/tests/mal_dithering.c @@ -1,5 +1,5 @@ #define MAL_USE_REFERENCE_CONVERSION_APIS -#define MAL_IMPLEMENTATION +#define MINI_AL_IMPLEMENTATION #include "../mini_al.h" // Two converters are needed here. One for converting f32 samples from the sine wave generator to the input format, diff --git a/tests/mal_profiling.c b/tests/mal_profiling.c index 4f5dad2e..08938c80 100644 --- a/tests/mal_profiling.c +++ b/tests/mal_profiling.c @@ -1,4 +1,4 @@ -#define MAL_IMPLEMENTATION +#define MINI_AL_IMPLEMENTATION #include "../mini_al.h" float g_ChannelRouterProfilingOutputBenchmark[8][48000]; diff --git a/tests/mal_test_0.c b/tests/mal_test_0.c index 3c3244fb..bcb6becf 100644 --- a/tests/mal_test_0.c +++ b/tests/mal_test_0.c @@ -10,7 +10,7 @@ #include "../extras/stb_vorbis.c" #endif -#define MAL_IMPLEMENTATION +#define MINI_AL_IMPLEMENTATION #include "../mini_al.h" #ifdef __EMSCRIPTEN__ diff --git a/tools/mini_sigvis/mini_sigvis.h b/tools/mini_sigvis/mini_sigvis.h index fd0b9cae..f4459074 100644 --- a/tools/mini_sigvis/mini_sigvis.h +++ b/tools/mini_sigvis/mini_sigvis.h @@ -82,7 +82,7 @@ float msigvis_channel_get_sample_f32(msigvis_channel* pChannel, mal_uint32 iSamp ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #ifdef MINI_SIGVIS_IMPLEMENTATION -#define MAL_IMPLEMENTATION +#define MINI_AL_IMPLEMENTATION #include "../../mini_al.h" #include "../external/dred/source/dred/dtk/dtk.c"