Esempio n. 1
0
        private void timer_Tick(object sender, System.EventArgs e)
        {
            if (system != null && sound != null)
            {
                uint recordpos = 0;
                uint playpos   = 0;
                bool recording = false;
                bool playing   = false;

                system.isRecording(selected, ref recording);
                system.getRecordPosition(selected, ref recordpos);

                if (channel != null)
                {
                    channel.isPlaying(ref playing);;

                    channel.getPosition(ref playpos, FMOD.TIMEUNIT.PCM);
                }

                statusBar.Text = "State:" + (recording ? playing ? " Recording / playing " : " Recording " : playing ? " Playing " : " Idle ")
                                 + " Record pos = " + recordpos + " Play pos = " + playpos + " Loop " + (looping ? "On" : "Off");
            }
            if (system != null)
            {
                system.update();
            }
        }