void ConnectViewWithAU() { var au = AudioUnit; if (au == null) { return; } var paramTree = au.ParameterTree; if (paramTree == null) { return; } cutoffParameter = (AUParameter)paramTree.ValueForKey(cutoffKey); resonanceParameter = (AUParameter)paramTree.ValueForKey(resonanceKey); parameterObserverToken = paramTree.CreateTokenByAddingParameterObserver((address, value) => DispatchQueue.MainQueue.DispatchAsync(() => { if (address == cutoffParameter.Address) { filterView.Frequency = value; frequencyLabel.Text = cutoffParameter.GetString(null); } else if (address == resonanceParameter.Address) { filterView.Resonance = value; resonanceLabel.Text = resonanceParameter.GetString(null); } UpdateFilterViewFrequencyAndMagnitudes(); }) ); filterView.Frequency = cutoffParameter.Value; filterView.Resonance = resonanceParameter.Value; }
public void SetValue(float value, AUParameterObserverToken originator, ulong hostTime) { SetValue(value, originator.ObserverToken, hostTime); }
public void SetValue(float value, AUParameterObserverToken originator) { SetValue(value, originator.ObserverToken); }
public void RemoveParameterObserver(AUParameterObserverToken token) { RemoveParameterObserver(token.ObserverToken); }
public void RemoveParameterObserver(AUParameterObserverToken token) { _RemoveParameterObserver (token.ObserverToken); }
public void SetValue(float value, AUParameterObserverToken originator, ulong hostTime) { _SetValue (value, originator.ObserverToken, hostTime); }
public void SetValue(float value, AUParameterObserverToken originator) { _SetValue (value, originator.ObserverToken); }
void ConnectViewWithAU () { var au = AudioUnit; if (au == null) return; var paramTree = au.ParameterTree; if (paramTree == null) return; cutoffParameter = (AUParameter)paramTree.ValueForKey (cutoffKey); resonanceParameter = (AUParameter)paramTree.ValueForKey (resonanceKey); parameterObserverToken = paramTree.CreateTokenByAddingParameterObserver ((address, value) => DispatchQueue.MainQueue.DispatchAsync (() => { if (address == cutoffParameter.Address) { filterView.Frequency = value; frequencyLabel.Text = cutoffParameter.GetString (null); } else if (address == resonanceParameter.Address) { filterView.Resonance = value; resonanceLabel.Text = resonanceParameter.GetString (null); } UpdateFilterViewFrequencyAndMagnitudes (); }) ); filterView.Frequency = cutoffParameter.Value; filterView.Resonance = resonanceParameter.Value; }