diff --git a/docs/api/index.html b/docs/api/index.html index dda9d097..5b54f228 100644 --- a/docs/api/index.html +++ b/docs/api/index.html @@ -243,8 +243,8 @@ a.doc-navigation-l4 {
- -
+ + diff --git a/docs/examples/fixed_size_callback.html b/docs/examples/fixed_size_callback.html index 49cc0ee4..319c05d3 100644 --- a/docs/examples/fixed_size_callback.html +++ b/docs/examples/fixed_size_callback.html @@ -243,8 +243,8 @@ a.doc-navigation-l4 {
-
Coming soon...
-
+ +

Fixed Size Callback

Shows one way to implement a data callback that is called with a fixed frame count. @@ -266,7 +266,7 @@ around as user data for the device (device.pUserData). This example only works for output devices, but can be implemented for input devices by simply swapping the direction of data movement.

-
+
 #define MINIAUDIO_IMPLEMENTATION
 #include "../miniaudio.h"
 
diff --git a/docs/examples/index.html b/docs/examples/index.html
index 7da84b5a..2ca617d2 100644
--- a/docs/examples/index.html
+++ b/docs/examples/index.html
@@ -243,8 +243,8 @@ a.doc-navigation-l4 {
         
- -
+ + diff --git a/docs/examples/simple_capture.html b/docs/examples/simple_capture.html index 9a63e130..abd1e42c 100644 --- a/docs/examples/simple_capture.html +++ b/docs/examples/simple_capture.html @@ -243,8 +243,8 @@ a.doc-navigation-l4 {
-
Fixed Size CallbackShows one way to implement a data callback that is called with a fixed frame count.
Simple CaptureDemonstrates how to capture data from a microphone using the low-level API.
Simple DuplexDemonstrates duplex mode which is where data is captured from a microphone and then output to a speaker device.
Simple EnumerationDemonstrates how to enumerate over devices.
Simple LoopbackDemonstrates how to implement loopback recording.
Simple LoopingShows one way to handle looping of a sound.
Simple MixingDemonstrates one way to load multiple files and play them all back at the same time.
Simple PlaybackDemonstrates how to load a sound file and play it back using the low-level API.
Simple Playback Android TestDemonstrates how to load a sound file and play it back using the low-level API.
Simple Playback SineDemonstrates playback of a sine wave.
-
+ +

Simple Capture

Demonstrates how to capture data from a microphone using the low-level API. @@ -259,7 +259,7 @@ specified on the command line. Capturing works in a very similar way to playback. The only difference is the direction of data movement. Instead of the application sending data to the device, the device will send data to the application. This example just writes the data received by the microphone straight to a WAV file.

-
+
 #define MINIAUDIO_IMPLEMENTATION
 #include "../miniaudio.h"
 
diff --git a/docs/examples/simple_duplex.html b/docs/examples/simple_duplex.html
index 916184f6..d1e65f52 100644
--- a/docs/examples/simple_duplex.html
+++ b/docs/examples/simple_duplex.html
@@ -243,8 +243,8 @@ a.doc-navigation-l4 {
         
- -
+ +

Simple Duplex

Demonstrates duplex mode which is where data is captured from a microphone and then output to a speaker device. @@ -261,7 +261,7 @@ Note that the microphone and playback device must run in lockstep. Any kind of t glitching which the backend may not be able to recover from. For this reason, miniaudio forces you to use the same sample rate for both capture and playback. If internally the native sample rates differ, miniaudio will perform the sample rate conversion for you automatically.

-
+
 #define MINIAUDIO_IMPLEMENTATION
 #include "../miniaudio.h"
 
diff --git a/docs/examples/simple_enumeration.html b/docs/examples/simple_enumeration.html
index 3c12c6c1..dd1e82cb 100644
--- a/docs/examples/simple_enumeration.html
+++ b/docs/examples/simple_enumeration.html
@@ -243,8 +243,8 @@ a.doc-navigation-l4 {
         
- -
+ +

Simple Enumeration

Demonstrates how to enumerate over devices. @@ -258,7 +258,7 @@ context sits above a device. You can have many devices to one context. If you use device enumeration, you should explicitly specify the same context you used for enumeration in the call to ma_device_init() when you initialize your devices.

-
+
 #define MINIAUDIO_IMPLEMENTATION
 #include "../miniaudio.h"
 
diff --git a/docs/examples/simple_loopback.html b/docs/examples/simple_loopback.html
index aa634251..a3e0de30 100644
--- a/docs/examples/simple_loopback.html
+++ b/docs/examples/simple_loopback.html
@@ -243,8 +243,8 @@ a.doc-navigation-l4 {
         
- -
+ +

Simple Loopback

Demonstrates how to implement loopback recording. @@ -263,7 +263,7 @@ used indirectly with PulseAudio by choosing the appropriate loopback device afte To use loopback mode you just need to set the device type to ma_device_type_loopback and set the capture device config properties. The output buffer in the callback will be null whereas the input buffer will be valid.

-
+
 #define MINIAUDIO_IMPLEMENTATION
 #include "../miniaudio.h"
 
diff --git a/docs/examples/simple_looping.html b/docs/examples/simple_looping.html
index d6aca84b..bc60ba4b 100644
--- a/docs/examples/simple_looping.html
+++ b/docs/examples/simple_looping.html
@@ -243,8 +243,8 @@ a.doc-navigation-l4 {
         
- -
+ +

Simple Looping

Shows one way to handle looping of a sound. @@ -254,7 +254,7 @@ Shows one way to handle looping of a sound. This example uses a decoder as the data source. Decoders can be used with the ma_data_source API which, conveniently, supports looping via the ma_data_source_read_pcm_frames() API. To use it, all you need to do is pass a pointer to the decoder straight into ma_data_source_read_pcm_frames() and it will just work.

-
+
 #define MINIAUDIO_IMPLEMENTATION
 #include "../miniaudio.h"
 
diff --git a/docs/examples/simple_mixing.html b/docs/examples/simple_mixing.html
index 0248f2db..2b57b9b3 100644
--- a/docs/examples/simple_mixing.html
+++ b/docs/examples/simple_mixing.html
@@ -243,8 +243,8 @@ a.doc-navigation-l4 {
         
- -
+ +

Simple Mixing

Demonstrates one way to load multiple files and play them all back at the same time. @@ -259,10 +259,10 @@ is when sample are clampled to their minimum and maximum range, which for floati

-
+
 Usage:   simple_mixing [input file 0] [input file 1] ... [input file n]
 Example: simple_mixing file1.wav file2.flac
-
+
 #define MINIAUDIO_IMPLEMENTATION
 #include "../miniaudio.h"
 
diff --git a/docs/examples/simple_playback.html b/docs/examples/simple_playback.html
index 0b51e412..1a2c23b2 100644
--- a/docs/examples/simple_playback.html
+++ b/docs/examples/simple_playback.html
@@ -243,8 +243,8 @@ a.doc-navigation-l4 {
         
- -
+ +

Simple Playback

Demonstrates how to load a sound file and play it back using the low-level API. @@ -261,7 +261,7 @@ This example uses the ma_decoder API device and can be used independently of it. This example only plays back a single sound file, but it's possible to play back multiple files by simple loading multiple decoders and mixing them (do not create multiple devices to do this). See the simple_mixing example for how best to do this.

-
+
 #define MINIAUDIO_IMPLEMENTATION
 #include "../miniaudio.h"
 
diff --git a/docs/examples/simple_playback_sine.html b/docs/examples/simple_playback_sine.html
index ebf35e40..5ce0cadd 100644
--- a/docs/examples/simple_playback_sine.html
+++ b/docs/examples/simple_playback_sine.html
@@ -243,8 +243,8 @@ a.doc-navigation-l4 {
         
- -
+ +

Simple Playback Sine

Demonstrates playback of a sine wave. @@ -267,7 +267,7 @@ the ma_waveform_read_pcm_frames() AP

This example works with Emscripten.

-
+
 #define MA_NO_DECODING
 #define MA_NO_ENCODING
 #define MINIAUDIO_IMPLEMENTATION
diff --git a/docs/index.html b/docs/index.html
index 67f053b8..8858fed1 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -243,8 +243,8 @@ a.doc-navigation-l4 {
         
- -
+ +
diff --git a/docs/manual/index.html b/docs/manual/index.html index cde90706..ce1fca43 100644 --- a/docs/manual/index.html +++ b/docs/manual/index.html @@ -243,8 +243,8 @@ a.doc-navigation-l4 {
- -
+ + @@ -924,7 +924,7 @@ MA_LOG_LEVEL [level] Sets the logging level. Set level to one of the following:

-
+
 MA_LOG_LEVEL_VERBOSE
 MA_LOG_LEVEL_INFO
 MA_LOG_LEVEL_WARNING
@@ -1164,7 +1164,7 @@ Vorbis is supported via stb_vorbis which can be enabled by including the header
 

-
+
 #define STB_VORBIS_HEADER_ONLY
 #include "extras/stb_vorbis.c"    // Enables Vorbis decoding.
 
@@ -1186,7 +1186,7 @@ following options before the miniaudio implementation:
 

-
+
 #define MA_NO_WAV
 #define MA_NO_MP3
 #define MA_NO_FLAC
@@ -1202,7 +1202,7 @@ with ma_decoder_init(). Here is an e
 

-
+
 ma_decoder decoder;
 ma_result result = ma_decoder_init_file("MySong.mp3", NULL, &decoder);
 if (result != MA_SUCCESS) {
@@ -1220,7 +1220,7 @@ configure the output format, channel count, sample rate and channel map:
 

-
+
 ma_decoder_config config = ma_decoder_config_init(ma_format_f32, 2, 48000);
 

@@ -1234,7 +1234,7 @@ PCM frames it means you've reached the end:

-
+
 ma_uint64 framesRead = ma_decoder_read_pcm_frames(pDecoder, pFrames, framesToRead);
 if (framesRead < framesToRead) {
     // Reached the end.
@@ -1246,7 +1246,7 @@ You can also seek to a specific frame like so:
 

-
+
 ma_result result = ma_decoder_seek_to_pcm_frame(pDecoder, targetFrame);
 if (result != MA_SUCCESS) {
     return false;   // An error occurred.
@@ -1258,7 +1258,7 @@ If you want to loop back to the start, you can simply seek back to the first PCM
 

-
+
 ma_decoder_seek_to_pcm_frame(pDecoder, 0);
 

@@ -1268,7 +1268,7 @@ is already known. In this case you can use the

+
 ma_decoder_init_wav()
 ma_decoder_init_mp3()
 ma_decoder_init_memory_wav()
@@ -1297,7 +1297,7 @@ implementation section of miniaudio. This can be disabled by specifying the foll
 

-
+
 #define MA_NO_WAV
 

@@ -1307,7 +1307,7 @@ example for initializing an encoder to output to a file.

-
+
 ma_encoder_config config = ma_encoder_config_init(ma_resource_format_wav, FORMAT, CHANNELS, SAMPLE_RATE);
 ma_encoder encoder;
 ma_result result = ma_encoder_init_file("my_file.wav", &config, &encoder);
@@ -1349,7 +1349,7 @@ you will need to convert it before outputting any audio data. To output audio da
 

-
+
 framesWritten = ma_encoder_write_pcm_frames(&encoder, pPCMFramesToWrite, framesToWrite);
 

@@ -1434,7 +1434,7 @@ Dithering is available for the following conversions:

-
+
 s16 -> u8
 s24 -> u8
 s32 -> u8
@@ -1463,7 +1463,7 @@ conversion. Below is an example of initializing a simple channel converter which
 

-
+
 ma_channel_converter_config config = ma_channel_converter_config_init(
     ma_format,                      // Sample format
     1,                              // Input channels
@@ -1483,7 +1483,7 @@ To perform the conversion simply call ma_ch
 

-
+
 ma_result result = ma_channel_converter_process_pcm_frames(&converter, pFramesOut, pFramesIn, frameCount);
 if (result != MA_SUCCESS) {
     // Error.
@@ -1796,7 +1796,7 @@ Resampling is achieved with the ma_resample
 

-
+
 ma_resampler_config config = ma_resampler_config_init(
     ma_format_s16,
     channels,
@@ -1816,7 +1816,7 @@ Do the following to uninitialize the resampler:
 

-
+
 ma_resampler_uninit(&resampler);
 

@@ -1825,7 +1825,7 @@ The following example shows how data can be processed

-
+
 ma_uint64 frameCountIn  = 1000;
 ma_uint64 frameCountOut = 2000;
 ma_result result = ma_resampler_process_pcm_frames(&resampler, pFramesIn, &frameCountIn, pFramesOut, &frameCountOut);
@@ -1974,7 +1974,7 @@ source files. To opt-in, you must first #include the following file before the i
 

-
+
 #include "extras/speex_resampler/ma_speex_resampler.h"
 

@@ -1983,7 +1983,7 @@ Both the header and implementation is contained within the same file. The implem

-
+
 #define MINIAUDIO_SPEEX_RESAMPLER_IMPLEMENTATION
 #include "extras/speex_resampler/ma_speex_resampler.h"
 

@@ -2014,7 +2014,7 @@ conversion is very similar to the resampling API. Create a

+
 ma_data_converter_config config = ma_data_converter_config_init(
     inputFormat,
     outputFormat,
@@ -2037,7 +2037,7 @@ channel maps and resampling quality. Something like the following may be more su
 

-
+
 ma_data_converter_config config = ma_data_converter_config_init_default();
 config.formatIn = inputFormat;
 config.formatOut = outputFormat;
@@ -2054,7 +2054,7 @@ Do the following to uninitialize the data converter:
 

-
+
 ma_data_converter_uninit(&converter);
 

@@ -2063,7 +2063,7 @@ The following example shows how data can be processed

-
+
 ma_uint64 frameCountIn  = 1000;
 ma_uint64 frameCountOut = 2000;
 ma_result result = ma_data_converter_process_pcm_frames(&converter, pFramesIn, &frameCountIn, pFramesOut, &frameCountOut);
@@ -2123,7 +2123,7 @@ Biquad filtering is achieved with the ma_bi
 

-
+
 ma_biquad_config config = ma_biquad_config_init(ma_format_f32, channels, b0, b1, b2, a0, a1, a2);
 ma_result result = ma_biquad_init(&config, &biquad);
 if (result != MA_SUCCESS) {
@@ -2154,7 +2154,7 @@ Filtering can be applied in-place by passing in the same pointer for both the in
 

-
+
 ma_biquad_process_pcm_frames(&biquad, pMyData, pMyData, frameCount);
 

@@ -2214,7 +2214,7 @@ Low-pass filter example:

-
+
 ma_lpf_config config = ma_lpf_config_init(ma_format_f32, channels, sampleRate, cutoffFrequency, order);
 ma_result result = ma_lpf_init(&config, &lpf);
 if (result != MA_SUCCESS) {
@@ -2236,7 +2236,7 @@ Filtering can be applied in-place by passing in the same pointer for both the in
 

-
+
 ma_lpf_process_pcm_frames(&lpf, pMyData, pMyData, frameCount);
 

@@ -2245,7 +2245,7 @@ The maximum filter order is limited to MA_MAX_FILTER_ORDER which is set to 8. If

-
+
 for (iFilter = 0; iFilter < filterCount; iFilter += 1) {
     ma_lpf2_process_pcm_frames(&lpf2[iFilter], pMyData, pMyData, frameCount);
 }
@@ -2496,7 +2496,7 @@ miniaudio supports generation of sine, square, triangle and sawtooth waveforms.
 

-
+
 ma_waveform_config config = ma_waveform_config_init(
     FORMAT,
     CHANNELS,
@@ -2569,7 +2569,7 @@ miniaudio supports generation of white, pink and Brownian noise via the 
 
 

-
+
 ma_noise_config config = ma_noise_config_init(
     FORMAT,
     CHANNELS,
@@ -2599,7 +2599,7 @@ side. To instead have each channel use the same random value, set the 
 
 

-
+
 config.duplicateChannels = MA_TRUE;
 

@@ -2646,7 +2646,7 @@ Audio buffers are initialised using the standard configuration system used every

-
+
 ma_audio_buffer_config config = ma_audio_buffer_config_init(
     format,
     channels,
@@ -2676,7 +2676,7 @@ the raw audio data will be located immediately after the 
+
 ma_audio_buffer_config config = ma_audio_buffer_config_init(
     format,
     channels,
@@ -2708,7 +2708,7 @@ with with ma_audio_buffer_seek_to_pcm_frame
 

-
+
 ma_uint64 framesRead = ma_audio_buffer_read_pcm_frames(pAudioBuffer, pFramesOut, desiredFrameCount, isLooping);
 if (framesRead < desiredFrameCount) {
     // If not looping, this means the end has been reached. This should never happen in looping mode with valid input.
@@ -2721,7 +2721,7 @@ pointer to a segment of data:
 

-
+
 void* pMappedFrames;
 ma_uint64 frameCount = frameCountToTryMapping;
 ma_result result = ma_audio_buffer_map(pAudioBuffer, &pMappedFrames, &frameCount);
@@ -2767,7 +2767,7 @@ something like the following:
 

-
+
 ma_pcm_rb rb;
 ma_result result = ma_pcm_rb_init(FORMAT, CHANNELS, BUFFER_SIZE_IN_FRAMES, NULL, NULL, &rb);
 if (result != MA_SUCCESS) {
@@ -3052,7 +3052,7 @@ UWP requires the Microphone capability to be enabled in the application's ma
 
 
 
-
+
 <Package ...>
     ...
     <Capabilities>
Programming Manual

@@ -257,7 +257,7 @@ miniaudio is a single file library for audio playback and capture. To use it, do

-
+
 #define MINIAUDIO_IMPLEMENTATION
 #include "miniaudio.h"
 

@@ -284,7 +284,7 @@ but you could allocate it on the heap if that suits your situation better.

-
+
 void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount)
 {
     // In playback mode copy data to pOutput. In capture mode read data from pInput. In full-duplex mode, both
@@ -428,7 +428,7 @@ event indicating that the device needs to stop and handle it in a different thre
 

-
+
 ma_device_init()
 ma_device_init_ex()
 ma_device_uninit()
@@ -448,7 +448,7 @@ from ma_device_type_playback to 
 
 

-
+
 ma_device_config config = ma_device_config_init(ma_device_type_capture);
 config.capture.format   = MY_FORMAT;
 config.capture.channels = MY_CHANNEL_COUNT;
@@ -518,7 +518,7 @@ devices connected and you want to use a specific one you will need to specify th
 

-
+
 config.playback.pDeviceID = pMyPlaybackDeviceID;    // Only if requesting a playback or duplex device.
 config.capture.pDeviceID = pMyCaptureDeviceID;      // Only if requesting a capture, duplex or loopback device.
 

@@ -531,7 +531,7 @@ backends and enumerating devices. The example below shows how to enumerate devic

-
+
 ma_context context;
 if (ma_context_init(NULL, 0, NULL, &context) != MA_SUCCESS) {
     // Error.
@@ -859,7 +859,7 @@ data conversion, decoding and/or encoding. Some families of APIs require threadi
 be set:
 
 

-
+
 MA_NO_DEVICE_IO