private void _loadCues() { FMOD.MUSIC_ITERATOR it = new FMOD.MUSIC_ITERATOR(); FMOD.RESULT result = FMOD.RESULT.OK; if (m_cues != null || m_musicSystem == null) { return; } m_cues = new List <FmodMusicCue>(); result = m_musicSystem.getCues(ref it, ""); //TODO: crash here. bad it init ? bad filter ? NOPE, just that a project must be loaded first. At least one. We might have to check on that. if (result == FMOD.RESULT.OK) { while (it.value.ToInt32() != 0) { FMOD.MUSIC_ENTITY entity = FmodMusicEntityBuilder.getMusicEntity(it); FmodMusicCue cue = new FmodMusicCue(entity, this); m_cues.Add(cue); } } else { Debug.LogError("FMOD_Unity: Error while loading music cues: " + FMOD.Error.String(result)); } }
public void endCue(string cueName) { FmodMusicCue cue = getMusicCue(cueName); if (cue != null) { loadMusicCue(cue); cue.end(); } }
public void beginCue(string cueName) { FmodMusicCue cue = getMusicCue(cueName); if (cue != null) { loadMusicCue(cue); cue.begin(); } }
public void promptMusicCue(FmodMusicCue cue) { FMOD.RESULT result = FMOD.RESULT.OK; if (cue != null && m_musicSystem != null) { result = m_musicSystem.promptCue((uint)cue.Id); ERRCHECK(result); } }
public void loadMusicCue(FmodMusicCue cue) { if (m_musicSystem != null && !cue.isLoaded()) { FMOD.RESULT result = FMOD.RESULT.OK; FMOD.MusicPrompt prompt = new FMOD.MusicPrompt(); result = m_musicSystem.prepareCue((uint)cue.Id, ref prompt); if (result == FMOD.RESULT.OK) { cue.setMusicPrompt(prompt); } } }
private void _loadCues() { FMOD.MUSIC_ITERATOR it = new FMOD.MUSIC_ITERATOR(); FMOD.RESULT result = FMOD.RESULT.OK; if (m_cues != null || m_musicSystem == null) { return ; } m_cues = new List<FmodMusicCue>(); result = m_musicSystem.getCues(ref it, ""); //TODO: crash here. bad it init ? bad filter ? NOPE, just that a project must be loaded first. At least one. We might have to check on that. if (result == FMOD.RESULT.OK) { while (it.value.ToInt32() != 0) { FMOD.MUSIC_ENTITY entity = FmodMusicEntityBuilder.getMusicEntity(it); FmodMusicCue cue = new FmodMusicCue(entity, this); m_cues.Add(cue); } } else { Debug.LogError("FMOD_Unity: Error while loading music cues: " + FMOD.Error.String(result)); } }
public void promptMusicCue(FmodMusicCue cue) { FMOD.RESULT result = FMOD.RESULT.OK; if (cue != null && m_musicSystem != null) { result = m_musicSystem.promptCue((uint)cue.Id); ERRCHECK(result); } }
public void loadMusicCue(FmodMusicCue cue) { if (m_musicSystem != null && !cue.isLoaded()) { FMOD.RESULT result = FMOD.RESULT.OK; FMOD.MusicPrompt prompt = new FMOD.MusicPrompt(); result = m_musicSystem.prepareCue((uint)cue.Id, ref prompt); if (result == FMOD.RESULT.OK) { cue.setMusicPrompt(prompt); } } }