ZennoLab Assemblies Documentation
AudioPreferences Class
Members  Example 
ZennoLab.CommandCenter Namespace : AudioPreferences Class
Represents an AudioContext settings object.
Syntax
public class AudioPreferences 
Example
The following example uses the Set method.
// 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
Inheritance Hierarchy

System.Object
   ZennoLab.CommandCenter.AudioPreferences

Requirements

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

See Also

Reference

AudioPreferences Members
ZennoLab.CommandCenter Namespace