* * Writes data to a file in the WASM filesystem for * use with csound. * * @param {string} filePath A string containing the path to write to. * @param {blob} blobData The data to write to file. * @memberof CsoundMixin
(filePath, blobData)
| 265 | */ |
| 266 | |
| 267 | writeToFS(filePath, blobData) { |
| 268 | let FS = CSMOD["FS"]; |
| 269 | let stream = FS.open(filePath, "w+"); |
| 270 | let buf = new Uint8Array(blobData); |
| 271 | FS.write(stream, buf, 0, buf.length, 0); |
| 272 | FS.close(stream); |
| 273 | }, |
| 274 | |
| 275 | /** |
| 276 | * |