Beispiel #1
0
        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();
        }
Beispiel #2
0
 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);
 }
Beispiel #3
0
 public AudioMixer(AudioDevice audioDevice)
 {
     audioDevice.AudioSource = this;
     SampleRate = audioDevice.SampleRate;
     MainMixer = this;
 }