Class: AudioChart

AudioChart~AudioChart(options)

Main object for API consumers

Constructor

new AudioChart(options)

Create an AudioChart object. This first checks to see if the Web Audio API is available, and throws an {Error} if not. Then check the options given by the user.
Parameters:
Name Type Description
options AudioChartOptions AudioChart options
Source:

Members

options

Returns the current set of options (passed in at object creation, or computed when options were updated).
Source:

Methods

(private, static) _assignWrapperCallback(options) → {WrapperAndCallbackResults}

Works out which data source wrapper and visual callback (if requested) should be used with this chart.
Parameters:
Name Type Description
options AudioChartOptions given by the user
Source:
Returns:
- data wrapper, data source and callback (if applicable) for this chart
Type
WrapperAndCallbackResults

(private, static) _checkOptions(options)

Checks the passed-in options opbject for validity. This does not perform detailed checks that are covered in the various components' constructors; they run such checks themselves.
Parameters:
Name Type Description
options AudioChartOptions AudioChart options
Source:

(private) _setUp(context, options)

Checks options (either when a new AudioChart object is created, or when the user has asked for them to be updated) and then set everything up.
Parameters:
Name Type Description
context AudioContext the Web Audio context
options AudioChartOptions AudioChart options
Source:

(private) _wireUpStuff(context, options)

Make a data wrapper of the appropriate class, instantiated with the appropriate data paramater (from options.data) and, optionally, make a visual callback (which may use options.chart, or other options if it's an HTML table visual callback). FIXME: Test somehow
Parameters:
Name Type Description
context AudioContext the Web Audio context
options AudioChartOptions given by the user
Source:

playPause()

Passes through play/pause commands to the Player
Source:

updateOptions(newOptions)

Updates an AudioChart object to reflect new options. Can accept a subset of the standard options, so if only, for example, duration changes, then you need only specify the new duration and not the type and other paramaters.
Parameters:
Name Type Description
newOptions AudioChartOptions Partial/full AudioChart options
Source: