Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Loading soundfont with Angular #75

Open
tjvg91 opened this issue Mar 4, 2020 · 0 comments
Open

Loading soundfont with Angular #75

tjvg91 opened this issue Mar 4, 2020 · 0 comments

Comments

@tjvg91
Copy link

tjvg91 commented Mar 4, 2020

I tried getting soundfont using Angular. I get this error:

Argument of type 'AudioContext' is not assignable to parameter of type '{ new (contextOptions?: AudioContextOptions): AudioContext; prototype: AudioContext; }'.
  Property 'prototype' is missing in type 'AudioContext' but required in type '{ new (contextOptions?: AudioContextOptions): AudioContext; prototype: AudioContext; }'.

This is my code:

const newPlayer = SoundFont.instrument(new AudioContext(), 'assets/soundfonts/acoustic_grand_piano-mp3.js');

error is in new AudioContext() part

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant