private static DLCPackageData ConvertAudio(DLCPackageData info) { var audioPath = info.OggPath; Console.WriteLine(@"Converting audio using: " + Path.GetFileName(audioPath)); var audioPathNoExt = Path.Combine(Path.GetDirectoryName(audioPath), Path.GetFileNameWithoutExtension(audioPath)); var oggPath = String.Format(audioPathNoExt + ".ogg"); var wavPath = String.Format(audioPathNoExt + ".wav"); var wemPath = String.Format(audioPathNoExt + ".wem"); var oggPreviewPath = String.Format(audioPathNoExt + "_preview.ogg"); var wavPreviewPath = String.Format(audioPathNoExt + "_preview.wav"); var wemPreviewPath = String.Format(audioPathNoExt + "_preview.wem"); var audioPreviewPath = wemPreviewPath; //RS1 old ogg was actually wwise if (audioPath.Substring(audioPath.Length - 4).ToLower() == ".ogg") { ExternalApps.Ogg2Wav(audioPath, wavPath); if (!File.Exists(oggPreviewPath)) { ExternalApps.Ogg2Preview(audioPath, oggPreviewPath); ExternalApps.Ogg2Wav(oggPreviewPath, wavPreviewPath); } audioPath = wavPath; } if (audioPath.Substring(audioPath.Length - 4).ToLower() == ".wav") { if (!File.Exists(wavPreviewPath)) { ExternalApps.Wav2Ogg(audioPath, oggPath, 4); ExternalApps.Ogg2Preview(oggPath, oggPreviewPath); ExternalApps.Ogg2Wav(oggPreviewPath, wavPreviewPath); } Wwise.Convert2Wem(audioPath, wemPath, 4); // default audio quality = 4 audioPath = wemPath; } info.OggPath = audioPath; info.OggPreviewPath = audioPreviewPath; return(info); }
public void Start() { music = ScriptableObject.CreateInstance("Wwise") as Wwise; GameOver.instance.HideScreen(0f); LevelUp.instance.HideScreen(0f); StartGame.instance.ShowScreen(0f); Score.instance.HideScreen(0f); LoadSettings(); ShowKeys(); if (!enableStartScreen) { StartGame.instance.HideScreen(0f); Begin(); return; } }