[SOLVED] How do I diagnose problems with the Sound component?

I am spending more time scratching my head now than being productive so I am considering leaving PlayCanvas.
Stuff that should just work doesn’t.

Example. you have an entity which fires two events , event1 and event2 and another entity that listens for those events and plays a different sound for each event. The first sound plays when event1 is fired and then when the second event fires the first sound stops dead while playing and the second doesn’t start.

Now I can live with the first sound continuing to play while the second one starts, and I can also live with it stopping suddenly and the other one begining but why oh why does it have to cut the first one and then not play the second one?

I am been wrestling with the issue all day and there just isn’t enough of a community for someone to have come across the same issues as I have so either I figure it out or find another way or take the easy route and go back to using aFrame which while has a longer development time at least works in a predictable manner.

Following up after investigating your issues in other threads, when you are experiencing issues that you can’t understand why they’re happening, you need to debug your code. This means placing breakpoints in your browser’s developer tools, and trying to see what the reason for your issues are.

There are hundreds of people working on PlayCanvas projects every day so we are usually aware of bugs pretty soon as someone is bound to face it at some point after it’s introduced. And also we know certain systems are usually stable because people don’t report many problems with them, like the Sound system for example.

It’s always possible there are bugs especially since PlayCanvas is extremely active with people working on it full time every single day. When a project is that active bugs will be introduced every now and then, but we all go out of our way to fix them as soon as possible.

I’m sorry if you are facing difficulties every now and then, however it’s not always fair to blame PlayCanvas without first investigating the source of your problems.

So to recap, I’ve found that in 99% of cases the problem lies in users’ code and in 90% of the time the bug is found on the first breakpoint I place. So learning to use the debugger is absolutely essential if you want to do anything advanced using JavaScript.

Ok i will try using breakpoints to find the issue

You were absolutely right! I found the error in the end in my code. Thank you for responding to my post, you gave me the kick I needed to dig deep and try again.

Glad you got it sorted! :smile: As a minor point, just to help folks browsing topics, can you set more descriptive topics for your posts? I’ve changed this one to give a better outline of the subject. Thanks!