public PlayerXm(string aFilePath) { MusicXm lMusicXm = ( MusicXm )LoaderMusic.Load(aFilePath); sequencer = new XmSequencer(lMusicXm); float lVolume = ( float )(40.0d * Math.Log10(0.5f)); volume = ( float )Math.Pow(10.0d, lVolume / 20.0d) * 2.0f; }
public PlayerMidi(string aFilePath) { MusicMidi lMusic = ( MusicMidi )LoaderMusic.Load(aFilePath); sequencer = new MidiSequencer(lMusic, new MidiSynthesizer()); updatePlayCurrent = sequencer.UpdatePlay; float lVolume = ( float )(40.0d * Math.Log10(0.5f)); volume = ( float )Math.Pow(10.0d, lVolume / 20.0d) * 2.0f; }
public PlayerNsf(string aFilePath) { MusicNsf lMusic = ( MusicNsf )LoaderMusic.Load(aFilePath); Logger.LogNormal("Load"); midiSynthesizer = new MidiSynthesizer(); midiSynthesizer.SetVolume(( UInt16 )0x4000); midiSynthesizer.MonoModeOn(1); nesState = new NesState(lMusic); NesCpu.InitNsf(nesState); float lVolume = ( float )(40.0d * Math.Log10(0.5f)); volume = ( float )Math.Pow(10.0d, lVolume / 20.0d); Init(); }
private void LoadLoop() { data.fileInfoList = new List <FileInfo>(); data.loopPointList = new List <LoopInformation>(); for (int i = 0; i < pathArray.Length; i++) { string lPath = pathArray[i]; if (musicDictionary.ContainsKey(lPath) == false) { IMusic lMusic = null; try { lMusic = LoaderMusic.Load(lPath); } catch (Exception aExpection) { Debug.LogWarning("ViewLoopPlaylist Exception:" + aExpection.ToString() + ":" + lPath); } if (lMusic != null) { musicDictionary.Add(lPath, lMusic); data.fileInfoList.Add(new FileInfo(lPath)); if (lMusic.Loop != null && lMusic.Loop.Count > 0) { data.loopPointList.Add(lMusic.Loop[0][0]); } else { data.loopPointList.Add(new LoopInformation(44100, 0, 0)); } } } } }
public PlayerPcm(string aFilePath) : this(( MusicPcm )LoaderMusic.Load(aFilePath)) { }