Skip to content

Commit b291d88

Browse files
authored
fixed error while merging (#544)
* decoupled helpers method from p5 in helper.js and coupled them separately in app.js * fixed build process bug in helpers.js * addes saveSound import in app.js
1 parent 117637d commit b291d88

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/app.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ import {
2121
interleave,
2222
writeUTFBytes,
2323
safeBufferSize,
24+
25+
saveSound
26+
27+
2428
} from './helpers';
2529
p5.prototype.sampleRate = sampleRate;
2630
p5.prototype.freqToMidi = freqToMidi;

src/helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ function safeBufferSize(idealBufferSize) {
344344
* @param {String} fileName name of the resulting .wav file.
345345
*/
346346
// add to p5.prototype as this is used by the p5 `save()` method.
347-
export function saveSound(soundFile, fileName) {
347+
function saveSound(soundFile, fileName) {
348348
const dataView = convertToWav(soundFile.buffer);
349349
p5.prototype.writeFile([dataView], fileName, 'wav');
350350
}

0 commit comments

Comments
 (0)