Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
miniaudio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
miniaudio
Commits
b93faa46
Commit
b93faa46
authored
Mar 06, 2019
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MINI_AL_IMPLEMENTATION to MINIAUDIO_IMPLEMENTATION.
parent
3d4716f0
Changes
19
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
24 additions
and
24 deletions
+24
-24
README.md
README.md
+3
-3
examples/advanced_config.c
examples/advanced_config.c
+1
-1
examples/simple_capture.c
examples/simple_capture.c
+1
-1
examples/simple_enumeration.c
examples/simple_enumeration.c
+1
-1
examples/simple_playback.c
examples/simple_playback.c
+1
-1
examples/simple_playback_emscripten.c
examples/simple_playback_emscripten.c
+1
-1
miniaudio.h
miniaudio.h
+3
-3
research/mal_resampler.h
research/mal_resampler.h
+1
-1
research/mal_ring_buffer.h
research/mal_ring_buffer.h
+2
-2
research/tests/mal_resampler_test_0.c
research/tests/mal_resampler_test_0.c
+1
-1
tests/mal_debug_playback.c
tests/mal_debug_playback.c
+1
-1
tests/mal_dithering.c
tests/mal_dithering.c
+1
-1
tests/mal_duplex.c
tests/mal_duplex.c
+1
-1
tests/mal_no_device_io.c
tests/mal_no_device_io.c
+1
-1
tests/mal_profiling.c
tests/mal_profiling.c
+1
-1
tests/mal_resampling.c
tests/mal_resampling.c
+1
-1
tests/mal_stop.c
tests/mal_stop.c
+1
-1
tests/mal_test_0.c
tests/mal_test_0.c
+1
-1
tools/mini_sigvis/mini_sigvis.h
tools/mini_sigvis/mini_sigvis.h
+1
-1
No files found.
README.md
View file @
b93faa46
...
...
@@ -51,7 +51,7 @@ Building
======
Do the following in one source file:
```
#define MINI
_AL
_IMPLEMENTATION
#define MINI
AUDIO
_IMPLEMENTATION
#include "miniaudio.h"
```
Then just compile. There's no need to install any dependencies. On Windows and macOS there's no need to link
...
...
@@ -69,7 +69,7 @@ Simple Playback Example
#define DR_WAV_IMPLEMENTATION
#include "../extras/dr_wav.h" // Enables WAV decoding.
#define MINI
_AL
_IMPLEMENTATION
#define MINI
AUDIO
_IMPLEMENTATION
#include "../miniaudio.h"
#include <stdio.h>
...
...
@@ -154,7 +154,7 @@ relevant backend library before the implementation of miniaudio, like so:
#include "dr_mp3.h" // Enables MP3 decoding.
#include "dr_wav.h" // Enables WAV decoding.
#define MINI
_AL
_IMPLEMENTATION
#define MINI
AUDIO
_IMPLEMENTATION
#include "miniaudio.h"
```
...
...
examples/advanced_config.c
View file @
b93faa46
#define MINI
_AL
_IMPLEMENTATION
#define MINI
AUDIO
_IMPLEMENTATION
#include "../miniaudio.h"
#include <stdio.h>
...
...
examples/simple_capture.c
View file @
b93faa46
// This example simply captures data from your default microphone until you press Enter. The output is saved to the file specified on the command line.
#define MINI
_AL
_IMPLEMENTATION
#define MINI
AUDIO
_IMPLEMENTATION
#include "../miniaudio.h"
#define DR_WAV_IMPLEMENTATION
...
...
examples/simple_enumeration.c
View file @
b93faa46
#define MINI
_AL
_IMPLEMENTATION
#define MINI
AUDIO
_IMPLEMENTATION
#include "../miniaudio.h"
#include <stdio.h>
...
...
examples/simple_playback.c
View file @
b93faa46
...
...
@@ -5,7 +5,7 @@
#define DR_WAV_IMPLEMENTATION
#include "../extras/dr_wav.h" // Enables WAV decoding.
#define MINI
_AL
_IMPLEMENTATION
#define MINI
AUDIO
_IMPLEMENTATION
#include "../miniaudio.h"
#include <stdio.h>
...
...
examples/simple_playback_emscripten.c
View file @
b93faa46
#define MINI
_AL
_IMPLEMENTATION
#define MINI
AUDIO
_IMPLEMENTATION
#include "../miniaudio.h"
#include <stdio.h>
...
...
miniaudio.h
View file @
b93faa46
...
...
@@ -154,7 +154,7 @@ Supported Formats:
USAGE
=====
miniaudio is a single-file library. To use it, do something like the following in one .c file.
#define MINI
_AL
_IMPLEMENTATION
#define MINI
AUDIO
_IMPLEMENTATION
#include "miniaudio.h"
You can then #include this file in other parts of the program as you would with any other header file.
...
...
@@ -2951,7 +2951,7 @@ mal_uint64 mal_sine_wave_read_f32_ex(mal_sine_wave* pSineWave, mal_uint64 frameC
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#if defined(MINI
_AL_IMPLEMENTATION) || defined(MAL
_IMPLEMENTATION)
#if defined(MINI
AUDIO
_IMPLEMENTATION)
#include <assert.h>
#include <limits.h> // For INT_MAX
#include <math.h> // sin(), etc.
...
...
@@ -31305,7 +31305,7 @@ mal_uint64 mal_sine_wave_read_f32_ex(mal_sine_wave* pSineWave, mal_uint64 frameC
#pragma warning(pop)
#endif
#endif /* MINI
_AL
_IMPLEMENTATION */
#endif /* MINI
AUDIO
_IMPLEMENTATION */
/*
BACKEND IMPLEMENTATION GUIDLINES
research/mal_resampler.h
View file @
b93faa46
...
...
@@ -220,7 +220,7 @@ window are not included in the calculation.
mal_uint64
mal_resampler_get_expected_output_frame_count
(
mal_resampler
*
pResampler
,
mal_uint64
inputFrameCount
);
#endif
#ifdef MINI
_AL
_IMPLEMENTATION
#ifdef MINI
AUDIO
_IMPLEMENTATION
#ifndef MAL_RESAMPLER_MIN_RATIO
#define MAL_RESAMPLER_MIN_RATIO 0.02083333
...
...
research/mal_ring_buffer.h
View file @
b93faa46
...
...
@@ -99,7 +99,7 @@ void* mal_pcm_rb_get_subbuffer_ptr(mal_pcm_rb* pRB, size_t subbufferIndex, void*
#endif // mal_ring_buffer_h
#ifdef MINI
_AL
_IMPLEMENTATION
#ifdef MINI
AUDIO
_IMPLEMENTATION
MAL_INLINE
mal_uint32
mal_rb__extract_offset_in_bytes
(
mal_uint32
encodedOffset
)
{
return
encodedOffset
&
0x7FFFFFFF
;
...
...
@@ -634,4 +634,4 @@ void* mal_pcm_rb_get_subbuffer_ptr(mal_pcm_rb* pRB, size_t subbufferIndex, void*
return
mal_rb_get_subbuffer_ptr
(
&
pRB
->
rb
,
subbufferIndex
,
pBuffer
);
}
#endif // MINI
_AL
_IMPLEMENTATION
#endif // MINI
AUDIO
_IMPLEMENTATION
research/tests/mal_resampler_test_0.c
View file @
b93faa46
...
...
@@ -2,7 +2,7 @@
#include "../../../../dr_libs/dr_wav.h"
#define MAL_DEBUG_OUTPUT
#define MINI
_AL
_IMPLEMENTATION
#define MINI
AUDIO
_IMPLEMENTATION
#include "../../miniaudio.h"
#include "../mal_resampler.h"
...
...
tests/mal_debug_playback.c
View file @
b93faa46
#define MAL_LOG_LEVEL MAL_LOG_LEVEL_VERBOSE
#define MAL_DEBUG_OUTPUT
#define MINI
_AL
_IMPLEMENTATION
#define MINI
AUDIO
_IMPLEMENTATION
#include "../miniaudio.h"
int
print_context_info
(
mal_context
*
pContext
)
...
...
tests/mal_dithering.c
View file @
b93faa46
#define MAL_DEBUG_OUTPUT
#define MAL_USE_REFERENCE_CONVERSION_APIS
#define MINI
_AL
_IMPLEMENTATION
#define MINI
AUDIO
_IMPLEMENTATION
#include "../miniaudio.h"
// Two converters are needed here. One for converting f32 samples from the sine wave generator to the input format,
...
...
tests/mal_duplex.c
View file @
b93faa46
#include <stdio.h>
#define MAL_DEBUG_OUTPUT
#define MINI
_AL
_IMPLEMENTATION
#define MINI
AUDIO
_IMPLEMENTATION
#include "../miniaudio.h"
#define DR_WAV_IMPLEMENTATION
...
...
tests/mal_no_device_io.c
View file @
b93faa46
...
...
@@ -5,7 +5,7 @@
#include "../extras/dr_wav.h"
#define MAL_NO_DEVICE_IO
#define MINI
_AL
_IMPLEMENTATION
#define MINI
AUDIO
_IMPLEMENTATION
#include "../miniaudio.h"
int
main
(
int
argc
,
char
**
argv
)
...
...
tests/mal_profiling.c
View file @
b93faa46
#define MINI
_AL
_IMPLEMENTATION
#define MINI
AUDIO
_IMPLEMENTATION
#include "../miniaudio.h"
typedef
enum
...
...
tests/mal_resampling.c
View file @
b93faa46
...
...
@@ -5,7 +5,7 @@
#define MAL_NO_AVX2
#ifdef NO_SIGVIS
#define MINI
_AL
_IMPLEMENTATION
#define MINI
AUDIO
_IMPLEMENTATION
#include "../miniaudio.h"
#else
#define MINI_SIGVIS_IMPLEMENTATION
...
...
tests/mal_stop.c
View file @
b93faa46
#include <stdio.h>
#define MINI
_AL
_IMPLEMENTATION
#define MINI
AUDIO
_IMPLEMENTATION
#include "../miniaudio.h"
mal_sine_wave
sineWave
;
...
...
tests/mal_test_0.c
View file @
b93faa46
...
...
@@ -11,7 +11,7 @@
#endif
//#define MAL_DEBUG_OUTPUT
#define MINI
_AL
_IMPLEMENTATION
#define MINI
AUDIO
_IMPLEMENTATION
#include "../miniaudio.h"
#ifdef __EMSCRIPTEN__
...
...
tools/mini_sigvis/mini_sigvis.h
View file @
b93faa46
...
...
@@ -82,7 +82,7 @@ float msigvis_channel_get_sample_f32(msigvis_channel* pChannel, mal_uint32 iSamp
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#ifdef MINI_SIGVIS_IMPLEMENTATION
#define MINI
_AL
_IMPLEMENTATION
#define MINI
AUDIO
_IMPLEMENTATION
#include "../../miniaudio.h"
#include "../external/dred/source/dred/dtk/dtk.c"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment