Example #1
0
        public double Step(double deltaTime)
        {
            var sample = AudioSynth.Oscillate(Waveform, phase) * Volume;

            phase = (phase + (float)(deltaTime * Frequency)) % 1;
            return(sample);
        }
Example #2
0
 // Use this for initialization
 void Start()
 {
     if (audioSynth == null)
     {
         audioSynth = GetComponent <AudioSynth>();
     }
     if (OVRManager.display != null)  //OVRManager.display exists or it doesn't, no flag to check other than if it's null.
     {
         // This does not appear to do anything :(
         OVRManager.display.RecenteredPose += Recenter;
         // Oh yeah, 72Hz mode on Oculus Go, why not right?
         OVRManager.display.displayFrequency = 72.0f;
     }
     OVRPlugin.vsyncCount = 0;
 }
Example #3
0
        private void Play()
        {
            var p = ddlPath.Text;

            if (!string.IsNullOrEmpty(p))
            {
                AudioSynth.Play(p, CW);
                CW.LogToPlugin("Play: " + p);
                var _p = new List <string> {
                    p
                };
                foreach (var i in ddlPath.Items)
                {
                    if (!_p.Contains(i) && !string.IsNullOrEmpty(i.ToString()))
                    {
                        _p.Add(i.ToString());
                    }
                }

                var x = "";
                int j = 0;
                foreach (string s in _p)
                {
                    if (j < 10)
                    {
                        x += s + "|";
                    }
                    else
                    {
                        break;
                    }
                    j++;
                }
                x = x.Trim('|');
                MainForm.Conf.PlayPaths = x;
                PopPaths();
            }
        }