alphaTab.synth.IAudioElementBackingTrackSynthOutput
A IBackingTrackSynthOutput which uses a HTMLAudioElement as playback mechanism.
Allows the access to the element for further custom usage.
interface IAudioElementBackingTrackSynthOutput extends IBackingTrackSynthOutputPropertiesโ
audioElementโ
The audio element used for playing the backing track. Direct interaction with the element might not result in correct alphaTab behavior.
readonly audioElement: HTMLAudioElement;backingTrackDurationโ
The total duration of the backing track in milliseconds. (Inherited from IBackingTrackSynthOutput )
- JavaScript
- C#
- Kotlin
readonly backingTrackDuration: number;double BackingTrackDuration { get; }val backingTrackDuration: DoublemasterVolumeโ
The volume at which the output should play (0-1) (Inherited from IBackingTrackSynthOutput )
- JavaScript
- C#
- Kotlin
masterVolume: number;double MasterVolume { get; set; }var masterVolume: DoubleplaybackRateโ
The playback rate at which the output should playback. (Inherited from IBackingTrackSynthOutput )
- JavaScript
- C#
- Kotlin
playbackRate: number;double PlaybackRate { get; set; }var playbackRate: Doublereadyโ
Fired when the output has been successfully opened and is ready to play samples. (Inherited from ISynthOutput )
- JavaScript
- C#
- Kotlin
sampleRateโ
Gets the sample rate required by the output. (Inherited from ISynthOutput )
- JavaScript
- C#
- Kotlin
readonly sampleRate: number;double SampleRate { get; }val sampleRate: DoublesampleRequestโ
Fired when the output needs more samples to be played. (Inherited from ISynthOutput )
- JavaScript
- C#
- Kotlin
readonly sampleRequest: IEventEmitter;IEventEmitter SampleRequest { get; }val sampleRequest: IEventEmittersamplesPlayedโ
Fired when a certain number of samples have been played. (Inherited from ISynthOutput )
- JavaScript
- C#
- Kotlin
readonly samplesPlayed: IEventEmitterOfT<number>;IEventEmitterOfT<double> SamplesPlayed { get; }val samplesPlayed: IEventEmitterOfT<Double>timeUpdateโ
An event fired when the playback time changes. The time is in absolute milliseconds. (Inherited from IBackingTrackSynthOutput )
- JavaScript
- C#
- Kotlin
readonly timeUpdate: IEventEmitterOfT<number>;IEventEmitterOfT<double> TimeUpdate { get; }val timeUpdate: IEventEmitterOfT<Double>Methodsโ
activateโ
Activates the output component. (Inherited from ISynthOutput )
- JavaScript
- C#
- Kotlin
activate(): voidvoid Activate()fun activate(): UnitaddSamplesโ
Called when samples have been synthesized and should be added to the playback buffer. (Inherited from ISynthOutput )
- JavaScript
- C#
- Kotlin
addSamples(samples: Float32Array): voidvoid AddSamples(Float32Array samples)fun addSamples(samples: Float32Array): Unit| Parameter | Summary |
|---|---|
samplesAll | (no description) |
destroyโ
Requests the output to destroy itself. (Inherited from ISynthOutput )
- JavaScript
- C#
- Kotlin
destroy(): voidvoid Destroy()fun destroy(): UnitenumerateOutputDevicesโ
Loads and lists the available output devices. Will request permissions if needed. (Inherited from ISynthOutput )
- JavaScript
- C#
- Kotlin
enumerateOutputDevices(): Promise<ISynthOutputDevice[]>System.Threading.Task<IList<ISynthOutputDevice>> EnumerateOutputDevices()suspend fun enumerateOutputDevices(): alphaTab.collections.List<ISynthOutputDevice>getOutputDeviceโ
The currently configured output device if changed via setOutputDevice . (Inherited from ISynthOutput )
- JavaScript
- C#
- Kotlin
getOutputDevice(): Promise<ISynthOutputDevice | null>System.Threading.Task<ISynthOutputDevice?> GetOutputDevice()suspend fun getOutputDevice(): ISynthOutputDevice?Returnsโ
The custom configured output device which was set via setOutputDevice or null
if the default outputDevice is used.
The output device might change dynamically if devices are connected/disconnected (e.g. bluetooth headset).
loadBackingTrackโ
Instructs the output to load the given backing track. (Inherited from IBackingTrackSynthOutput )
- JavaScript
- C#
- Kotlin
loadBackingTrack(backingTrack: BackingTrack): voidvoid LoadBackingTrack(BackingTrack backingTrack)fun loadBackingTrack(backingTrack: BackingTrack): Unit| Parameter | Summary |
|---|---|
backingTrackAll | The backing track to load. |
openโ
Called when the output should be opened. (Inherited from ISynthOutput )
- JavaScript
- C#
- Kotlin
open(bufferTimeInMilliseconds: number): voidvoid Open(double bufferTimeInMilliseconds)fun open(bufferTimeInMilliseconds: Double): Unit| Parameter | Summary |
|---|---|
bufferTimeInMillisecondsAll | (no description) |
pauseโ
Called when the output should stop the playback. (Inherited from ISynthOutput )
- JavaScript
- C#
- Kotlin
pause(): voidvoid Pause()fun pause(): Unitplayโ
Called when the output should start the playback. (Inherited from ISynthOutput )
- JavaScript
- C#
- Kotlin
play(): voidvoid Play()fun play(): UnitresetSamplesโ
Called when the samples in the output buffer should be reset. This is neeed for instance when seeking to another position. (Inherited from ISynthOutput )
- JavaScript
- C#
- Kotlin
resetSamples(): voidvoid ResetSamples()fun resetSamples(): UnitseekToโ
Instructs the output to seek to the given time position. (Inherited from IBackingTrackSynthOutput )
- JavaScript
- C#
- Kotlin
seekTo(time: number): voidvoid SeekTo(double time)fun seekTo(time: Double): Unit| Parameter | Summary |
|---|---|
timeAll | The absolute time in milliseconds. |
setOutputDeviceโ
Changes the output device which should be used for playing the audio. (Inherited from ISynthOutput )
- JavaScript
- C#
- Kotlin
setOutputDevice(device: ISynthOutputDevice | null): Promise<void>System.Threading.Task<void> SetOutputDevice(ISynthOutputDevice? device)suspend fun setOutputDevice(device: ISynthOutputDevice?): Unit| Parameter | Summary |
|---|---|
deviceAll | The output device to use, or null to switch to the default device. |