Commit 4c409c82 authored by David Reid's avatar David Reid

API CHANGE: Remove ma_device_set_stop_callback().

With this change the stop callback must be set via the device config.
parent 4d341085
......@@ -103,6 +103,8 @@ Other API Changes
-----------------
Other less major API changes have also been made in version 0.10.
`ma_device_set_stop_callback()` has been removed. You now must set the stop callback via the device config just like the data callback.
`ma_sine_wave_read_f32()` and `ma_sine_wave_read_f32_ex()` have been removed and replaced with `ma_sine_wave_process_pcm_frames()` which supports outputting
PCM frames in any format (specified by a parameter).
......@@ -4063,30 +4065,6 @@ ma_device_stop()
*/
void ma_device_uninit(ma_device* pDevice);
/*
Sets the callback to use when the device has stopped, either explicitly or as a result of an error.
Parameters
----------
pDevice (in)
A pointer to the device whose stop callback is getting set.
onStop (in, nullable)
The new stop callback. Can be null.
Thread Safety
-------------
Safe. This API is implemented as a simple atomic assignment.
Callback Safety
---------------
Safe. This is just a simple assignment.
*/
void ma_device_set_stop_callback(ma_device* pDevice, ma_stop_proc onStop);
/*
Starts the device. For playback devices this begins playback. For capture devices it begins recording.
......@@ -28348,15 +28326,6 @@ void ma_device_uninit(ma_device* pDevice)
MA_ZERO_OBJECT(pDevice);
}
void ma_device_set_stop_callback(ma_device* pDevice, ma_stop_proc onStop)
{
if (pDevice == NULL) {
return;
}
ma_atomic_exchange_ptr(&pDevice->onStop, onStop);
}
ma_result ma_device_start(ma_device* pDevice)
{
ma_result result;
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