ZennoLab Assemblies Documentation
AudioPreferences Property
Example 
ZennoLab.CommandCenter Namespace > Instance Class : AudioPreferences Property
Gets the AudioPreferences object that allows you to edit audio settings.
Syntax
public AudioPreferences AudioPreferences {get;}

Property Value

Type: ZennoLab.CommandCenter.AudioPreferences

The AudioPreferences object.

Example
The following example uses the AudioPreferences property.
// set Chrome useragent
instance.SetHeader(ZennoLab.InterfacesLibrary.Enums.Browser.NavigatorField.UserAgent, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36");
// set audio context params
instance.AudioPreferences.Set(ZennoLab.InterfacesLibrary.Enums.Browser.AudioPreference.AudioContextState, "running"); // string value, can take values "suspended", "running" or "closed"
instance.AudioPreferences.Set(ZennoLab.InterfacesLibrary.Enums.Browser.AudioPreference.BaseLatency, "0.02"); // double value, visible if Chrome useragent is set
instance.AudioPreferences.Set(ZennoLab.InterfacesLibrary.Enums.Browser.AudioPreference.MaxChannelCount, "10"); // int value
instance.AudioPreferences.Set(ZennoLab.InterfacesLibrary.Enums.Browser.AudioPreference.SampleRate, "96000"); // int value
instance.AudioPreferences.Set(ZennoLab.InterfacesLibrary.Enums.Browser.AudioPreference.SmoothingTimeConstant, "0.65"); // double value, can take values from 0 to 1
Requirements

Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.

See Also

Reference

Instance Class
Instance Members