diff --git a/docs/api/index.html b/docs/api/index.html index e4c2869b..16bb5116 100644 --- a/docs/api/index.html +++ b/docs/api/index.html @@ -263,7 +263,7 @@ Coming soon...
- Copyright © 2022 David Reid
+ Copyright © 2023 David Reid
Developed by David Reid - mackron@gmail.com
diff --git a/docs/examples/custom_backend.html b/docs/examples/custom_backend.html index e435f401..ed05ba7f 100644 --- a/docs/examples/custom_backend.html +++ b/docs/examples/custom_backend.html @@ -248,7 +248,7 @@ a.doc-navigation-l4 {
+Documentation HomeProgramming ManualExamplesCustom BackendCustom DecoderCustom Decoder EngineData Source ChainingDuplex EffectEngine AdvancedEngine EffectsEngine Hello WorldEngine SdlEngine SteamaudioNode GraphResource ManagerResource Manager AdvancedSimple CaptureSimple DuplexSimple EnumerationSimple LoopbackSimple LoopingSimple MixingSimple PlaybackSimple Playback SineSimple Playback SineAPI Reference

Custom Backend

This example show how a custom backend can be implemented.

@@ -1009,7 +1009,7 @@ Main program starts here.
- Copyright © 2022 David Reid
+ Copyright © 2023 David Reid
Developed by David Reid - mackron@gmail.com
diff --git a/docs/examples/custom_decoder.html b/docs/examples/custom_decoder.html index 725ff8b9..16e65251 100644 --- a/docs/examples/custom_decoder.html +++ b/docs/examples/custom_decoder.html @@ -248,7 +248,7 @@ a.doc-navigation-l4 {
@@ -3921,7 +3982,7 @@ bus and input bus is locked. This locking is specifically for attaching and deta different threads and does not affect ma_node_graph_read_pcm_frames() in any way. The locking and unlocking is mostly self-explanatory, but a slightly less intuitive aspect comes into it when considering that iterating over attachments must not break as a result of attaching or detaching a -node while iteration is occuring. +node while iteration is occurring.

@@ -4056,7 +4117,7 @@ implementation: #define MA_NO_FLAC

-Disabling built-in decoding libraries is useful if you use these libraries independantly of the +Disabling built-in decoding libraries is useful if you use these libraries independently of the ma_decoder API.

@@ -4195,7 +4256,7 @@ The ma_decoding_backend_vtable vtabl

 onInit
-onInitFile 
+onInitFile
 onInitFileW
 onInitMemory
 onUninit
@@ -4209,13 +4270,13 @@ these are not specified, miniaudio will deal with it for you via a generic imple
 
 When you initialize a custom data source (by implementing the onInit function in the vtable) you
 will need to output a pointer to a ma_data_source which implements your custom decoder. See the
-section about data sources for details on how to implemen this. Alternatively, see the
+section about data sources for details on how to implement this. Alternatively, see the
 "custom_decoders" example in the miniaudio repository.
 

The onInit function takes a pointer to some callbacks for the purpose of reading raw audio data -from some abitrary source. You'll use these functions to read from the raw data and perform the +from some arbitrary source. You'll use these functions to read from the raw data and perform the decoding. When you call them, you will pass in the pReadSeekTellUserData pointer to the relevant parameter.

@@ -4467,7 +4528,7 @@ To perform the conversion simply call ma_ch }

-It is up to the caller to ensure the output buffer is large enough to accomodate the new PCM +It is up to the caller to ensure the output buffer is large enough to accommodate the new PCM frames.

@@ -5284,7 +5345,7 @@ you can chain first and second order filters together. If you need to change the configuration of the filter, but need to maintain the state of internal registers you can do so with ma_lpf_reinit(). This may be useful if you need to change the sample -rate and/or cutoff frequency dynamically while maintaing smooth transitions. Note that changing the +rate and/or cutoff frequency dynamically while maintaining smooth transitions. Note that changing the format or channel count after initialization is invalid and will result in an error.

@@ -5633,8 +5694,8 @@ to MA_DEFAULT_LCG_SEED.

-The amplitude, seed, and type can be changed dynamically with ma_noise_set_amplitude(), -ma_noise_set_seed(), and ma_noise_set_type() respectively. +The amplitude and seed can be changed dynamically with ma_noise_set_amplitude() and +ma_noise_set_seed() respectively.

@@ -5838,7 +5899,7 @@ you will want to use. To initialize a ring buffer, do something like the followi

The ma_pcm_rb_init() function takes the sample format and channel count as parameters because -it's the PCM varient of the ring buffer API. For the regular ring buffer that operates on bytes you +it's the PCM variant of the ring buffer API. For the regular ring buffer that operates on bytes you would call ma_rb_init() which leaves these out and just takes the size of the buffer in bytes instead of frames. The fourth parameter is an optional pre-allocated buffer and the fifth parameter is a pointer to a ma_allocation_callbacks structure for custom memory allocation routines. @@ -5959,7 +6020,7 @@ WinMM

ma_backend_winmm

@@ -6143,6 +6204,17 @@ The backend API will perform resampling where possible. The reason for this as o

+

+

BSD

+ +

+

15.4. UWP

@@ -6251,7 +6329,7 @@ When compiling with VC6 and earlier, decoding is restricted to files less than 2
+Documentation HomeProgramming ManualExamplesCustom BackendCustom DecoderCustom Decoder EngineData Source ChainingDuplex EffectEngine AdvancedEngine EffectsEngine Hello WorldEngine SdlEngine SteamaudioNode GraphResource ManagerResource Manager AdvancedSimple CaptureSimple DuplexSimple EnumerationSimple LoopbackSimple LoopingSimple MixingSimple PlaybackSimple Playback SineSimple Playback SineAPI Reference

Custom Decoder

Demonstrates how to implement a custom decoder.

@@ -540,7 +540,7 @@ The onInitFile, - Copyright © 2022 David Reid
+ Copyright © 2023 David Reid
Developed by David Reid - mackron@gmail.com diff --git a/docs/examples/custom_decoder_engine.html b/docs/examples/custom_decoder_engine.html index a6abcdde..9956af54 100644 --- a/docs/examples/custom_decoder_engine.html +++ b/docs/examples/custom_decoder_engine.html @@ -248,7 +248,7 @@ a.doc-navigation-l4 {
+Documentation HomeProgramming ManualExamplesCustom BackendCustom DecoderCustom Decoder EngineData Source ChainingDuplex EffectEngine AdvancedEngine EffectsEngine Hello WorldEngine SdlEngine SteamaudioNode GraphResource ManagerResource Manager AdvancedSimple CaptureSimple DuplexSimple EnumerationSimple LoopbackSimple LoopingSimple MixingSimple PlaybackSimple Playback SineSimple Playback SineAPI Reference

Custom Decoder Engine

Demonstrates how to implement a custom decoder and use it with the high level API.

@@ -493,7 +493,7 @@ example (via libopus).

- Copyright © 2022 David Reid
+ Copyright © 2023 David Reid
Developed by David Reid - mackron@gmail.com
diff --git a/docs/examples/data_source_chaining.html b/docs/examples/data_source_chaining.html index 20099323..f6457cf1 100644 --- a/docs/examples/data_source_chaining.html +++ b/docs/examples/data_source_chaining.html @@ -248,7 +248,7 @@ a.doc-navigation-l4 {
+Documentation HomeProgramming ManualExamplesCustom BackendCustom DecoderCustom Decoder EngineData Source ChainingDuplex EffectEngine AdvancedEngine EffectsEngine Hello WorldEngine SdlEngine SteamaudioNode GraphResource ManagerResource Manager AdvancedSimple CaptureSimple DuplexSimple EnumerationSimple LoopbackSimple LoopingSimple MixingSimple PlaybackSimple Playback SineSimple Playback SineAPI Reference

Data Source Chaining

Demonstrates one way to chain together a number of data sources so they play back seamlessly without gaps. @@ -434,7 +434,7 @@ done_decoders:

- Copyright © 2022 David Reid
+ Copyright © 2023 David Reid
Developed by David Reid - mackron@gmail.com
diff --git a/docs/examples/duplex_effect.html b/docs/examples/duplex_effect.html index eaaf4026..ebb7a5c8 100644 --- a/docs/examples/duplex_effect.html +++ b/docs/examples/duplex_effect.html @@ -248,7 +248,7 @@ a.doc-navigation-l4 {
+Documentation HomeProgramming ManualExamplesCustom BackendCustom DecoderCustom Decoder EngineData Source ChainingDuplex EffectEngine AdvancedEngine EffectsEngine Hello WorldEngine SdlEngine SteamaudioNode GraphResource ManagerResource Manager AdvancedSimple CaptureSimple DuplexSimple EnumerationSimple LoopbackSimple LoopingSimple MixingSimple PlaybackSimple Playback SineSimple Playback SineAPI Reference

Duplex Effect

Demonstrates how to apply an effect to a duplex stream using the node graph system.

@@ -268,8 +268,8 @@ effect.

#define DEVICE_FORMAT ma_format_f32; /* Must always be f32 for this example because the node graph system only works with this. */ #define DEVICE_CHANNELS 1 /* For this example, always set to 1. */ -static ma_waveform g_sourceData; /* The underlying data source of the excite node. */ -static ma_audio_buffer_ref g_exciteData; /* The underlying data source of the source node. */ +static ma_waveform g_sourceData; /* The underlying data source of the source node. */ +static ma_audio_buffer_ref g_exciteData; /* The underlying data source of the excite node. */ static ma_data_source_node g_sourceNode; /* A data source node containing the source data we'll be sending through to the vocoder. This will be routed into the first bus of the vocoder node. */ static ma_data_source_node g_exciteNode; /* A data source node containing the excite data we'll be sending through to the vocoder. This will be routed into the second bus of the vocoder node. */ static ma_vocoder_node g_vocoderNode; /* The vocoder node. */ @@ -412,7 +412,7 @@ done0: ma_device_uninit(&device);
- Copyright © 2022 David Reid
+ Copyright © 2023 David Reid
Developed by David Reid - mackron@gmail.com
diff --git a/docs/examples/engine_advanced.html b/docs/examples/engine_advanced.html index 3802bd20..83985987 100644 --- a/docs/examples/engine_advanced.html +++ b/docs/examples/engine_advanced.html @@ -248,7 +248,7 @@ a.doc-navigation-l4 {
+Documentation HomeProgramming ManualExamplesCustom BackendCustom DecoderCustom Decoder EngineData Source ChainingDuplex EffectEngine AdvancedEngine EffectsEngine Hello WorldEngine SdlEngine SteamaudioNode GraphResource ManagerResource Manager AdvancedSimple CaptureSimple DuplexSimple EnumerationSimple LoopbackSimple LoopingSimple MixingSimple PlaybackSimple Playback SineSimple Playback SineAPI Reference

Engine Advanced

This example demonstrates some of the advanced features of the high level engine API.

@@ -524,7 +524,7 @@ might be a local co-op multiplayer game where each player has their own headphon
- Copyright © 2022 David Reid
+ Copyright © 2023 David Reid
Developed by David Reid - mackron@gmail.com
diff --git a/docs/examples/engine_effects.html b/docs/examples/engine_effects.html index 5689a2ec..cb2a0f3a 100644 --- a/docs/examples/engine_effects.html +++ b/docs/examples/engine_effects.html @@ -248,7 +248,7 @@ a.doc-navigation-l4 {
+Documentation HomeProgramming ManualExamplesCustom BackendCustom DecoderCustom Decoder EngineData Source ChainingDuplex EffectEngine AdvancedEngine EffectsEngine Hello WorldEngine SdlEngine SteamaudioNode GraphResource ManagerResource Manager AdvancedSimple CaptureSimple DuplexSimple EnumerationSimple LoopbackSimple LoopingSimple MixingSimple PlaybackSimple Playback SineSimple Playback SineAPI Reference

Engine Effects

Demonstrates how to apply an effect to sounds using the high level engine API.

@@ -371,7 +371,7 @@ sound file, you need multiple ma_sound
- Copyright © 2022 David Reid
+ Copyright © 2023 David Reid
Developed by David Reid - mackron@gmail.com
diff --git a/docs/examples/engine_hello_world.html b/docs/examples/engine_hello_world.html index 74402fe0..0de07cf2 100644 --- a/docs/examples/engine_hello_world.html +++ b/docs/examples/engine_hello_world.html @@ -248,7 +248,7 @@ a.doc-navigation-l4 {
+Documentation HomeProgramming ManualExamplesCustom BackendCustom DecoderCustom Decoder EngineData Source ChainingDuplex EffectEngine AdvancedEngine EffectsEngine Hello WorldEngine SdlEngine SteamaudioNode GraphResource ManagerResource Manager AdvancedSimple CaptureSimple DuplexSimple EnumerationSimple LoopbackSimple LoopingSimple MixingSimple PlaybackSimple Playback SineSimple Playback SineAPI Reference

Engine Hello World

This example demonstrates how to initialize an audio engine and play a sound.

@@ -299,7 +299,7 @@ This will play the sound specified on the command line.

- Copyright © 2022 David Reid
+ Copyright © 2023 David Reid
Developed by David Reid - mackron@gmail.com
diff --git a/docs/examples/engine_sdl.html b/docs/examples/engine_sdl.html index c29bfb60..4e7e1a37 100644 --- a/docs/examples/engine_sdl.html +++ b/docs/examples/engine_sdl.html @@ -248,7 +248,7 @@ a.doc-navigation-l4 {
+Documentation HomeProgramming ManualExamplesCustom BackendCustom DecoderCustom Decoder EngineData Source ChainingDuplex EffectEngine AdvancedEngine EffectsEngine Hello WorldEngine SdlEngine SteamaudioNode GraphResource ManagerResource Manager AdvancedSimple CaptureSimple DuplexSimple EnumerationSimple LoopbackSimple LoopingSimple MixingSimple PlaybackSimple Playback SineSimple Playback SineAPI Reference

Engine Sdl

Shows how to use the high level engine API with SDL.

@@ -399,7 +399,7 @@ head.

- Copyright © 2022 David Reid
+ Copyright © 2023 David Reid
Developed by David Reid - mackron@gmail.com
diff --git a/docs/examples/engine_steamaudio.html b/docs/examples/engine_steamaudio.html index 599fa59a..d73638c4 100644 --- a/docs/examples/engine_steamaudio.html +++ b/docs/examples/engine_steamaudio.html @@ -248,7 +248,7 @@ a.doc-navigation-l4 {
+Documentation HomeProgramming ManualExamplesCustom BackendCustom DecoderCustom Decoder EngineData Source ChainingDuplex EffectEngine AdvancedEngine EffectsEngine Hello WorldEngine SdlEngine SteamaudioNode GraphResource ManagerResource Manager AdvancedSimple CaptureSimple DuplexSimple EnumerationSimple LoopbackSimple LoopingSimple MixingSimple PlaybackSimple Playback SineSimple Playback SineAPI Reference

Engine Steamaudio

Demonstrates integration of Steam Audio with miniaudio's engine API.

@@ -699,7 +699,7 @@ MA_API ma_result ma_steamaudio_binaural_node_
- Copyright © 2022 David Reid
+ Copyright © 2023 David Reid
Developed by David Reid - mackron@gmail.com
diff --git a/docs/examples/index.html b/docs/examples/index.html index 399a0961..1968163a 100644 --- a/docs/examples/index.html +++ b/docs/examples/index.html @@ -248,10 +248,10 @@ a.doc-navigation-l4 {
+without gaps.
+Documentation HomeProgramming ManualExamplesCustom BackendCustom DecoderCustom Decoder EngineData Source ChainingDuplex EffectEngine AdvancedEngine EffectsEngine Hello WorldEngine SdlEngine SteamaudioNode GraphResource ManagerResource Manager AdvancedSimple CaptureSimple DuplexSimple EnumerationSimple LoopbackSimple LoopingSimple MixingSimple PlaybackSimple Playback SineSimple Playback SineAPI Reference
Custom BackendThis example show how a custom backend can be implemented.
Custom DecoderDemonstrates how to implement a custom decoder.
Custom Decoder EngineDemonstrates how to implement a custom decoder and use it with the high level API.
Data Source ChainingDemonstrates one way to chain together a number of data sources so they play back seamlessly -without gaps.
Duplex EffectDemonstrates how to apply an effect to a duplex stream using the node graph system.
Engine AdvancedThis example demonstrates some of the advanced features of the high level engine API.
Engine EffectsDemonstrates how to apply an effect to sounds using the high level engine API.
Engine Hello WorldThis example demonstrates how to initialize an audio engine and play a sound.
Engine SdlShows how to use the high level engine API with SDL.
Engine SteamaudioDemonstrates integration of Steam Audio with miniaudio's engine API.
Node GraphThis example shows how to use the node graph system.
Resource ManagerDemonstrates how you can use the resource manager to manage loaded sounds.
Resource Manager AdvancedDemonstrates how you can use the resource manager to manage loaded sounds.
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 SineDemonstrates playback of a sine wave.
Duplex EffectDemonstrates how to apply an effect to a duplex stream using the node graph system.
Engine AdvancedThis example demonstrates some of the advanced features of the high level engine API.
Engine EffectsDemonstrates how to apply an effect to sounds using the high level engine API.
Engine Hello WorldThis example demonstrates how to initialize an audio engine and play a sound.
Engine SdlShows how to use the high level engine API with SDL.
Engine SteamaudioDemonstrates integration of Steam Audio with miniaudio's engine API.
Node GraphThis example shows how to use the node graph system.
Resource ManagerDemonstrates how you can use the resource manager to manage loaded sounds.
Resource Manager AdvancedDemonstrates how you can use the resource manager to manage loaded sounds.
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 SineDemonstrates playback of a sine wave.
Simple Playback SineDemonstrates playback of a sine wave.
@@ -264,7 +264,7 @@ without gaps.
- Copyright © 2022 David Reid
+ Copyright © 2023 David Reid
Developed by David Reid -
mackron@gmail.com diff --git a/docs/examples/node_graph.html b/docs/examples/node_graph.html index b3f6bde6..371e874c 100644 --- a/docs/examples/node_graph.html +++ b/docs/examples/node_graph.html @@ -248,7 +248,7 @@ a.doc-navigation-l4 {
+Documentation HomeProgramming ManualExamplesCustom BackendCustom DecoderCustom Decoder EngineData Source ChainingDuplex EffectEngine AdvancedEngine EffectsEngine Hello WorldEngine SdlEngine SteamaudioNode GraphResource ManagerResource Manager AdvancedSimple CaptureSimple DuplexSimple EnumerationSimple LoopbackSimple LoopingSimple MixingSimple PlaybackSimple Playback SineSimple Playback SineAPI Reference

Node Graph

This example shows how to use the node graph system.

@@ -531,7 +531,7 @@ cleanup_graph:
- Copyright © 2022 David Reid
+ Copyright © 2023 David Reid
Developed by David Reid - mackron@gmail.com
diff --git a/docs/examples/resource_manager.html b/docs/examples/resource_manager.html index 993b0b59..f863a3b1 100644 --- a/docs/examples/resource_manager.html +++ b/docs/examples/resource_manager.html @@ -248,7 +248,7 @@ a.doc-navigation-l4 {
+Documentation HomeProgramming ManualExamplesCustom BackendCustom DecoderCustom Decoder EngineData Source ChainingDuplex EffectEngine AdvancedEngine EffectsEngine Hello WorldEngine SdlEngine SteamaudioNode GraphResource ManagerResource Manager AdvancedSimple CaptureSimple DuplexSimple EnumerationSimple LoopbackSimple LoopingSimple MixingSimple PlaybackSimple Playback SineSimple Playback SineAPI Reference

Resource Manager

Demonstrates how you can use the resource manager to manage loaded sounds.

@@ -427,7 +427,7 @@ set, each sound will have their own formats and you'll need to do the necess
- Copyright © 2022 David Reid
+ Copyright © 2023 David Reid
Developed by David Reid - mackron@gmail.com
diff --git a/docs/examples/resource_manager_advanced.html b/docs/examples/resource_manager_advanced.html index 2fe89528..bb25b1dd 100644 --- a/docs/examples/resource_manager_advanced.html +++ b/docs/examples/resource_manager_advanced.html @@ -248,7 +248,7 @@ a.doc-navigation-l4 {
+Documentation HomeProgramming ManualExamplesCustom BackendCustom DecoderCustom Decoder EngineData Source ChainingDuplex EffectEngine AdvancedEngine EffectsEngine Hello WorldEngine SdlEngine SteamaudioNode GraphResource ManagerResource Manager AdvancedSimple CaptureSimple DuplexSimple EnumerationSimple LoopbackSimple LoopingSimple MixingSimple PlaybackSimple Playback SineSimple Playback SineAPI Reference

Resource Manager Advanced

Demonstrates how you can use the resource manager to manage loaded sounds.

@@ -599,7 +599,7 @@ MA_API ma_result ma_data_source_read_pcm_fram
- Copyright © 2022 David Reid
+ Copyright © 2023 David Reid
Developed by David Reid - mackron@gmail.com
diff --git a/docs/examples/simple_capture.html b/docs/examples/simple_capture.html index 81ce3e87..98b1af96 100644 --- a/docs/examples/simple_capture.html +++ b/docs/examples/simple_capture.html @@ -248,7 +248,7 @@ a.doc-navigation-l4 {
+Documentation HomeProgramming ManualExamplesCustom BackendCustom DecoderCustom Decoder EngineData Source ChainingDuplex EffectEngine AdvancedEngine EffectsEngine Hello WorldEngine SdlEngine SteamaudioNode GraphResource ManagerResource Manager AdvancedSimple CaptureSimple DuplexSimple EnumerationSimple LoopbackSimple LoopingSimple MixingSimple PlaybackSimple Playback SineSimple Playback SineAPI Reference

Simple Capture

Demonstrates how to capture data from a microphone using the low-level API.

@@ -340,7 +340,7 @@ data received by the microphone straight to a WAV file.

- Copyright © 2022 David Reid
+ Copyright © 2023 David Reid
Developed by David Reid - mackron@gmail.com
diff --git a/docs/examples/simple_duplex.html b/docs/examples/simple_duplex.html index 713328bc..5feabdfd 100644 --- a/docs/examples/simple_duplex.html +++ b/docs/examples/simple_duplex.html @@ -248,7 +248,7 @@ a.doc-navigation-l4 {
+Documentation HomeProgramming ManualExamplesCustom BackendCustom DecoderCustom Decoder EngineData Source ChainingDuplex EffectEngine AdvancedEngine EffectsEngine Hello WorldEngine SdlEngine SteamaudioNode GraphResource ManagerResource Manager AdvancedSimple CaptureSimple DuplexSimple EnumerationSimple LoopbackSimple LoopingSimple MixingSimple PlaybackSimple Playback SineSimple Playback SineAPI Reference

Simple Duplex

Demonstrates duplex mode which is where data is captured from a microphone and then output to a speaker device.

@@ -337,7 +337,7 @@ sample rate conversion for you automatically.

- Copyright © 2022 David Reid
+ Copyright © 2023 David Reid
Developed by David Reid - mackron@gmail.com
diff --git a/docs/examples/simple_enumeration.html b/docs/examples/simple_enumeration.html index 84b8dec4..d4c1ec78 100644 --- a/docs/examples/simple_enumeration.html +++ b/docs/examples/simple_enumeration.html @@ -248,7 +248,7 @@ a.doc-navigation-l4 {
+Documentation HomeProgramming ManualExamplesCustom BackendCustom DecoderCustom Decoder EngineData Source ChainingDuplex EffectEngine AdvancedEngine EffectsEngine Hello WorldEngine SdlEngine SteamaudioNode GraphResource ManagerResource Manager AdvancedSimple CaptureSimple DuplexSimple EnumerationSimple LoopbackSimple LoopingSimple MixingSimple PlaybackSimple Playback SineSimple Playback SineAPI Reference

Simple Enumeration

Demonstrates how to enumerate over devices.

@@ -320,7 +320,7 @@ If you use device enumeration, you should explicitly specify the same context yo
- Copyright © 2022 David Reid
+ Copyright © 2023 David Reid
Developed by David Reid - mackron@gmail.com
diff --git a/docs/examples/simple_loopback.html b/docs/examples/simple_loopback.html index 8cfb9bdb..c9fbc077 100644 --- a/docs/examples/simple_loopback.html +++ b/docs/examples/simple_loopback.html @@ -248,7 +248,7 @@ a.doc-navigation-l4 {
+Documentation HomeProgramming ManualExamplesCustom BackendCustom DecoderCustom Decoder EngineData Source ChainingDuplex EffectEngine AdvancedEngine EffectsEngine Hello WorldEngine SdlEngine SteamaudioNode GraphResource ManagerResource Manager AdvancedSimple CaptureSimple DuplexSimple EnumerationSimple LoopbackSimple LoopingSimple MixingSimple PlaybackSimple Playback SineSimple Playback SineAPI Reference

Simple Loopback

Demonstrates how to implement loopback recording.

@@ -350,7 +350,7 @@ properties. The output buffer in the callback will be null whereas the input buf
- Copyright © 2022 David Reid
+ Copyright © 2023 David Reid
Developed by David Reid - mackron@gmail.com
diff --git a/docs/examples/simple_looping.html b/docs/examples/simple_looping.html index a58ccad2..323b3357 100644 --- a/docs/examples/simple_looping.html +++ b/docs/examples/simple_looping.html @@ -248,7 +248,7 @@ a.doc-navigation-l4 {
+Documentation HomeProgramming ManualExamplesCustom BackendCustom DecoderCustom Decoder EngineData Source ChainingDuplex EffectEngine AdvancedEngine EffectsEngine Hello WorldEngine SdlEngine SteamaudioNode GraphResource ManagerResource Manager AdvancedSimple CaptureSimple DuplexSimple EnumerationSimple LoopbackSimple LoopingSimple MixingSimple PlaybackSimple Playback SineSimple Playback SineAPI Reference

Simple Looping

Shows one way to handle looping of a sound.

@@ -340,7 +340,7 @@ decoder straight into ma_data_source_read_p
- Copyright © 2022 David Reid
+ Copyright © 2023 David Reid
Developed by David Reid - mackron@gmail.com
diff --git a/docs/examples/simple_mixing.html b/docs/examples/simple_mixing.html index 57b5d433..a9e927cb 100644 --- a/docs/examples/simple_mixing.html +++ b/docs/examples/simple_mixing.html @@ -248,7 +248,7 @@ a.doc-navigation-l4 {
+Documentation HomeProgramming ManualExamplesCustom BackendCustom DecoderCustom Decoder EngineData Source ChainingDuplex EffectEngine AdvancedEngine EffectsEngine Hello WorldEngine SdlEngine SteamaudioNode GraphResource ManagerResource Manager AdvancedSimple CaptureSimple DuplexSimple EnumerationSimple LoopbackSimple LoopingSimple MixingSimple PlaybackSimple Playback SineSimple Playback SineAPI Reference

Simple Mixing

Demonstrates one way to load multiple files and play them all back at the same time.

@@ -465,7 +465,7 @@ For simplicity, this example requires the device to use floating point samples.
- Copyright © 2022 David Reid
+ Copyright © 2023 David Reid
Developed by David Reid - mackron@gmail.com
diff --git a/docs/examples/simple_playback.html b/docs/examples/simple_playback.html index b94e296b..511c2aa5 100644 --- a/docs/examples/simple_playback.html +++ b/docs/examples/simple_playback.html @@ -248,7 +248,7 @@ a.doc-navigation-l4 {
+Documentation HomeProgramming ManualExamplesCustom BackendCustom DecoderCustom Decoder EngineData Source ChainingDuplex EffectEngine AdvancedEngine EffectsEngine Hello WorldEngine SdlEngine SteamaudioNode GraphResource ManagerResource Manager AdvancedSimple CaptureSimple DuplexSimple EnumerationSimple LoopbackSimple LoopingSimple MixingSimple PlaybackSimple Playback SineSimple Playback SineAPI Reference

Simple Playback

Demonstrates how to load a sound file and play it back using the low-level API.

@@ -341,7 +341,7 @@ the simple_mixing example for how best to do this.

- Copyright © 2022 David Reid
+ Copyright © 2023 David Reid
Developed by David Reid - mackron@gmail.com
diff --git a/docs/examples/simple_playback_sine.html b/docs/examples/simple_playback_sine.html index d36bbdd4..bf57ded0 100644 --- a/docs/examples/simple_playback_sine.html +++ b/docs/examples/simple_playback_sine.html @@ -248,7 +248,7 @@ a.doc-navigation-l4 {
+Documentation HomeProgramming ManualExamplesCustom BackendCustom DecoderCustom Decoder EngineData Source ChainingDuplex EffectEngine AdvancedEngine EffectsEngine Hello WorldEngine SdlEngine SteamaudioNode GraphResource ManagerResource Manager AdvancedSimple CaptureSimple DuplexSimple EnumerationSimple LoopbackSimple LoopingSimple MixingSimple PlaybackSimple Playback SineSimple Playback SineAPI Reference

Simple Playback Sine

Demonstrates playback of a sine wave.

@@ -311,9 +311,6 @@ This example works with Emscripten.

ma_device device; ma_waveform_config sineWaveConfig; - sineWaveConfig = ma_waveform_config_init(DEVICE_FORMAT, DEVICE_CHANNELS, DEVICE_SAMPLE_RATE, ma_waveform_type_sine, 0.2, 220); - ma_waveform_init(&sineWaveConfig, &sineWave); - deviceConfig = ma_device_config_init(ma_device_type_playback); deviceConfig.playback.format = DEVICE_FORMAT; deviceConfig.playback.channels = DEVICE_CHANNELS; @@ -328,6 +325,9 @@ This example works with Emscripten.

printf("Device Name: %s\n", device.playback.name); + sineWaveConfig = ma_waveform_config_init(device.playback.format, device.playback.channels, device.sampleRate, ma_waveform_type_sine, 0.2, 220); + ma_waveform_init(&sineWaveConfig, &sineWave); + if (ma_device_start(&device) != MA_SUCCESS) { printf("Failed to start playback device.\n"); ma_device_uninit(&device); @@ -360,7 +360,7 @@ This example works with Emscripten.

- Copyright © 2022 David Reid
+ Copyright © 2023 David Reid
Developed by David Reid - mackron@gmail.com
diff --git a/docs/index.html b/docs/index.html index 07e3103b..b0363b84 100644 --- a/docs/index.html +++ b/docs/index.html @@ -262,7 +262,7 @@ a.doc-navigation-l4 {
- Copyright © 2022 David Reid
+ Copyright © 2023 David Reid
Developed by David Reid - mackron@gmail.com
diff --git a/docs/manual/index.html b/docs/manual/index.html index ea95ab8d..b9c2922e 100644 --- a/docs/manual/index.html +++ b/docs/manual/index.html @@ -290,7 +290,7 @@ A config/init pattern is used throughout the entire library. The idea is that yo object and pass that into the initialization routine. The advantage to this system is that the config object can be initialized with logical defaults and new properties added to it without breaking the API. The config object can be allocated on the stack and does not need to be -maintained after initialization of the corresponding object. +maintained after initialization of the corresponding object.

@@ -791,7 +791,7 @@ ma_engine_play_sound(&engine, "my_sound.wav This plays what miniaudio calls an "inline" sound. It plays the sound once, and then puts the internal sound up for recycling. The last parameter is used to specify which sound group the sound should be associated with which will be explained later. This particular way of playing a sound is -simple, but lacks flexibility and features. A more flexible way of playing a sound is to first +simple, but lacks flexibility and features. A more flexible way of playing a sound is to first initialize a sound:

@@ -930,6 +930,10 @@ dependencies. See below for platform-specific details.

+Note that GCC and Clang require -msse2, -mavx2, etc. for SIMD optimizations. +

+

+

@@ -974,9 +978,10 @@ notarization process. To fix this there are two options. The first is to use the #include "miniaudio.h"

-This will require linking with -framework CoreFoundation -framework CoreAudio -framework AudioUnit. -Alternatively, if you would rather keep using runtime linking you can add the following to your -entitlements.xcent file: +This will require linking with -framework CoreFoundation -framework CoreAudio -framework AudioToolbox. +If you get errors about AudioToolbox, try with -framework AudioUnit instead. You may get this when +using older versions of iOS. Alternatively, if you would rather keep using runtime linking you can +add the following to your entitlements.xcent file:

@@ -1711,7 +1716,7 @@ To read data from a data source: ma_result result; ma_uint64 framesRead; -result = ma_data_source_read_pcm_frames(pDataSource, pFramesOut, frameCount, &framesRead, loop); +result = ma_data_source_read_pcm_frames(pDataSource, pFramesOut, frameCount, &framesRead); if (result != MA_SUCCESS) { return result; // Failed to read data from the data source. } @@ -1736,7 +1741,7 @@ you could plug in a decoder like so: ma_uint64 framesRead; ma_decoder decoder; // <-- This would be initialized with ma_decoder_init_*(). -result = ma_data_source_read_pcm_frames(&decoder, pFramesOut, frameCount, &framesRead, loop); +result = ma_data_source_read_pcm_frames(&decoder, pFramesOut, frameCount, &framesRead); if (result != MA_SUCCESS) { return result; // Failed to read data from the decoder. } @@ -1831,7 +1836,9 @@ result = ma_data_source_set_range_in_pcm_frames(pDataSource, rangeBegInFrames, r

This is useful if you have a sound bank where many sounds are stored in the same file and you want -the data source to only play one of those sub-sounds. +the data source to only play one of those sub-sounds. Note that once the range is set, everything +that takes a position, such as cursors and loop points, should always be relatvie to the start of +the range. When the range is set, any previously defined loop point will be reset.

@@ -1870,21 +1877,21 @@ result = ma_data_source_set_next(&decoder1, &decoder2); return result; // Failed to set the next data source. } -result = ma_data_source_read_pcm_frames(&decoder1, pFramesOut, frameCount, pFramesRead, MA_FALSE); +result = ma_data_source_read_pcm_frames(&decoder1, pFramesOut, frameCount, pFramesRead); if (result != MA_SUCCESS) { return result; // Failed to read from the decoder. }

In the example above we're using decoders. When reading from a chain, you always want to read from -the top level data source in the chain. In the example above, decoder1 is the top level data +the top level data source in the chain. In the example above, decoder1 is the top level data source in the chain. When decoder1 reaches the end, decoder2 will start seamlessly without any gaps.

-Note that the loop parameter is set to false in the example above. When this is set to true, only -the current data source will be looped. You can loop the entire chain by linking in a loop like so: +Note that when looping is enabled, only the current data source will be looped. You can loop the +entire chain by linking in a loop like so:

@@ -1900,9 +1907,9 @@ changing links while the audio thread is in the middle of reading.

Do not use ma_decoder_seek_to_pcm_frame() as a means to reuse a data source to play multiple -instances of the same sound simultaneously. Instead, initialize multiple data sources for each -instance. This can be extremely inefficient depending on the data source and can result in -glitching due to subtle changes to the state of internal filters. +instances of the same sound simultaneously. This can be extremely inefficient depending on the type +of data source and can result in glitching due to subtle changes to the state of internal filters. +Instead, initialize multiple data sources for each instance.

@@ -1988,7 +1995,7 @@ base object (ma_data_source_base): void my_data_source_uninit(my_data_source* pMyDataSource) { // ... do the uninitialization of your custom data source here ... - + // You must uninitialize the base data source. ma_data_source_uninit(&pMyDataSource->base); } @@ -2056,7 +2063,7 @@ ma_engine engine; ma_engine_config engineConfig; engineConfig = ma_engine_config_init(); -engineConfig.pPlaybackDevice = &myDevice; +engineConfig.pDevice = &myDevice; result = ma_engine_init(&engineConfig, &engine); if (result != MA_SUCCESS) { @@ -2103,7 +2110,7 @@ Note that when you're not using a device, you must set the channel count and config or else miniaudio won't know what to use (miniaudio will use the device to determine this normally). When not using a device, you need to use ma_engine_read_pcm_frames() to process audio data from the engine. This kind of setup is useful if you want to do something like offline -processing. +processing or want to use a different audio system for playback such as SDL.

@@ -2319,7 +2326,7 @@ ma_sound_init_from_file(&engine, "my_sound. By default, sounds will be loaded synchronously, meaning ma_sound_init_*() will not return until the sound has been fully loaded. If this is prohibitive you can instead load sounds asynchronously -by specificying the MA_SOUND_FLAG_ASYNC flag: +by specifying the MA_SOUND_FLAG_ASYNC flag:

@@ -2348,7 +2355,7 @@ ma_fence fence; ma_sound sounds[4]; result = ma_fence_init(&fence); -if (result != MA_SUCCES) { +if (result != MA_SUCCESS) { return result; } @@ -2389,6 +2396,12 @@ from files and instead load from a data source.

+You can use ma_sound_init_copy() to initialize a copy of another sound. Note, however, that this +only works for sounds that were initialized with ma_sound_init_from_file() and without the +MA_SOUND_FLAG_STREAM flag. +

+

+ When you initialize a sound, if you specify a sound group the sound will be attached to that group automatically. If you set it to NULL, it will be automatically attached to the engine's endpoint. If you would instead rather leave the sound unattached by default, you can can specify the @@ -2633,10 +2646,32 @@ be looping by default. Use ma_sound_is_loop

Use ma_sound_at_end() to determine whether or not a sound is currently at the end. For a looping -sound this should never return true. +sound this should never return true. Alternatively, you can configure a callback that will be fired +when the sound reaches the end. Note that the callback is fired from the audio thread which means +you cannot be uninitializing sound from the callback. To set the callback you can use +ma_sound_set_end_callback(). Alternatively, if you're using ma_sound_init_ex(), you can pass it +into the config like so:

+

+
+soundConfig.endCallback = my_end_callback;
+soundConfig.pEndCallbackUserData = pMyEndCallbackUserData;
+

+ +The end callback is declared like so: +

+

+ +

+
+void my_end_callback(void* pUserData, ma_sound* pSound)
+{
+    ...
+}
+

+ Internally a sound wraps around a data source. Some APIs exist to control the underlying data source, mainly for convenience:

@@ -3383,14 +3418,14 @@ result = ma_node_graph_read_pcm_frames(&nodeGraph, pFramesOut, frameCount, &

When you read audio data, miniaudio starts at the node graph's endpoint node which then pulls in -data from it's input attachments, which in turn recusively pull in data from their inputs, and so +data from it's input attachments, which in turn recursively pull in data from their inputs, and so on. At the start of the graph there will be some kind of data source node which will have zero inputs and will instead read directly from a data source. The base nodes don't literally need to read from a ma_data_source object, but they will always have some kind of underlying object that sources some kind of audio. The ma_data_source_node node can be used to read from a ma_data_source. Data is always in floating-point format and in the number of channels you specified when the graph was initialized. The sample rate is defined by the underlying data sources. -It's up to you to ensure they use a consistent and appropraite sample rate. +It's up to you to ensure they use a consistent and appropriate sample rate.

@@ -3445,7 +3480,7 @@ deal with it for you.

Less frequently you may want to create a specialized node. This will be a node where you implement -your own processing callback to apply a custom effect of some kind. This is similar to initalizing +your own processing callback to apply a custom effect of some kind. This is similar to initializing one of the stock node types, only this time you need to specify a pointer to a vtable containing a pointer to the processing function and the number of input and output buses. Example:

@@ -3487,7 +3522,7 @@ pointer to the processing function and the number of input and output buses. Exa // Each bus needs to have a channel count specified. To do this you need to specify the channel // counts in an array and then pass that into the node config. ma_uint32 inputChannels[2]; // Equal in size to the number of input channels specified in the vtable. -ma_uint32 outputChannels[1]; // Equal in size to the number of output channels specicied in the vtable. +ma_uint32 outputChannels[1]; // Equal in size to the number of output channels specified in the vtable. inputChannels[0] = channelsIn; inputChannels[1] = channelsIn; @@ -3619,15 +3654,41 @@ MA_NODE_FLAG_CONTINUOUS_PROCESSING

+ +

+

+ + +

+

+ + +

+

+ + +

+

+ +

Causes the processing callback to be called even when no data is available to be read from input -attachments. This is useful for effects like +attachments. When a node has at least one input +bus, but there are no inputs attached or the +inputs do not deliver any data, the node's +processing callback will not get fired. This flag +will make it so the callback is always fired +regardless of whether or not any input data is +received. This is useful for effects like echos where there will be a tail of audio data that still needs to be processed even when the -original data sources have reached their ends.

+original data sources have reached their ends. It +may also be useful for nodes that must always +have their processing callback fired when there +are no inputs attached.

-Windows XP+ (may work on older versions, but untested)

+Windows 95+

- Copyright © 2022 David Reid
+ Copyright © 2023 David Reid
Developed by David Reid - mackron@gmail.com
diff --git a/index.html b/index.html index 1f057bec..1b27de3c 100644 --- a/index.html +++ b/index.html @@ -506,7 +506,7 @@ a.doc-navigation-l4 {
- Copyright © 2022 David Reid
+ Copyright © 2023 David Reid
Developed by David Reid - mackron@gmail.com