本文整理汇总了C#中FMOD.ADVANCEDSETTINGS类的典型用法代码示例。如果您正苦于以下问题:C# ADVANCEDSETTINGS类的具体用法?C# ADVANCEDSETTINGS怎么用?C# ADVANCEDSETTINGS使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ADVANCEDSETTINGS类属于FMOD命名空间,在下文中一共展示了ADVANCEDSETTINGS类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FMOD_System_SetAdvancedSettings
private static extern RESULT FMOD_System_SetAdvancedSettings(IntPtr system, ref ADVANCEDSETTINGS settings);
示例2: setAdvancedSettings
public RESULT setAdvancedSettings(ref ADVANCEDSETTINGS settings)
{
return FMOD_System_SetAdvancedSettings(systemraw, ref settings);
}
示例3: getAdvancedSettings
public RESULT getAdvancedSettings (ref ADVANCEDSETTINGS settings)
{
settings.cbSize = Marshal.SizeOf(settings);
return FMOD_System_GetAdvancedSettings(rawPtr, ref settings);
}
示例4: Init
void Init()
{
FMOD.Studio.UnityUtil.Log("FMOD_StudioSystem: Initialize");
if (isInitialized)
{
return;
}
DontDestroyOnLoad(gameObject);
FMOD.Studio.UnityUtil.Log("FMOD_StudioSystem: System_Create");
ERRCHECK(FMOD.Studio.System.create(out system));
FMOD.Studio.INITFLAGS flags = FMOD.Studio.INITFLAGS.NORMAL;
FMOD.System sys;
ERRCHECK(system.getLowLevelSystem(out sys));
FMOD.ADVANCEDSETTINGS advancedSettings = new FMOD.ADVANCEDSETTINGS();
advancedSettings.randomSeed = (uint) DateTime.Now.Ticks;
#if FMOD_LIVEUPDATE
flags |= FMOD.Studio.INITFLAGS.LIVEUPDATE;
// Unity 5 liveupdate workaround
if (Application.unityVersion.StartsWith("5"))
{
FMOD.Studio.UnityUtil.LogWarning("FMOD_StudioSystem: detected Unity 5, running on port 9265");
advancedSettings.profilePort = 9265;
}
#endif
ERRCHECK(sys.setAdvancedSettings(ref advancedSettings));
#if FMOD_DEBUG
FMOD.Debug.Initialize(FMOD.DEBUG_FLAGS.LOG, FMOD.DEBUG_MODE.FILE, null, "fmod.log");
#endif
FMOD.Studio.UnityUtil.Log("FMOD_StudioSystem: system.init");
FMOD.RESULT result = FMOD.RESULT.OK;
result = system.initialize(1024, flags, FMOD.INITFLAGS.NORMAL, global::System.IntPtr.Zero);
if (result == FMOD.RESULT.ERR_HEADER_MISMATCH)
{
FMOD.Studio.UnityUtil.LogError("Version mismatch between C# script and FMOD binary, restart Unity and reimport the integration package to resolve this issue.");
}
else
{
ERRCHECK(result);
}
// Dummy flush and update to get network state
ERRCHECK(system.flushCommands());
result = system.update();
// Restart without liveupdate if there was a socket error
if (result == FMOD.RESULT.ERR_NET_SOCKET_ERROR)
{
FMOD.Studio.UnityUtil.LogWarning("LiveUpdate disabled: socket in already in use");
flags &= ~FMOD.Studio.INITFLAGS.LIVEUPDATE;
ERRCHECK(system.release());
ERRCHECK(FMOD.Studio.System.create(out system));
ERRCHECK(system.getLowLevelSystem(out sys));
advancedSettings = new FMOD.ADVANCEDSETTINGS();
advancedSettings.randomSeed = (uint) DateTime.Now.Ticks;
ERRCHECK(sys.setAdvancedSettings(ref advancedSettings));
result = system.initialize(1024, flags, FMOD.INITFLAGS.NORMAL, global::System.IntPtr.Zero);
ERRCHECK(result);
}
#if UNITY_EDITOR && FMOD_DEBUG
var fileStream = new FileStream("fmod.log",FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
logReader = new StreamReader(fileStream);
#endif
isInitialized = true;
}
示例5: setAdvancedSettings
public RESULT setAdvancedSettings(ref ADVANCEDSETTINGS settings)
{
settings.cbSize = Marshal.SizeOf(settings);
return System.FMOD5_System_SetAdvancedSettings(this.rawPtr, ref settings);
}
示例6: getAdvancedSettings
public RESULT getAdvancedSettings (ref ADVANCEDSETTINGS settings)
{
return FMOD_System_GetAdvancedSettings(rawPtr, ref settings);
}