mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-23 08:44:04 +02:00
"mini_al" to "miniaudio".
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
#define MAL_LOG_LEVEL MAL_LOG_LEVEL_VERBOSE
|
||||
#define MAL_DEBUG_OUTPUT
|
||||
#define MINI_AL_IMPLEMENTATION
|
||||
#include "../mini_al.h"
|
||||
#include "../miniaudio.h"
|
||||
|
||||
int print_context_info(mal_context* pContext)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#define MAL_DEBUG_OUTPUT
|
||||
#define MAL_USE_REFERENCE_CONVERSION_APIS
|
||||
#define MINI_AL_IMPLEMENTATION
|
||||
#include "../mini_al.h"
|
||||
#include "../miniaudio.h"
|
||||
|
||||
// Two converters are needed here. One for converting f32 samples from the sine wave generator to the input format,
|
||||
// and another for converting the input format to the output format for device output.
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
#define MAL_DEBUG_OUTPUT
|
||||
#define MINI_AL_IMPLEMENTATION
|
||||
#include "../mini_al.h"
|
||||
#include "../miniaudio.h"
|
||||
|
||||
#define DR_WAV_IMPLEMENTATION
|
||||
#include "../extras/dr_wav.h"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#define MAL_NO_DEVICE_IO
|
||||
#define MINI_AL_IMPLEMENTATION
|
||||
#include "../mini_al.h"
|
||||
#include "../miniaudio.h"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#define MINI_AL_IMPLEMENTATION
|
||||
#include "../mini_al.h"
|
||||
#include "../miniaudio.h"
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// We're using sigvis for visualizations. This will include mini_al for us, so no need to include mini_al in this file.
|
||||
// We're using sigvis for visualizations. This will include miniaudio for us, so no need to include miniaudio in this file.
|
||||
#define NO_SIGVIS
|
||||
|
||||
#define MAL_NO_SSE2
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
#ifdef NO_SIGVIS
|
||||
#define MINI_AL_IMPLEMENTATION
|
||||
#include "../mini_al.h"
|
||||
#include "../miniaudio.h"
|
||||
#else
|
||||
#define MINI_SIGVIS_IMPLEMENTATION
|
||||
#include "../tools/mini_sigvis/mini_sigvis.h" // <-- Includes mini_al.
|
||||
#include "../tools/mini_sigvis/mini_sigvis.h" // <-- Includes miniaudio.
|
||||
#endif
|
||||
|
||||
// There is a usage pattern for resampling that mini_al does not properly support which is where the client continuously
|
||||
// There is a usage pattern for resampling that miniaudio does not properly support which is where the client continuously
|
||||
// reads samples until mal_src_read() returns 0. The problem with this pattern is that is consumes the samples sitting
|
||||
// in the window which are needed to compute the next samples in future calls to mal_src_read() (assuming the client
|
||||
// has re-filled the resampler's input data).
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define MINI_AL_IMPLEMENTATION
|
||||
#include "../mini_al.h"
|
||||
#include "../miniaudio.h"
|
||||
|
||||
mal_sine_wave sineWave;
|
||||
mal_uint32 framesWritten;
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
|
||||
//#define MAL_DEBUG_OUTPUT
|
||||
#define MINI_AL_IMPLEMENTATION
|
||||
#include "../mini_al.h"
|
||||
#include "../miniaudio.h"
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#include <emscripten.h>
|
||||
|
||||
@@ -376,7 +376,7 @@
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\mini_al.h" />
|
||||
<ClInclude Include="..\miniaudio.h" />
|
||||
<ClInclude Include="..\research\mal_resampler.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\mini_al.h">
|
||||
<ClInclude Include="..\miniaudio.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\research\mal_resampler.h">
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
latencyHint: 'interactive',
|
||||
sampleRate: sampleRate,
|
||||
});
|
||||
device.webaudioContext.suspend(); // mini_al always starts it's devices in a stopped state.
|
||||
device.webaudioContext.suspend(); // miniaudio always starts it's devices in a stopped state.
|
||||
console.log("Sample Rate: " + device.webaudioContext.sampleRate);
|
||||
|
||||
device.intermediaryBufferSizeInBytes = channelCount * bufferSizeInFrames * 4;
|
||||
|
||||
Reference in New Issue
Block a user