Experimental: this API is experimental and might be changed or removed in the future.

AudioSampleProvider.SampleFramesEventNativeFunction

切换到手册
public delegatevoid SampleFramesEventNativeFunction (IntPtr userData, uint providerId, uint sampleFrameCount);

参数

userData设置处理程序时指定的用户数据。实际的 C 类型是 void*。
providerId提供程序 ID。请参阅 AudioSampleProvider.id
sampleFrameCount可用或溢出的样本帧数,具体取决于事件类型。

描述

表示用于处理样本帧事件的原生函数指针的类型。

样本帧事件为 AudioSampleProvider.sampleFramesAvailableAudioSampleProvider.sampleFramesOverflow

可通过以下方式从原生插件导入此类函数:

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