mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Add types for audio-context and audio-play * Test fixes * More test fixes * PR comments * Remove excessive exporting
7 lines
232 B
TypeScript
7 lines
232 B
TypeScript
import audioPlay = require("audio-play");
|
|
|
|
const buffer = new AudioBuffer({length: 2, sampleRate: 22000});
|
|
const thisSound = audioPlay(buffer, { autoplay: true }, () => console.log('stopped!'));
|
|
thisSound.pause();
|
|
thisSound.play();
|