public static void EachFrame() { if (1 <= PlayInfos.Count) { PlayInfo info = PlayInfos.Dequeue(); if (info != null) { switch (info.Command) { case PlayInfo.Command_e.PLAY: DDSoundUtils.Play(info.Music.Sound.GetHandle(0), info.Once, info.Resume); break; case PlayInfo.Command_e.VOLUME_RATE: DDSoundUtils.SetVolume(info.Music.Sound.GetHandle(0), DDSoundUtils.MixVolume(DDGround.MusicVolume, info.Music.Volume) * info.VolumeRate); break; case PlayInfo.Command_e.STOP: DDSoundUtils.Stop(info.Music.Sound.GetHandle(0)); break; default: throw new DDError(); } } } }
public static bool EachFrame() // ret: ? 処理した。 { if (1 <= PlayInfos.Count) { PlayInfo info = PlayInfos.Dequeue(); if (info != null) { switch (info.AlterCommand) { case PlayInfo.AlterCommand_e.NORMAL: info.SE.HandleIndex %= DDSE.HANDLE_COUNT; DDSoundUtils.Play(info.SE.Sound.GetHandle(info.SE.HandleIndex++)); break; case PlayInfo.AlterCommand_e.STOP: for (int index = 0; index < DDSE.HANDLE_COUNT; index++) { DDSoundUtils.Stop(info.SE.Sound.GetHandle(index)); } break; case PlayInfo.AlterCommand_e.LOOP: DDSoundUtils.Play(info.SE.Sound.GetHandle(0), false); break; default: throw new DDError(); } return(true); } } return(false); }
public static bool EachFrame() // ret: ? 処理した。 { if (1 <= PlayInfos.Count) { PlayInfo info = PlayInfos.Dequeue(); if (info != null) { switch (info.AlterCommand) { case PlayInfo.AlterCommand_e.NORMAL: info.SE.HandleIndex++; info.SE.HandleIndex %= info.SE.Sound.HandleCount; if (DDSoundUtils.IsPlaying(info.SE.Sound.GetHandle(info.SE.HandleIndex))) { for (info.SE.HandleIndex = 0; info.SE.HandleIndex < info.SE.Sound.HandleCount; info.SE.HandleIndex++) { if (!DDSoundUtils.IsPlaying(info.SE.Sound.GetHandle(info.SE.HandleIndex))) { goto foundNotPlaying; } } //info.SE.HandleIndex = info.SE.Sound.HandleCount; info.SE.Sound.Extend(); //ProcMain.WriteLog("音を拡張しました。" + info.SE.Sound.HandleCount); } foundNotPlaying: DDSoundUtils.Play(info.SE.Sound.GetHandle(info.SE.HandleIndex)); break; case PlayInfo.AlterCommand_e.STOP: for (int index = 0; index < info.SE.Sound.HandleCount; index++) { DDSoundUtils.Stop(info.SE.Sound.GetHandle(index)); } break; case PlayInfo.AlterCommand_e.LOOP: DDSoundUtils.Play(info.SE.Sound.GetHandle(0), false); break; default: throw new DDError(); } return(true); } } return(false); }
public static void EachFrame() { if (1 <= PlayInfos.Count) { PlayInfo info = PlayInfos.Dequeue(); if (info != null) { switch (info.Command) { case PlayInfo.Command_e.PLAY: DDSoundUtils.Play(info.Music.Sound.GetHandle(0), info.Once, info.Resume); break; case PlayInfo.Command_e.VOLUME_RATE: DDSoundUtils.SetVolume(info.Music.Sound.GetHandle(0), DDSoundUtils.MixVolume(DDGround.MusicVolume, info.Music.Volume) * info.VolumeRate); break; case PlayInfo.Command_e.STOP: DDSoundUtils.Stop(info.Music.Sound.GetHandle(0)); #if true // 再生していたローカルBGMのみ解放する。 if (info.Music.Locally) { info.Music.Sound.Unload(); } #else // 全てのローカルBGMを解放する。 DDMusicUtils.UnloadLocally(); #endif break; default: throw new DDError(); } } } }