keithclark / ZzFXM

A super small music generator for use in size-limited JavaScript productions
https://keithclark.github.io/ZzFXM/
MIT License
418 stars 33 forks source link

Uncaught DOMException: Failed to execute 'createBuffer' on 'BaseAudioContext' #23

Closed jdnichollsc closed 3 years ago

jdnichollsc commented 3 years ago

Hello mate, thanks for this awesome tool, this project is amazing! <3

I'm testing about ZzFX Sound Caching but I'm getting this error:

Uncaught DOMException: Failed to execute 'createBuffer' on 'BaseAudioContext': The number of channels provided (27882) is outside the range [1, 32].
    at zzfxP (https://keithclark.github.io/ZzFXM/:213:57)
    at <anonymous>:2:1

I'm testing from the github page of this project (Using Chrome):

const lazer = zzfxG(...[1.04,,60,.01,.09,.44,,1.61,-5.2,,,,,.3,,.1,,.87,.09]);
zzfxP(...lazer);

What do you think?

keithclark commented 3 years ago

The example is wrong! You don't need to spread lazer, instead just call zzfxP(lazer)

I'll update the example. Thanks taking time to reporting this.

keithclark commented 3 years ago

I've just pushed the latest tracker (v1.0.5b) and updated the ZzFXM site so this should be fixed now.

jdnichollsc commented 3 years ago

Awesome, thanks mate!

jdnichollsc commented 3 years ago

Hello mate, I'm getting this warning from the GitHub page of the project: The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page.

I tried again but the audio is not working, I can't hear anything. Check the logs please: image

What do you think? 🤔