This repository has been archived by the owner on Jan 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reset csound after playCSD, bump version
- Loading branch information
Showing
23 changed files
with
17,108 additions
and
10,818 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 was deleted.
Oops, something went wrong.
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
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
'use strict'; | ||
|
||
const DataURI = require('datauri').promise; | ||
const fs = require('fs'); | ||
const replace = require('replace-in-file'); | ||
// const stdin = process.argv[2]; | ||
|
||
// DataURI('libcsound/libcsound.wasm') | ||
// .then(content => | ||
// { | ||
// var replace_data = "'" + content + "';"; | ||
// // var append_data = "\nmodule.exports = Module;\n"; | ||
|
||
// const replace_options = { | ||
// files: 'libcsound/libcsound.js', | ||
// from: /'libcsound.wasm'/g, | ||
// to: replace_data | ||
// }; | ||
|
||
// try { | ||
// replace.sync(replace_options); | ||
// } | ||
// catch (error) { | ||
// console.error('Error occurred:', error); | ||
// } | ||
|
||
// // fs.appendFileSync('./libcsound.js', append_data) | ||
// }) | ||
// .catch(err => { throw err; }); | ||
|
||
// DataURI('libcsound/libcsound.wasm') | ||
// .then(content => | ||
// { | ||
// console.log(content); | ||
// }) | ||
// .catch(err => { throw err; }); | ||
|
||
DataURI('libcsound.wasm') | ||
.then(content => | ||
{ | ||
var file1 = fs.readFileSync('libcsound/libcsound.js').toString(); | ||
var replc = file1.replace('libcsound.wasm', content); | ||
|
||
try { | ||
fs.writeFileSync('libcsound/libcsound_browser.js', replc); | ||
} | ||
catch (error) { | ||
console.error('Error occurred:', error); | ||
} | ||
}) | ||
.catch(err => { throw err; }); |
Oops, something went wrong.