diff --git a/docs/manual/index.html b/docs/manual/index.html index 4fe4971d..fa34bcfb 100644 --- a/docs/manual/index.html +++ b/docs/manual/index.html @@ -353,7 +353,7 @@ device on the stack, but you could allocate it on the heap if that suits your si // Do something here. Probably your program's main loop. - ma_device_uninit(&device); // This will stop the device so no need to do that manually. + ma_device_uninit(&device); return 0; }

@@ -1054,6 +1054,34 @@ You cannot use -std=c* compiler flag

+You can enable the use of AudioWorkets by defining MA_ENABLE_AUDIO_WORKLETS and then compiling +with the following options: +

+ +

+ +An example for compiling with AudioWorklet support might look like this: +

+

+ + emcc program.c -o bin/program.html -DMA_ENABLE_AUDIO_WORKLETS -sAUDIO_WORKLET=1 -sWASM_WORKERS=1 -sASYNCIFY +

+

+ +To run locally, you'll need to use emrun: +

+

+ + emrun bin/program.html +

+

+ +

+

+

@@ -2913,7 +2941,7 @@ result = ma_data_source_read_pcm_frames(&dataSource, pDecodedData, frameCoun // ... -ma_resource_manager_data_source_uninit(pResourceManager, &dataSource); +ma_resource_manager_data_source_uninit(&dataSource);

The flags parameter specifies how you want to perform loading of the sound file. It can be a @@ -3220,10 +3248,10 @@ once after the other:

 ma_resource_manager_data_source_init(pResourceManager, "my_file", ..., &myDataBuffer0); // Refcount = 1. Initial load.
-ma_resource_manager_data_source_uninit(pResourceManager, &myDataBuffer0);               // Refcount = 0. Unloaded.
+ma_resource_manager_data_source_uninit(&myDataBuffer0);                                 // Refcount = 0. Unloaded.
 
 ma_resource_manager_data_source_init(pResourceManager, "my_file", ..., &myDataBuffer1); // Refcount = 1. Reloaded because previous uninit() unloaded it.
-ma_resource_manager_data_source_uninit(pResourceManager, &myDataBuffer1);               // Refcount = 0. Unloaded.
+ma_resource_manager_data_source_uninit(&myDataBuffer1);                                 // Refcount = 0. Unloaded.
 

A binary search tree (BST) is used for storing data buffers as it has good balance between @@ -4325,9 +4353,18 @@ example below:

-framesWritten = ma_encoder_write_pcm_frames(&encoder, pPCMFramesToWrite, framesToWrite);
+ma_uint64 framesWritten;
+result = ma_encoder_write_pcm_frames(&encoder, pPCMFramesToWrite, framesToWrite, &framesWritten);
+if (result != MA_SUCCESS) {
+    ... handle error ...
+}
 

+The framesWritten variable will contain the number of PCM frames that were actually written. This +is optionally and you can pass in NULL if you need this. +

+

+ Encoders must be uninitialized with ma_encoder_uninit().

@@ -5695,7 +5732,7 @@ you internally. Memory management is flexible and should support most use cases.

-Audio buffers are initialised using the standard configuration system used everywhere in miniaudio: +Audio buffers are initialized using the standard configuration system used everywhere in miniaudio: