public AudioDeviceManager(AudioIODeviceFactory deviceFactory, AudioDeviceSetup setup) { var audioIODevice = deviceFactory.CreateDevice(); audioIODevice.Open( setup.NumInputChannels, setup.NumOutputChannels, setup.SampleRate, setup.BufferSize ); Device = audioIODevice; Device.Start(this); _tempBuffer = new SampleBuffer(1, 1); }
public App(AudioIODeviceFactory deviceFactory, AudioDeviceSetup audioSetup) { _deviceFactory = deviceFactory; _audioSetup = audioSetup; // The root page of your application _freqSlider = new Slider { Minimum = 0, Maximum = 1000, Value = 440, }; _volSlider = new Slider { Minimum = 0, Maximum = 1, Value = 0.6f, }; _freqSlider.ValueChanged += Slider_ValueChanged; _volSlider.ValueChanged += Slider_ValueChanged; MainPage = new ContentPage { Content = new StackLayout { VerticalOptions = LayoutOptions.Center, Children = { _freqSlider, _volSlider } } }; }