MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / open

Method open

modules/piu/MC/piuSound.js:40–52  ·  view source on GitHub ↗
(streams = 1)

Source from the content-addressed store, hash-verified

38 }
39 }
40 static open(streams = 1) {
41 let audioOut = this.private.audioOut = new AudioOut({
42 bitsPerSample:this.bitsPerSample,
43 numChannels:this.numChannels,
44 sampleRate:this.sampleRate,
45 streams
46 });
47 this.private.callbacks = new Array(streams);
48 this.private.streams = streams;
49 audioOut.callback = this.callback;
50 audioOut.start();
51 return audioOut;
52 }
53 static get bitsPerSample() { return native("PiuSound_get_bitsPerSample").call(this); };
54 static get numChannels() { return native("PiuSound_get_numChannels").call(this); };
55 static get sampleRate() { return native("PiuSound_get_sampleRate").call(this); };

Callers 15

playMethod · 0.45
read-only.jsFile · 0.45
use-after-close.jsFile · 0.45
close.jsFile · 0.45
formats.jsFile · 0.45
read-write.jsFile · 0.45
delete.jsFile · 0.45
iterator.jsFile · 0.45
open.jsFile · 0.45
format.jsFile · 0.45
close.jsFile · 0.45

Calls 1

startMethod · 0.65

Tested by

no test coverage detected