本文整理汇总了C#中CHANNEL_CALLBACK类的典型用法代码示例。如果您正苦于以下问题:C# CHANNEL_CALLBACK类的具体用法?C# CHANNEL_CALLBACK怎么用?C# CHANNEL_CALLBACK使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CHANNEL_CALLBACK类属于命名空间,在下文中一共展示了CHANNEL_CALLBACK类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: SetCallback
public void SetCallback(Action<ChannelControlCallbackType, IntPtr, IntPtr> callback)
{
//Remove previous callback
RemoveCallback();
//Passing in null to set removes any existing callbacks
if (callback == null)
return;
//Keep a reference to the callback handler
//Create a callback which wraps the actual callback
//This will clean itself up when the "end" event happens
var callbackFunction = new CHANNEL_CALLBACK((channelraw, controltype, type, commanddata1, commanddata2) =>
{
//Call the real callback
callback((ChannelControlCallbackType)type, commanddata1, commanddata2);
//Clean up as necessary
if (type == CHANNELCONTROL_CALLBACK_TYPE.END)
{
// End of sound, we can release our callback handle now
_callbackHandle = null;
}
return RESULT.OK;
});
//Set the callback into FMOD
_fmod.setCallback(callbackFunction).Check();
// Hold the delegate object in memory
_callbackHandle = callbackFunction;
}
开发者ID:HakanL,项目名称:SupersonicSound,代码行数:33,代码来源:CallbackHandler.cs
示例2: MusicPlayer
public MusicPlayer()
{
RESULT result;
result = Factory.System_Create(ref system);
ErrCheck(result);
uint version = 0;
result = system.getVersion(ref version);
ErrCheck(result);
if (version < VERSION.number)
throw new ApplicationException("Error! You are using an old version of FMOD " + version.ToString("X") + ". This program requires " + VERSION.number.ToString("X") + ".");
result = system.init(32, INITFLAGS.NORMAL, (IntPtr)null);
ErrCheck(result);
channelCallback = new CHANNEL_CALLBACK(OnEndMusic);
}
开发者ID:Pamilator,项目名称:mywindowmediaplayer-epitech2013,代码行数:15,代码来源:MusicPlayer.cs
示例3: Music
public Music(FMOD.System system, string intropath, string looppath, float baseVol)
{
this.system = system;
callback = new CHANNEL_CALLBACK(SyncCallback);
baseVolume = baseVol;
volume = 1;
if (looppath != null) system.createSound(looppath, MODE.LOOP_NORMAL, ref loop);
if (intropath != null)
{
system.createSound(intropath, MODE.DEFAULT, ref intro);
}
Playing = false;
}
开发者ID:Tesserex,项目名称:C--MegaMan-Engine,代码行数:17,代码来源:Music.cs
示例4: FMOD_Channel_SetCallback
private static extern RESULT FMOD_Channel_SetCallback(IntPtr channel, CHANNEL_CALLBACK callback);
开发者ID:huming2207,项目名称:ghgame,代码行数:1,代码来源:fmod.cs
示例5: setCallback
public RESULT setCallback(CHANNEL_CALLBACK callback)
{
return FMOD_Channel_SetCallback(channelraw, callback);
}
开发者ID:huming2207,项目名称:ghgame,代码行数:4,代码来源:fmod.cs
示例6: setCallback
public RESULT setCallback(CHANNEL_CALLBACK callback)
{
return FMOD_ChannelGroup_SetCallback(rawPtr, callback);
}
开发者ID:Cocotus,项目名称:simple-music-player,代码行数:4,代码来源:fmod.cs
示例7: FMOD5_ChannelGroup_SetCallback
private static extern RESULT FMOD5_ChannelGroup_SetCallback(IntPtr channelgroup, CHANNEL_CALLBACK callback);
开发者ID:ajm1996,项目名称:SpaceSalvage,代码行数:1,代码来源:fmod.cs
示例8: FMOD_Channel_SetCallback
private static extern RESULT FMOD_Channel_SetCallback(IntPtr channel, CHANNEL_CALLBACKTYPE type, CHANNEL_CALLBACK callback, int command);
开发者ID:olbers,项目名称:sauip4,代码行数:1,代码来源:fmod.cs
示例9: setCallback
public RESULT setCallback(CHANNEL_CALLBACKTYPE type, CHANNEL_CALLBACK callback, int command)
{
return FMOD_Channel_SetCallback(channelraw, type, callback, command);
}
开发者ID:olbers,项目名称:sauip4,代码行数:4,代码来源:fmod.cs
示例10: setCallback
public RESULT setCallback(CHANNEL_CALLBACK callback)
{
return ChannelControl.FMOD5_ChannelGroup_SetCallback(this.rawPtr, callback);
}
开发者ID:GameDiffs,项目名称:TheForest,代码行数:4,代码来源:ChannelControl.cs
示例11: WavEffect
public WavEffect(FMOD.System system, string path, bool loop, float baseVol)
{
this.system = system;
callback = new CHANNEL_CALLBACK(SyncCallback);
baseVolume = baseVol;
volume = 1;
system.createSound(path, MODE.SOFTWARE | (loop ? MODE.LOOP_NORMAL : MODE.LOOP_OFF), ref sound);
channel = new Channel();
playCount = 0;
}
开发者ID:Tesserex,项目名称:C--MegaMan-Engine,代码行数:12,代码来源:SoundEffect.cs
注:本文中的CHANNEL_CALLBACK类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论