public Audio(SoundOutMode mode) { Channel1 = new QuadChannel(); Channel2 = new QuadChannel(); Channel3 = new WaveChannel(); Channel4 = new NoiseChannel(); SampleRate = 44100; BufferSize = 1024; Enabled = true; ticks = 0; samples = 0; samplebuffer = new List <float>(); switch (mode) { default: case SoundOutMode.OpenAL: soundout = new ALSoundOut(this); break; case SoundOutMode.NAudio: soundout = new NAudioSoundOut(this); break; } }
public void Start() { if (Audios.Count >= 1) { PutMusicToPlayerWithAudioIndex(); Console.WriteLine("instartmethod"); SoundOut.Play(); } }
public void Play() { if (SoundOut == null) { return; } SoundOut.Volume = Volume; SoundOut.Play(); FileReader.Position = 0; }