mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-24 01:04:02 +02:00
Add some clarification notes for device notifications.
This commit is contained in:
+18
-3
@@ -5821,6 +5821,21 @@ pNotification (in)
|
|||||||
Remarks
|
Remarks
|
||||||
-------
|
-------
|
||||||
Do not restart or uninitialize the device from the callback.
|
Do not restart or uninitialize the device from the callback.
|
||||||
|
|
||||||
|
Not all notifications will be triggered by all backends, however the started and stopped events
|
||||||
|
should be reliable for all backends. Some backends do not have a good way to detect device
|
||||||
|
stoppages due to unplugging the device which may result in the stopped callback not getting
|
||||||
|
fired. This has been observed with at least one BSD variant.
|
||||||
|
|
||||||
|
The rerouted notification is fired *after* the reroute has occurred. The stopped notification will
|
||||||
|
*not* get fired when a device is rerouted. The following backends are known to do automatic stream
|
||||||
|
rerouting, but do not have a way to be notified of the change:
|
||||||
|
|
||||||
|
* DirectSound
|
||||||
|
|
||||||
|
The interruption notifications are used on mobile platforms for detecting when audio is interrupted
|
||||||
|
due to things like an incoming phone call. Currently this is only implemented on iOS. None of the
|
||||||
|
Android backends will report this notification.
|
||||||
*/
|
*/
|
||||||
typedef void (* ma_device_notification_proc)(const ma_device_notification* pNotification);
|
typedef void (* ma_device_notification_proc)(const ma_device_notification* pNotification);
|
||||||
|
|
||||||
@@ -21692,9 +21707,9 @@ struct ma_IDirectSoundCapture
|
|||||||
{
|
{
|
||||||
ma_IDirectSoundCaptureVtbl* lpVtbl;
|
ma_IDirectSoundCaptureVtbl* lpVtbl;
|
||||||
};
|
};
|
||||||
static MA_INLINE HRESULT ma_IDirectSoundCapture_QueryInterface(ma_IDirectSoundCapture* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); }
|
static MA_INLINE HRESULT ma_IDirectSoundCapture_QueryInterface (ma_IDirectSoundCapture* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); }
|
||||||
static MA_INLINE ULONG ma_IDirectSoundCapture_AddRef(ma_IDirectSoundCapture* pThis) { return pThis->lpVtbl->AddRef(pThis); }
|
static MA_INLINE ULONG ma_IDirectSoundCapture_AddRef (ma_IDirectSoundCapture* pThis) { return pThis->lpVtbl->AddRef(pThis); }
|
||||||
static MA_INLINE ULONG ma_IDirectSoundCapture_Release(ma_IDirectSoundCapture* pThis) { return pThis->lpVtbl->Release(pThis); }
|
static MA_INLINE ULONG ma_IDirectSoundCapture_Release (ma_IDirectSoundCapture* pThis) { return pThis->lpVtbl->Release(pThis); }
|
||||||
static MA_INLINE HRESULT ma_IDirectSoundCapture_CreateCaptureBuffer(ma_IDirectSoundCapture* pThis, const MA_DSCBUFFERDESC* pDSCBufferDesc, ma_IDirectSoundCaptureBuffer** ppDSCBuffer, void* pUnkOuter) { return pThis->lpVtbl->CreateCaptureBuffer(pThis, pDSCBufferDesc, ppDSCBuffer, pUnkOuter); }
|
static MA_INLINE HRESULT ma_IDirectSoundCapture_CreateCaptureBuffer(ma_IDirectSoundCapture* pThis, const MA_DSCBUFFERDESC* pDSCBufferDesc, ma_IDirectSoundCaptureBuffer** ppDSCBuffer, void* pUnkOuter) { return pThis->lpVtbl->CreateCaptureBuffer(pThis, pDSCBufferDesc, ppDSCBuffer, pUnkOuter); }
|
||||||
static MA_INLINE HRESULT ma_IDirectSoundCapture_GetCaps (ma_IDirectSoundCapture* pThis, MA_DSCCAPS* pDSCCaps) { return pThis->lpVtbl->GetCaps(pThis, pDSCCaps); }
|
static MA_INLINE HRESULT ma_IDirectSoundCapture_GetCaps (ma_IDirectSoundCapture* pThis, MA_DSCCAPS* pDSCCaps) { return pThis->lpVtbl->GetCaps(pThis, pDSCCaps); }
|
||||||
static MA_INLINE HRESULT ma_IDirectSoundCapture_Initialize (ma_IDirectSoundCapture* pThis, const GUID* pGuidDevice) { return pThis->lpVtbl->Initialize(pThis, pGuidDevice); }
|
static MA_INLINE HRESULT ma_IDirectSoundCapture_Initialize (ma_IDirectSoundCapture* pThis, const GUID* pGuidDevice) { return pThis->lpVtbl->Initialize(pThis, pGuidDevice); }
|
||||||
|
|||||||
Reference in New Issue
Block a user