Commit 943ca217 authored by David Reid's avatar David Reid

More documentation updates.

parent b58e315c
...@@ -2326,6 +2326,7 @@ The data callback is fired by miniaudio whenever the device needs to have more d ...@@ -2326,6 +2326,7 @@ The data callback is fired by miniaudio whenever the device needs to have more d
available. This is called as soon as the backend asks for more data which means it may be called with inconsistent frame counts. You cannot assume the available. This is called as soon as the backend asks for more data which means it may be called with inconsistent frame counts. You cannot assume the
callback will be fired with a consistent frame count. callback will be fired with a consistent frame count.
Parameters Parameters
---------- ----------
pDevice (in) pDevice (in)
...@@ -2344,6 +2345,7 @@ frameCount (in) ...@@ -2344,6 +2345,7 @@ frameCount (in)
`bufferSizeInFrames` and `bufferSizeInMilliseconds` members of the device config are just hints, and are not necessarily exactly what you'll get. You must `bufferSizeInFrames` and `bufferSizeInMilliseconds` members of the device config are just hints, and are not necessarily exactly what you'll get. You must
not assume this will always be the same value each time the callback is fired. not assume this will always be the same value each time the callback is fired.
Remarks Remarks
------- -------
You cannot stop and start the device from inside the callback or else you'll get a deadlock. You must also not uninitialize the device from inside the You cannot stop and start the device from inside the callback or else you'll get a deadlock. You must also not uninitialize the device from inside the
...@@ -2365,6 +2367,15 @@ The callback for when the device has been stopped. ...@@ -2365,6 +2367,15 @@ The callback for when the device has been stopped.
This will be called when the device is stopped explicitly with `ma_device_stop()` and also called implicitly when the device is stopped through external forces This will be called when the device is stopped explicitly with `ma_device_stop()` and also called implicitly when the device is stopped through external forces
such as being unplugged or an internal error occuring. such as being unplugged or an internal error occuring.
Parameters
----------
pDevice (in)
A pointer to the device that has just stopped.
Remarks
-------
Do not restart or uninitialize the device from the callback. Do not restart or uninitialize the device from the callback.
*/ */
typedef void (* ma_stop_proc)(ma_device* pDevice); typedef void (* ma_stop_proc)(ma_device* pDevice);
...@@ -2372,6 +2383,7 @@ typedef void (* ma_stop_proc)(ma_device* pDevice); ...@@ -2372,6 +2383,7 @@ typedef void (* ma_stop_proc)(ma_device* pDevice);
/* /*
The callback for handling log messages. The callback for handling log messages.
Parameters Parameters
---------- ----------
pContext (in) pContext (in)
...@@ -2382,14 +2394,20 @@ pDevice (in) ...@@ -2382,14 +2394,20 @@ pDevice (in)
logLevel (in) logLevel (in)
The log level. This can be one of the following: The log level. This can be one of the following:
MA_LOG_LEVEL_VERBOSE
MA_LOG_LEVEL_INFO |----------------------|
MA_LOG_LEVEL_WARNING | Log Level |
MA_LOG_LEVEL_ERROR |----------------------|
| MA_LOG_LEVEL_VERBOSE |
| MA_LOG_LEVEL_INFO |
| MA_LOG_LEVEL_WARNING |
| MA_LOG_LEVEL_ERROR |
|----------------------|
message (in) message (in)
The log message. The log message.
Remarks Remarks
------- -------
Do not modify the state of the device from inside the callback. Do not modify the state of the device from inside the callback.
...@@ -3240,7 +3258,25 @@ struct ma_device ...@@ -3240,7 +3258,25 @@ struct ma_device
#endif #endif
/* /*
Helper function for initializing a ma_context_config object. Initializes a `ma_context_config` object.
Return Value
------------
A `ma_context_config` initialized to defaults.
Remarks
-------
You must always use this to initialize the default state of the `ma_context_config` object. Not using this will result in your program breaking when miniaudio
is updated and new members are added to `ma_context_config`. It also sets logical defaults.
You can override members of the returned object by changing it's members directly.
See Also
--------
ma_context_init()
*/ */
ma_context_config ma_context_config_init(void); ma_context_config ma_context_config_init(void);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment