public DiverGame() { DefaultContent = Content; graphicsDeviceManager = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; IsMouseVisible = true; audioDevice = new AudioDevice(); audioMixer = new AudioMixer(audioDevice); state = new State(); state.Input = new Input(); }
public AudioMixer.Channel Play(float volume, float panning, float pitch, IAudioFX audioFX, AudioMixer mixer) { double rate = pitch * ((double)this.rate / mixer.SampleRate); return mixer.Play(new AudioClipSource(this, rate), volume, panning, audioFX); }
public AudioMixer(AudioDevice audioDevice) { audioDevice.AudioSource = this; SampleRate = audioDevice.SampleRate; MainMixer = this; }