all I know is that said loop occurs in the FMOD Studio DLL and that the script in question causes it (defining DEBUG_OFF makes it not hang)
using FMOD;
using UnityEngine;
public static class TrimEndThing
{
public static string TrimEnd(this string source, string value)
{
return source.EndsWith(value) ? source.Remove(source.LastIndexOf(value, System.StringComparison.Ordinal)) : source;
}
public static string TrimStart(this string source, string value)
{
return source.StartsWith(value) ? source.Substring(value.Length) : source;
}
}
public class FMODLowLevelMusicHandler : MonoBehaviour
{
public enum FadeState
{
NoFade,
FadeIn,
FadeOut,
};
public enum CrossfadeMode
{
FadeOutOnly,
FadeOutThenIn,
NoCrossfade
}
private FadeState fadeState = FadeState.FadeIn;
public CrossfadeMode crossfadeMode = CrossfadeMode.FadeOutOnly;
float[] fadeLevel = new float[6];
private float channel1Volume;
private float channel2Volume;
private float channel3Volume;
private float channel4Volume;
private float channel5Volume;
private float channel6Volume;
[Range(0.0f, 1.0f)] public float[] sliderTargetVolumes = { 0, 0, 0, 0, 0, 0 };
//private FMOD.System SystemEx;
private Sound baseSound;
private Sound baseSound02;
private Sound sound01;
private Channel channel01;
private Sound sound02;
private Channel channel02;
private ChannelGroup channelGroup;
bool hasInitializedMainSound = false;
bool hasInitializedSubSounds = false;
bool hasInitializedSound2 = false;
public string bank = "";
public uint loopStart = 0;
public bool reloadSound = false;
private bool hasLoadedAtLeastOnce;
private bool gotBus = false;
FMOD.Studio.Bus bus;
private bool loadTrack;
bool isApplicationQuitting = false;
public static FMODLowLevelMusicHandler Instance;
[System.Serializable]
public class StereoPair {
public string MusicStemTranslatedTag = "";
public int SliderIndex = 0;
public float Fade = 2.0f;
public float FadeIn = 2.0f;
public float FadeOut = 1.0f;
public float ForwardSend = 1.0f;
public float RearSend = 0.0f;
public bool Trigger = false;
};
[System.Serializable]
public class TrackData
{
public float MasterVolume = 1.0f;
public string TrackTranslatedTag = "";
public bool IsCopyrighted = false;
public bool IsSting = false;
public StereoPair[] StereoPairs = new StereoPair[1];
};
[SerializeField]
public TrackData currentTrack;
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
static void AutoRun()
{
GameObject obj = new GameObject("MusicHandlerEx", typeof(FMODLowLevelMusicHandler));
Instance = obj.GetComponent<FMODLowLevelMusicHandler>();
DontDestroyOnLoad(obj);
}
bool ERRCHECK(FMOD.RESULT result)
{
#if !DEBUG_OFF
if (result != FMOD.RESULT.OK)
{
Debug.LogError("FMOD Error (" + result.ToString() + "): " + FMOD.Error.String(result));
isQuitting = true;
ReloadSound(false);
reloadSound = false;
this.enabled = false;
}
return (result == FMOD.RESULT.OK);
#else
return true;
#endif
}
void Start()
{
//SystemEx = FMODUnity.RuntimeManager.CoreSystem;
fadeLevel = new float[6];
}
private void OnEnable()
{
isQuitting = false;
//ReloadSound(false);
fadeLevel = new float[6];
loadTrack = false;
}
public void SetFadeState(FadeState state)
{
fadeState = state;
}
bool hasPlayedAtLeastOneThing = false;
public void Play(string bank, float[] volumes)
{
Play(bank, volumes, 0);
}
public void Play(string bank, float[] volumes, int loopStart = 0)
{
Play(bank, volumes, (uint)loopStart);
}
public void Play(int bank, float[] volumes)
{
Play(bank, volumes, 0);
}
public void Play(int bank, float[] volumes, int loopStart = 0)
{
Play(bank, volumes, (uint)loopStart);
}
private string musFileNotFoundError = "Mus file not found for {0}";
public void Play(int bank, float[] volumes, uint loopStart = 0)
{
string bankString = null;
bankString = blurayguids.GetPathFromGuid(bank).TrimStart("audio/");
if (bankString != null)
Play(bankString, volumes, loopStart);
else
Debug.LogErrorFormat(musFileNotFoundError, blurayguids.guidToString(bank));
}
public void Play(string bank, float[] volumes, uint loopStart = 0) {
#if !DEBUG_OFF
if (bank != this.bank || !hasPlayedAtLeastOneThing) {
hasPlayedAtLeastOneThing = true;
this.bank = bank;
reloadSound = true;
setSlidersInstant(volumes);
this.loopStart = loopStart;
} else {
setSliders(volumes);
}
#endif
}
// Start is called before the first frame update
void LoadTrack()
{
#if !DEBUG_OFF
RESULT result;
var musFile = Resources.Load<TextAsset>(string.Format("audio/{0}", bank.TrimEnd("_prev")));
if (musFile == null)
{
ReloadSound(false);
reloadSound = false;
this.enabled = false;
Debug.LogErrorFormat(musFileNotFoundError, bank);
return;
}
ParseMusText(musFile.text);
//Debug.Log("set up parameters");
string bankpath = string.Format("{0}/audio/{1}.fsb", Application.streamingAssetsPath, bank);
MODE modes = MODE.LOOP_NORMAL | MODE._2D | MODE.CREATESTREAM | MODE.NONBLOCKING;
result = FMODUnity.RuntimeManager.CoreSystem.createStream(bankpath, modes, out baseSound);
ERRCHECK(result);
if (currentTrack.StereoPairs.Length > 3)
{
result = FMODUnity.RuntimeManager.CoreSystem.createStream(bankpath, modes, out baseSound02);
ERRCHECK(result);
//Debug.Log("Loaded IntMusic with more than 3 stereo pairs!");
}
loadTrack = false;
#endif
}
public void setSliders(float[] sliderValues)
{
sliderTargetVolumes = new float[6] { 0, 0, 0, 0, 0, 0 };
for (int i = 0; i < sliderValues.Length && i < 6; i++)
{
sliderTargetVolumes[i] = sliderValues[i];
}
}
public void setSlidersInstant(float[] sliderValues)
{
setSliders(sliderValues);
channel1Volume = sliderTargetVolumes[0];
channel2Volume = sliderTargetVolumes[1];
channel3Volume = sliderTargetVolumes[2];
channel4Volume = sliderTargetVolumes[3];
channel5Volume = sliderTargetVolumes[4];
channel6Volume = sliderTargetVolumes[5];
}
void setVolumes(float track1, float track2, float track3, float track4, float track5, float track6)
{
setVolumes(new float[6] { track1, track2, track3, track4, track5, track6 });
}
void setVolumes(float[] sliderValues)
{
float[] forwardSend = new float[6];
float[] rearSend = new float[6];
float[] fade = new float[6] { 1, 1, 1, 1, 1, 1 };
int[] sliderIndices = new int[6] { 0, 1, 2, 3, 4, 5 };
if (currentTrack == null || currentTrack.StereoPairs == null)
{
return;
}
for (int i = 0; i < currentTrack.StereoPairs.Length; i++)
{
forwardSend[i] = currentTrack.StereoPairs[i].ForwardSend;
rearSend[i] = currentTrack.StereoPairs[i].RearSend;
sliderIndices[i] = currentTrack.StereoPairs[i].SliderIndex;
fade[i] = currentTrack.StereoPairs[i].Fade;
if (fadeState == FadeState.FadeOut)
{
fadeLevel[i] = Mathf.Max(0, fadeLevel[i] - (Time.deltaTime/currentTrack.StereoPairs[i].FadeOut));
//if (fadeLevel[i] == 0)
// fadeState = FadeState.NoFade;
}
else if (fadeState == FadeState.FadeIn)
{
fadeLevel[i] = Mathf.Min(1, fadeLevel[i] + (Time.deltaTime/currentTrack.StereoPairs[i].FadeIn * 2.6f));
//if (fadeLevel == 1)
// fadeState = FadeState.NoFade;
}
}
for (int i = 0; i < 6-currentTrack.StereoPairs.Length; i++)
{
fadeLevel[currentTrack.StereoPairs.Length + i] = 0.0f;
}
if (fadeState != FadeState.FadeOut)
{
channel1Volume = Mathf.MoveTowards(channel1Volume, sliderTargetVolumes[0], Time.deltaTime/fade[sliderIndices[0]] * (channel1Volume > sliderTargetVolumes[0] ? 0.6f : 1.6f));
channel2Volume = Mathf.MoveTowards(channel2Volume, sliderTargetVolumes[1], Time.deltaTime/fade[sliderIndices[1]] * (channel2Volume > sliderTargetVolumes[1] ? 0.6f : 1.6f));
channel3Volume = Mathf.MoveTowards(channel3Volume, sliderTargetVolumes[2], Time.deltaTime/fade[sliderIndices[2]] * (channel3Volume > sliderTargetVolumes[2] ? 0.6f : 1.6f));
channel4Volume = Mathf.MoveTowards(channel4Volume, sliderTargetVolumes[3], Time.deltaTime/fade[sliderIndices[3]] * (channel4Volume > sliderTargetVolumes[3] ? 0.6f : 1.6f));
channel5Volume = Mathf.MoveTowards(channel5Volume, sliderTargetVolumes[4], Time.deltaTime/fade[sliderIndices[4]] * (channel5Volume > sliderTargetVolumes[4] ? 0.6f : 1.6f));
channel6Volume = Mathf.MoveTowards(channel6Volume, sliderTargetVolumes[5], Time.deltaTime/fade[sliderIndices[5]] * (channel6Volume > sliderTargetVolumes[5] ? 0.6f : 1.6f));
}
if ((fadeLevel[0] + fadeLevel[1] + fadeLevel[2] + fadeLevel[3] + fadeLevel[4] + fadeLevel[5]) <= (0 * currentTrack.StereoPairs.Length) && fadeState == FadeState.FadeOut)
fadeState = FadeState.NoFade;
if ((fadeLevel[0] + fadeLevel[1] + fadeLevel[2] + fadeLevel[3] + fadeLevel[4] + fadeLevel[5]) >= (1 * currentTrack.StereoPairs.Length) && fadeState == FadeState.FadeIn)
fadeState = FadeState.NoFade;
float volumePower = 1.5f;
float[] vol01 = new float[3] { sliderValues[sliderIndices[0]] * currentTrack.MasterVolume * fadeLevel[0], sliderValues[sliderIndices[1]] * currentTrack.MasterVolume * fadeLevel[1], sliderValues[sliderIndices[2]] * currentTrack.MasterVolume * fadeLevel[2] };
float[] vol02 = new float[3] { sliderValues[sliderIndices[3]] * currentTrack.MasterVolume * fadeLevel[3], sliderValues[sliderIndices[4]] * currentTrack.MasterVolume * fadeLevel[4], sliderValues[sliderIndices[5]] * currentTrack.MasterVolume * fadeLevel[5] };
for(int i=0; i<3; i++)
{
vol01[i] = Mathf.Pow(vol01[i], volumePower);
vol02[i] = Mathf.Pow(vol02[i], volumePower);
}
float[] matrix01_FL = new float[6];
float[] matrix01_FR = new float[6];
float[] matrix01_C = new float[6];
float[] matrix01_LFE = new float[6];
float[] matrix01_RL = new float[6];
float[] matrix01_RR = new float[6];
for (int i = 0; i < 3; i++)
{
matrix01_FL[i * 2] = vol01[i] * forwardSend[i];
matrix01_FR[i * 2] = 0;
matrix01_FL[(i * 2) + 1] = 0;
matrix01_FR[(i * 2) + 1] = vol01[i] * forwardSend[i];
matrix01_LFE[i * 2] = 0;// vol01[i] * forwardSend[i];
matrix01_LFE[(i * 2) + 1] = 0;// vol01[i] * forwardSend[i];
matrix01_RL[i * 2] = vol01[i] * rearSend[i];
matrix01_RR[i * 2] = 0;
matrix01_RL[(i * 2) + 1] = 0;
matrix01_RR[(i * 2) + 1] = vol01[i] * rearSend[i];
}
float[] matrix01 = new float[6*6];
matrix01_FL.CopyTo(matrix01, 6*0);
matrix01_FR.CopyTo(matrix01, 6*1);
matrix01_C.CopyTo(matrix01, 6*2);
matrix01_LFE.CopyTo(matrix01, 6*3);
matrix01_RL.CopyTo(matrix01, 6*4);
matrix01_RR.CopyTo(matrix01, 6*5);
if (hasInitializedSubSounds)
channel01.setMixMatrix(matrix01, 6, 6, 6);
if (currentTrack.StereoPairs.Length > 3)
{
float[] matrix02_FL = new float[6];
float[] matrix02_FR = new float[6];
float[] matrix02_C = new float[6];
float[] matrix02_LFE = new float[6];
float[] matrix02_RL = new float[6];
float[] matrix02_RR = new float[6];
for (int i = 0; i < 3; i++)
{
matrix02_FL[i * 2] = vol02[i] * forwardSend[i+3];
matrix02_FR[i * 2] = 0;
matrix02_FL[(i * 2) + 1] = 0;
matrix02_FR[(i * 2) + 1] = vol02[i] * forwardSend[i + 3];
matrix02_LFE[i * 2] = 0;// vol02[i] * forwardSend[i + 3];
matrix02_LFE[(i * 2) + 1] = 0;// vol02[i] * forwardSend[i + 3];
matrix02_RL[i * 2] = vol02[i] * rearSend[i + 3];
matrix02_RR[i * 2] = 0;
matrix02_RL[(i * 2) + 1] = 0;
matrix02_RR[(i * 2) + 1] = vol02[i] * rearSend[i + 3];
}
float[] matrix02 = new float[6*6];
matrix02_FL.CopyTo(matrix02, 6 * 0);
matrix02_FR.CopyTo(matrix02, 6 * 1);
matrix02_C.CopyTo(matrix02, 6 * 2);
matrix02_LFE.CopyTo(matrix02, 6 * 3);
matrix02_RL.CopyTo(matrix02, 6 * 4);
matrix02_RR.CopyTo(matrix02, 6 * 5);
if (hasInitializedSubSounds)
channel02.setMixMatrix(matrix02, 6, 6, 6);
}
}
// Update is called once per frame
void LateUpdate()
{
#if !DEBUG_OFF
if (isQuitting)
return;
RESULT result;
if (loadTrack && fadeState != FadeState.FadeOut)
{
setSlidersInstant(sliderTargetVolumes);
Reload();
hasInitializedMainSound = false;
hasInitializedSound2 = false;
hasInitializedSubSounds = false;
LoadTrack();
}
if (hasInitializedSubSounds)
{
setVolumes(new float[6] { channel1Volume, channel2Volume, channel3Volume, channel4Volume, channel5Volume, channel6Volume });
if (currentTrack.StereoPairs.Length > 3)
{
uint pos01ms;
uint pos02ms;
uint lengthms;
uint loopstartms;
channel01.getPosition(out pos01ms, TIMEUNIT.MS);
channel02.getPosition(out pos02ms, TIMEUNIT.MS);
sound01.getLength(out lengthms, TIMEUNIT.MS); // hopefully fixes jank regarding looping
sound01.getLoopPoints(out loopstartms, TIMEUNIT.MS, out _, TIMEUNIT.MS);
if (Mathf.Abs(pos01ms - pos02ms) > 2.0f/0.03f &&
Mathf.Min(Mathf.Abs(pos02ms - (pos01ms + loopstartms + lengthms)), Mathf.Abs(pos01ms - (pos02ms+loopstartms+lengthms))) > 2.0f / 0.03f &&
Mathf.Abs(pos01ms - loopstartms) > 2.0/0.03f &&
Mathf.Abs(pos02ms - loopstartms) > 2.0 / 0.03f &&
Mathf.Abs(pos01ms - lengthms) > 2.0 / 0.03f &&
Mathf.Abs(pos02ms - lengthms) > 2.0 / 0.03f
)
{
uint pos01;
uint pos02;
channel01.getPosition(out pos01, TIMEUNIT.PCM);
channel02.getPosition(out pos02, TIMEUNIT.PCM);
uint pos = (uint)Mathf.Max(pos01, pos02);
FMODUnity.RuntimeManager.CoreSystem.lockDSP(); // ensure synchronization
channel01.setPosition(pos, TIMEUNIT.PCM);
channel02.setPosition(pos, TIMEUNIT.PCM);
FMODUnity.RuntimeManager.CoreSystem.unlockDSP();
}
}
}
if (hasLoadedAtLeastOnce && fadeState != FadeState.FadeOut)
{
OPENSTATE openstate;
result = baseSound.getOpenState(out openstate, out _, out _, out _);
ERRCHECK(result);
if (openstate == FMOD.OPENSTATE.READY && !hasInitializedMainSound)
{
hasInitializedMainSound = true;
result = baseSound.getSubSound(0, out sound01);
ERRCHECK(result);
//Debug.Log("get sound 1");
}
OPENSTATE openstate01 = 0;
if (currentTrack.StereoPairs.Length > 3)
{
result = baseSound02.getOpenState(out openstate01, out _, out _, out _);
ERRCHECK(result);
}
if (openstate01 == FMOD.OPENSTATE.READY && !hasInitializedSound2 && currentTrack.StereoPairs.Length > 3)
{
hasInitializedSound2 = true;
result = baseSound02.getSubSound(1, out sound02);
ERRCHECK(result);
//Debug.Log("get sound 2");
}
OPENSTATE openstate02 = 0;
if (currentTrack.StereoPairs.Length > 3 && openstate01 == FMOD.OPENSTATE.READY)
{
result = sound02.getOpenState(out openstate02, out _, out _, out _);
ERRCHECK(result);
}
if (openstate == FMOD.OPENSTATE.READY && ((openstate01 == FMOD.OPENSTATE.READY && openstate02 == FMOD.OPENSTATE.READY) || currentTrack.StereoPairs.Length <= 3) && !hasInitializedSubSounds)
{
hasInitializedSubSounds = true;
if (!gotBus)
{
bus = FMODUnity.RuntimeManager.GetBus("bus:/master/music");
ERRCHECK(result);
ERRCHECK(bus.lockChannelGroup());
ERRCHECK(FMODUnity.RuntimeManager.StudioSystem.flushCommands());
ERRCHECK(bus.getChannelGroup(out channelGroup));
gotBus = true;
}
//Debug.Log("get channel group");
uint sound01loopend;
sound01.getLoopPoints(out _, TIMEUNIT.PCM, out sound01loopend, TIMEUNIT.PCM);
sound01.setLoopPoints(loopStart, TIMEUNIT.PCM, sound01loopend, TIMEUNIT.PCM);
if (currentTrack.StereoPairs.Length > 3)
{
uint sound02loopend;
sound02.getLoopPoints(out _, TIMEUNIT.PCM, out sound02loopend, TIMEUNIT.PCM);
sound02.setLoopPoints(loopStart, TIMEUNIT.PCM, sound02loopend, TIMEUNIT.PCM);
FMODUnity.RuntimeManager.CoreSystem.lockDSP(); // ensure synchronization
FMODUnity.RuntimeManager.CoreSystem.playSound(sound01, channelGroup, false, out channel01);
FMODUnity.RuntimeManager.CoreSystem.playSound(sound02, channelGroup, false, out channel02);
FMODUnity.RuntimeManager.CoreSystem.unlockDSP();
}
else
{
FMODUnity.RuntimeManager.CoreSystem.playSound(sound01, channelGroup, false, out channel01);
}
fadeState = crossfadeMode == CrossfadeMode.FadeOutThenIn ? FadeState.FadeIn : FadeState.NoFade;
if (crossfadeMode != CrossfadeMode.FadeOutThenIn)
{
for(int i = 0; i < fadeLevel.Length; i++)
{
fadeLevel[i] = 1.0f;
}
}
setVolumes(new float[6] { channel1Volume, channel2Volume, channel3Volume, channel4Volume, channel5Volume, channel6Volume });
string name01;
sound01.getName(out name01, 256);
if (currentTrack.StereoPairs.Length > 3)
{
string name02;
sound02.getName(out name02, 256);
//Debug.LogFormat("Now playing {0} and {1}", name01, name02);
}
else
{
//Debug.LogFormat("Now playing {0}", name01);
}
} else if (!hasInitializedSubSounds) {
LoadingIndicator.ShowLoadingIndicator();
}
}
if (reloadSound && FMODUnity.RuntimeManager.IsInitialized)
{
reloadSound = false;
ReloadSoundQueue();
}
#endif
}
private bool isQuitting;
void OnApplicationQuit()
{
#if !DEBUG_OFF
setSlidersInstant(sliderTargetVolumes);
isQuitting = true;
ReloadSound(false);
//SystemEx.release();
isApplicationQuitting = true;
#endif
}
void OnDisable()
{
#if !DEBUG_OFF
if (isApplicationQuitting)
{
isQuitting = true;
try
{
//ERRCHECK(sound01.release());
//sound01.clearHandle();
ERRCHECK(baseSound.release());
baseSound.clearHandle();
if (currentTrack.StereoPairs.Length > 3)
{
//ERRCHECK(sound02.release());
//sound02.clearHandle();
Debug.Log("releasing baseSound02");
ERRCHECK(baseSound02.release());
baseSound02.clearHandle();
}
}
catch (System.Exception e)
{
Debug.LogError(e.Message);
}
return;
}
else
{
hasLoadedAtLeastOnce = false;
ReloadSound(false);
}
#endif
}
void ReloadSoundQueue()
{
#if !DEBUG_OFF
if (hasLoadedAtLeastOnce)
{
fadeState = crossfadeMode != CrossfadeMode.NoCrossfade ? FadeState.FadeOut : FadeState.NoFade;
loadTrack = true;
}
else
{
ReloadSound(true);
}
#endif
}
void ReloadSound(bool runAwake)
{
#if !DEBUG_OFF
if (hasLoadedAtLeastOnce || !runAwake)
{
if (!isQuitting)
Reload();
hasInitializedMainSound = false;
hasInitializedSound2 = false;
hasInitializedSubSounds = false;
}
else if(runAwake)
{
hasLoadedAtLeastOnce = true;
}
if (runAwake)
loadTrack = true;
#endif
}
void Reload()
{
#if !DEBUG_OFF
//Debug.Log("Reloading!");
if (hasInitializedSubSounds)
{
try
{
//ERRCHECK(sound01.release());
ERRCHECK(baseSound.release());
if (currentTrack.StereoPairs.Length > 3) {
//ERRCHECK(sound02.release());
Debug.Log("releasing baseSound02");
ERRCHECK(baseSound02.release());
}
}
catch (System.Exception e)
{
Debug.LogError(e.Message);
}
}
#endif
}
void OnDestroy()
{
#if !DEBUG_OFF
isQuitting = true;
if (gotBus)
{
try
{
channelGroup.release();
bus.unlockChannelGroup();
} catch (System.Exception e)
{
Debug.LogError(e.Message);
}
}
#endif
}
void ParseMusText(string mus)
{
string[] splitMus = mus.Split('\n');
if (splitMus[0] != "MUSt")
{
Debug.LogError("No MUSt header found!");
return;
}
int currentPair = 0;
currentTrack = new TrackData();
for(int line = 0; line < splitMus.Length; line++)
{
string[] splitLine = splitMus[line].Split('#')[0].Split((char[])null, System.StringSplitOptions.RemoveEmptyEntries);
if (splitLine != null && splitLine.Length != 0)
{
switch (splitLine[0])
{
case "MasterVolume":
currentTrack.MasterVolume = float.Parse(splitLine[1]);
break;
case "TrackTranslatedTag":
currentTrack.TrackTranslatedTag = string.Join(" ", splitLine, 1, splitLine.Length - 1).Trim('"'); ;
break;
case "IsCopyrighted":
currentTrack.IsCopyrighted = splitLine[1] == "true";
break;
case "IsSting":
currentTrack.IsSting = splitLine[1] == "true";
break;
case "StereoPairs":
currentTrack.StereoPairs = new StereoPair[int.Parse(splitLine[1])];
for (int i = 0; i < currentTrack.StereoPairs.Length; i++)
currentTrack.StereoPairs[i] = new StereoPair();
break;
case "[0]":
currentPair = 0;
break;
case "[1]":
currentPair = 1;
break;
case "[2]":
currentPair = 2;
break;
case "[3]":
currentPair = 3;
break;
case "[4]":
currentPair = 4;
break;
case "[5]":
currentPair = 5;
break;
case "MusicStemTranslatedTag":
currentTrack.StereoPairs[currentPair].MusicStemTranslatedTag = string.Join(" ", splitLine, 1, splitLine.Length-1).Trim('"');
break;
case "SliderIndex":
currentTrack.StereoPairs[currentPair].SliderIndex = int.Parse(splitLine[1]);
break;
case "Fade":
currentTrack.StereoPairs[currentPair].Fade = float.Parse(splitLine[1]);
break;
case "FadeIn":
currentTrack.StereoPairs[currentPair].FadeIn = float.Parse(splitLine[1]);
break;
case "FadeOut":
currentTrack.StereoPairs[currentPair].FadeOut = float.Parse(splitLine[1]);
break;
case "ForwardSend":
currentTrack.StereoPairs[currentPair].ForwardSend = float.Parse(splitLine[1]);
break;
case "RearSend":
currentTrack.StereoPairs[currentPair].RearSend = float.Parse(splitLine[1]);
break;
case "Trigger":
currentTrack.StereoPairs[currentPair].Trigger = splitLine[1] == "true";
break;
}
}
}
}
}