-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allows dynamic adding and switching of buffers (#18)
- Loading branch information
Mike Solomon
authored
Jun 30, 2021
1 parent
66a52a7
commit a44ce8e
Showing
14 changed files
with
397 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,6 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<script src="index.js"></script> | ||
<script> | ||
var offCb = null; | ||
var audioCtx = null; | ||
function turnOnAudio() { | ||
audioCtx = new (window.AudioContext || window.webkitAudioContext)(); | ||
offCb = PS["WAGS.Example.HelloWorld"].myRun({ | ||
context: audioCtx, | ||
writeHead: 0.0, | ||
units: {}, | ||
microphones: {}, | ||
recorders: {}, | ||
buffers: {}, | ||
floatArrays: {}, | ||
periodicWaves: {}, | ||
})(); | ||
} | ||
function turnOffAudio() { | ||
offCb ? offCb() : null; | ||
offCB = null; | ||
audioCtx ? audioCtx.close() : null; | ||
audioCtx = null; | ||
} | ||
</script> | ||
<body> | ||
<button onclick="turnOnAudio();">turn on</button> | ||
<button onclick="turnOffAudio();">turn off</button> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.