コード例 #1
0
ファイル: Program.cs プロジェクト: nathanchere/nFMOD
        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();
            }
        }
コード例 #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();
            }
        }
コード例 #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();
 }
コード例 #4
0
ファイル: frmMain.cs プロジェクト: nathanchere/nFMOD
        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();
        }
コード例 #5
0
ファイル: frmMain.cs プロジェクト: realeternia/nFMOD
        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();
        }