Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Giving Errors when .play() is called #4933

Closed
OutdatedGuy opened this issue Dec 4, 2020 · 5 comments
Closed

Giving Errors when .play() is called #4933

OutdatedGuy opened this issue Dec 4, 2020 · 5 comments
Labels

Comments

@OutdatedGuy
Copy link

Screenshot 2020-12-04 165149

  • p5.js version: v1.1.9 July 22, 2020
  • p5.sound.js version: Version: 0.3.12 - 2020-01-06
  • Web browser and version: In all web browsers(chrome, firefox and edge atleast)
  • Operating System: Windows 10 Home Single Language
  • Steps to reproduce this:
    Use .play() in the sketch.js and access developer tools to see the error
@OutdatedGuy OutdatedGuy added the Bug label Dec 4, 2020
@welcome
Copy link

welcome bot commented Dec 4, 2020

Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.

@limzykenneth
Copy link
Member

Hi @OutdatedGuy, can you share a minimal sketch code that demonstrates the problem? Thanks.

@OutdatedGuy
Copy link
Author

OutdatedGuy commented Dec 4, 2020

Hi @OutdatedGuy, can you share a minimal sketch code that demonstrates the problem? Thanks.

Hi @limzykenneth, Thanks for Replying.

The problem is that the code is running and the sound is also playing, but in the console of any browser it shows the error msg (image in the issue).

If you want all the code details, it's uploaded here

For the part of code it gets error:

eat() {
for(var f = 0; f < FoodX.length; f++) {
if (this.x == FoodX[f] && this.y == FoodY[f]) {
eatSound.play();
mySnake[myLambi] = new SnakeBody(mySnake[myLambi - 1].x, mySnake[myLambi - 1].y);
myLambi++;
foodLocation(f);
}
}
}

@limzykenneth
Copy link
Member

Had a look into this and found that it has already been fixed in processing/p5.js-sound#542. The fix will be available in the next release. As far as I can tell the error is not blocking so you can ignore the error for now and code as usual.

@OutdatedGuy
Copy link
Author

Okay, Thanks for the Info and Help! 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants