Example #1
0
        void Run()
        {
            var quit = new ManualResetEvent(false);
            Console.CancelKeyPress += (s, a) => {
                quit.Set();
                a.Cancel = true;
            };

            using (var fmod = new FmodSystem())
            {
                fmod.Init();
                using (oscillator = (Oscillator)fmod.CreateDsp(DspType.Oscillator))
                {
                    oscillator.Play();

                    while (!quit.WaitOne(0))
                    {
                        ShowPrompt();
                        ProcessInput(quit);
                        Thread.Sleep(1);
                    }
                }
                fmod.CloseSystem();
            }
        }
Example #2
0
        void Run()
        {
            var quit = new ManualResetEvent(false);

            Console.CancelKeyPress += (s, a) => {
                quit.Set();
                a.Cancel = true;
            };

            using (var fmod = new FmodSystem())
            {
                fmod.Init();
                using (oscillator = (Oscillator)fmod.CreateDsp(DspType.Oscillator))
                {
                    oscillator.Play();

                    while (!quit.WaitOne(0))
                    {
                        ShowPrompt();
                        ProcessInput(quit);
                        Thread.Sleep(1);
                    }
                }
                fmod.CloseSystem();
            }
        }
Example #3
0
 private void btnPlay_Click(object sender, EventArgs e)
 {
     if (channel != null && channel.IsPlaying)
     {
         return;
     }
     oscillator = (Oscillator)fmod.CreateDsp(DspType.Oscillator);
     channel    = oscillator.Play();
 }
Example #4
0
        private void btnGetSystemObjectWhenNotInitialized_Click(object sender, EventArgs e)
        {
            var fmod = new FmodSystem();
            fmod.Init();
            var dsp = fmod.CreateDsp(DspType.Oscillator);
            var channel = fmod.PlayDsp(dsp);

            var fmod2 = channel.SystemInstance;

            fmod.CloseSystem();
        }
Example #5
0
        private void btnGetSystemObjectWhenNotInitialized_Click(object sender, EventArgs e)
        {
            var fmod = new FmodSystem();

            fmod.Init();
            var dsp     = fmod.CreateDsp(DspType.Oscillator);
            var channel = fmod.PlayDsp(dsp);

            var fmod2 = channel.SystemInstance;

            fmod.CloseSystem();
        }