alphaTab.synth.IAudioExporterWorker
This is the internal worker interface implemented by IAudioExporters and consists of the internal APIs needed to spawn new exporters. Its mainly used to simplify the public API visible when using exporters.
interface IAudioExporterWorker extends IAudioExporterMethods​
destroy​
(no description) (Inherited from IAudioExporter )
- JavaScript
- C#
- Kotlin
destroy(): voidvoid Destroy()fun destroy(): Unitinitialize​
Initializes the worker.
- JavaScript
- C#
- Kotlin
initialize(options: AudioExportOptions, midi: MidiFile, syncPoints: BackingTrackSyncPoint[], transpositionPitches: Map<number, number>): Promise<void>System.Threading.Task<void> Initialize(AudioExportOptions options, MidiFile midi, IList<BackingTrackSyncPoint> syncPoints, Map<double, double> transpositionPitches)suspend fun initialize(options: AudioExportOptions, midi: MidiFile, syncPoints: alphaTab.collections.List<BackingTrackSyncPoint>, transpositionPitches: alphaTab.collections.DoubleDoubleMap<Double, Double>): Unit| Parameter | Summary |
|---|---|
optionsAll | The options to use |
midiAll | The midi file to load |
syncPointsAll | The sync points of the song (if any) |
transpositionPitchesAll | The initial transposition pitches for the midi file. |
render​
Renders the next chunk of audio and provides it as result. (Inherited from IAudioExporter )
- JavaScript
- C#
- Kotlin
render(milliseconds: number): Promise<AudioExportChunk | undefined>System.Threading.Task<AudioExportChunk?> Render(double milliseconds)suspend fun render(milliseconds: Double): AudioExportChunk?| Parameter | Summary |
|---|---|
millisecondsAll | The rough number of milliseconds that should be synthesized and exported as chunk. |
Returns​
The requested chunk holding the samples and time information.
If the song completed playback undefined is returned indicating the end.
The provided audio might not be exactly the requested number of milliseconds as the synthesizer internally
uses a fixed block size of 64 samples for synthesizing audio. Depending on the sample rate
slightly longer audio is contained in the result.
When the song ends, the chunk might contain less than the requested duration.