+
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
-
+
@@ -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>