mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
MAL_IMPLEMENTATION to MINI_AL_IMPLEMENTATION
This commit is contained in:
@@ -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 <stdio.h>
|
||||
@@ -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"
|
||||
```
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#define MAL_IMPLEMENTATION
|
||||
#define MINI_AL_IMPLEMENTATION
|
||||
#include "../mini_al.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -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 <stdlib.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#define MAL_IMPLEMENTATION
|
||||
#define MINI_AL_IMPLEMENTATION
|
||||
#include "../mini_al.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -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 <stdio.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#define MAL_IMPLEMENTATION
|
||||
#define MINI_AL_IMPLEMENTATION
|
||||
#include "../mini_al.h"
|
||||
|
||||
#include <stdio.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 <assert.h>
|
||||
#include <limits.h> // For INT_MAX
|
||||
#include <math.h> // 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.
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#define MAL_IMPLEMENTATION
|
||||
#define MINI_AL_IMPLEMENTATION
|
||||
#include "../mini_al.h"
|
||||
|
||||
float g_ChannelRouterProfilingOutputBenchmark[8][48000];
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
#include "../extras/stb_vorbis.c"
|
||||
#endif
|
||||
|
||||
#define MAL_IMPLEMENTATION
|
||||
#define MINI_AL_IMPLEMENTATION
|
||||
#include "../mini_al.h"
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user