Skip to content

Commit

Permalink
fix: heap bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
davay42 committed Mar 9, 2023
1 parent 67893b5 commit 01017c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion content/practice/experiments/amy/amy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import('./amy.js').then(amy => {
// l and r are float arrays for the left and right channels that need to be filled
callback = function audioCallback(l) {
// lazy loading of the audio buffer we use to talk to c++/emscripten
if (dataHeap == null) {
if (dataHeap == null || dataHeap.length == 0) {
data = new Float32Array(l.length);
// Get data byte size, allocate memory on Emscripten heap, and get pointer
var nDataBytes = data.length * data.BYTES_PER_ELEMENT;
Expand Down
2 changes: 1 addition & 1 deletion content/practice/experiments/amy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ date: 2023-03-05

### the Additive Music synthesizer librarY

Highly experimental. [Issue](https://github.com/bwhitman/amy/issues/34) pending.
Highly experimental.

<client-only>
<AmySynth />
Expand Down

0 comments on commit 01017c7

Please sign in to comment.