本文整理汇总了C#中Channel.DangerousGetHandle方法的典型用法代码示例。如果您正苦于以下问题:C# Channel.DangerousGetHandle方法的具体用法?C# Channel.DangerousGetHandle怎么用?C# Channel.DangerousGetHandle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Channel
的用法示例。
在下文中一共展示了Channel.DangerousGetHandle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PlaySound
private void PlaySound(Sound.Sound snd, bool paused, Channel.Channel chn)
{
//FIXME The handle is changed most of the time on some system.
//Only use the other metods to be safe.
IntPtr channel = chn.DangerousGetHandle ();
Error.Code ReturnCode = PlaySound (this.DangerousGetHandle (), Channel.Index.Reuse, snd.DangerousGetHandle (), paused, ref channel);
Error.Errors.ThrowError (ReturnCode);
//This can't really happend.
//Check just in case...
if(chn.DangerousGetHandle () == channel)
throw new Exception("Channel handle got changed by Fmod.");
}
示例2: PlayDsp
public void PlayDsp(Dsp.Dsp dsp, bool paused, Channel.Channel chn)
{
IntPtr channel = chn.DangerousGetHandle ();
Error.Code ReturnCode = PlayDsp (this.DangerousGetHandle (), Channel.Index.Reuse, dsp.DangerousGetHandle (), paused, ref channel);
Error.Errors.ThrowError (ReturnCode);
//This can't really happend.
//Check just in case...
if(chn.DangerousGetHandle () != channel)
throw new Exception("Channel handle got changed by Fmod.");
}