public void SetPlayer(string aFilePath) { bool lIsMute = player.IsMute; bool lIsLoop = player.IsLoop; float lVolume = player.Volume; title = Path.GetFileNameWithoutExtension(aFilePath); player = ConstructorCollection.ConstructPlayer(aFilePath); player.IsMute = lIsMute; player.IsLoop = lIsLoop; player.Volume = lVolume; }
private void PlayMusic(string aFilePath) { if (componentPlaylist.musicInformationDictionary.ContainsKey(aFilePath) == true) { bool lIsMute = player.IsMute; bool lIsLoop = player.IsLoop; float lVolume = player.Volume; player = ConstructorCollection.ConstructPlayer(aFilePath); player.IsMute = lIsMute; player.IsLoop = lIsLoop; player.Volume = lVolume; componentLoopEditor.SetPlayer(player, componentPlaylist.musicInformationDictionary[aFilePath]); componentLoopPlayer.SetPlayer(player); componentLoopSelector.SetPlayMusicInformation(componentPlaylist.musicInformationDictionary[aFilePath]); } else { if (componentInputlist.musicInformationDictionary.ContainsKey(aFilePath) == true) { IMusic lMusic = componentInputlist.musicInformationDictionary[aFilePath].music; LoopInformation lLoop = componentInputlist.musicInformationDictionary[aFilePath].music.Loop; PlayMusicInformation l = new PlayMusicInformation(0, false, lMusic, lLoop); bool lIsMute = player.IsMute; bool lIsLoop = player.IsLoop; float lVolume = player.Volume; player = ConstructorCollection.ConstructPlayer(aFilePath); player.IsMute = lIsMute; player.IsLoop = lIsLoop; player.Volume = lVolume; componentLoopEditor.SetPlayer(player, l); componentLoopPlayer.SetPlayer(player); componentLoopSelector.SetPlayMusicInformation(l); } } componentLoopEditor.UpdateMesh(); }
public void SetPlayer(string aFilePath, PlayMusicInformation aMusicInformation) { bool lIsMute = player.IsMute; bool lIsLoop = player.IsLoop; float lVolume = player.Volume; title = Path.GetFileNameWithoutExtension(aFilePath); player = ConstructorCollection.ConstructPlayer(aFilePath); if (aMusicInformation.isSelected == true) { SetLoop(aMusicInformation.loopPoint); } player.IsMute = lIsMute; player.IsLoop = lIsLoop; player.Volume = lVolume; playMusicInformation = aMusicInformation; componentLoopSelector.SetPlayMusicInformation(aMusicInformation); }