AudioSampleProvider.SampleFramesEventNativeFunction
Type that represents the native function pointer for handling sample frame events.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Delegate
- Namespace: UnityEngine.Experimental.Audio
- Assembly: UnityEngine.AudioModule
public delegate void AudioSampleProvider.SampleFramesEventNativeFunction(nint userData, uint providerId, uint sampleFrameCount)
Remarks
Sample frames events are AudioSampleProvider.sampleFramesAvailable and AudioSampleProvider.sampleFramesOverflow.
Importing such a function from a native plug-in would be done this way:
Examples
[DllImport(pluginName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]private static extern void SampleFramesAvailable(IntPtr userData, uint id, uint sampleFrameCount);