Skip to main content

alphaTab.synth.IExternalMediaSynthOutput

Description

A output handling the playback via an external media.

 interface IExternalMediaSynthOutput extends IBackingTrackSynthOutput

Properties

backingTrackDuration

The total duration of the backing track in milliseconds. (Inherited from IBackingTrackSynthOutput)

handler

The handler to which the media control will be delegated.

masterVolume

The volume at which the output should play (0-1) (Inherited from IBackingTrackSynthOutput)

playbackRate

The playback rate at which the output should playback. (Inherited from IBackingTrackSynthOutput)

ready

Fired when the output has been successfully opened and is ready to play samples. (Inherited from ISynthOutput)

sampleRate

Gets the sample rate required by the output. (Inherited from ISynthOutput)

sampleRequest

Fired when the output needs more samples to be played. (Inherited from ISynthOutput)

samplesPlayed

Fired when a certain number of samples have been played. (Inherited from ISynthOutput)

timeUpdate

An event fired when the playback time changes. The time is in absolute milliseconds. (Inherited from IBackingTrackSynthOutput)

Methods

activate()

Activates the output component. (Inherited from ISynthOutput)

addSamples(Float32Array)

Called when samples have been synthesized and should be added to the playback buffer. (Inherited from ISynthOutput)

destroy()

Requests the output to destroy itself. (Inherited from ISynthOutput)

enumerateOutputDevices()

Loads and lists the available output devices. Will request permissions if needed. (Inherited from ISynthOutput)

getOutputDevice()

The currently configured output device if changed via setOutputDevice. (Inherited from ISynthOutput)

loadBackingTrack(BackingTrack)

Instructs the output to load the given backing track. (Inherited from IBackingTrackSynthOutput)

open(number)

Called when the output should be opened. (Inherited from ISynthOutput)

pause()

Called when the output should stop the playback. (Inherited from ISynthOutput)

play()

Called when the output should start the playback. (Inherited from ISynthOutput)

resetSamples()

Called when the samples in the output buffer should be reset. This is neeed for instance when seeking to another position. (Inherited from ISynthOutput)

seekTo(number)

Instructs the output to seek to the given time position. (Inherited from IBackingTrackSynthOutput)

setOutputDevice(ISynthOutputDevice | null)

Changes the output device which should be used for playing the audio. (Inherited from ISynthOutput)

updatePosition(number)

Updates the playback position from the external media source.