(url: string)
| 23 | } |
| 24 | |
| 25 | async function fetchSoundFont(url: string): Promise<Uint8Array> { |
| 26 | const res = await fetch(url); |
| 27 | if (!res.ok) { |
| 28 | throw new Error(`Failed to load soundfont '${url}': ${res.status} ${res.statusText}`); |
| 29 | } |
| 30 | return new Uint8Array(await res.arrayBuffer()); |
| 31 | } |
| 32 | |
| 33 | export async function exportAudio(api: alphaTab.AlphaTabApi, trackItems: readonly TrackItem[] = []): Promise<void> { |
| 34 | if (!api.score) { |