Add some documentation for the data callback.

This clarifies that frameCount won't necessarily be exactly what the
client asked for when initializing the device.
This commit is contained in:
David Reid
2019-06-15 07:39:05 +10:00
parent 3567e930c7
commit c4f69699f0
+3 -1
View File
@@ -1770,7 +1770,9 @@ pInput is a pointer to a buffer containing input data from the device. This will
null for a playback device.
frameCount is the number of PCM frames to process. If an output buffer is provided (pOutput is not null), applications should write out
to the entire output buffer.
to the entire output buffer. Note that frameCount will not necessarily be exactly what you asked for when you initialized the deviced.
The bufferSizeInFrames and bufferSizeInMilliseconds members of the device config are just hints, and are not necessarily exactly what
you'll get.
Do _not_ call any miniaudio APIs from the callback. Attempting the stop the device can result in a deadlock. The proper way to stop the
device is to call ma_device_stop() from a different thread, normally the main application thread.