# AudioSampleProvider.SampleFramesEventNativeFunction

> Type that represents the native function pointer for handling sample frame events.

## Definition

* **Type:** Delegate
* **Namespace:** [UnityEngine.Experimental.Audio](/engine/6000.5/script-reference/unityengine/experimental/audio.md)
* **Assembly:** UnityEngine.AudioModule

```csharp
public delegate void AudioSampleProvider.SampleFramesEventNativeFunction(nint userData, uint providerId, uint sampleFrameCount)
```

## Remarks

Sample frames events are [AudioSampleProvider.sampleFramesAvailable](/engine/6000.5/script-reference/unityengine/experimental/audio/audiosampleprovider/sampleframesavailable.md) and [AudioSampleProvider.sampleFramesOverflow](/engine/6000.5/script-reference/unityengine/experimental/audio/audiosampleprovider/sampleframesoverflow.md).

Importing such a function from a native plug-in would be done this way:

## Examples

```csharp
[DllImport(pluginName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void SampleFramesAvailable(IntPtr userData, uint id, uint sampleFrameCount);
```
