private App() { var waveOut = new DirectSoundOut(60); var osc = new Oscillator(44100, Math.Sin); var controller = LeapController.GetController(); var listener = controller.Listener; listener.Frames.Select(f => (f.Hands.Count > 0) ? f.Hands[0].PalmPosition.y : 0.0).Subscribe(osc.Frequency); waveOut.Init(new StreamProvider(osc)); waveOut.Play(); }
public StreamProvider(Oscillator osc) : base(44100, 1) { this.osc = osc; }