Construct 2 Sound Inconsistency

16 posts (showing 1-16)
GrimLantern

Market Level 0Community Level 0
11 posts

Hi FGL Developers!

   I was wondering if anyone else out there is developing with Construct 2 and having similar problems with volume inconsistency for music? Sometimes its fine, and other times it drowns out the rest of my sounds. If you refresh the game its fine, but on the first play this happens often. I've tried playing the sound once, then restarting it after giving it a moment to load, but that doesn't seem to solve it either. Thanks, and I'd appreciate any help on this matter I can get.

Sincerely,

Rod
Grim Lantern

posted 2014-08-28T13:38:00-07:00
JHII

Market Level 5Community Level 6
716 posts

I'm not a coder (just an audio guy), but, from your description, it seems like the loop is stacking and gaining volume each time.

Hopefully someone with Construct 2 experience will chime in soon to give some guidance. If not, I can move this thread to the HTML5 forum.

posted 2014-08-28T14:53:34-07:00
GrimLantern

Market Level 0Community Level 0
11 posts

Thanks for responding JHill. I don't think its a looping issue, unless I misunderstand your meaning. While the music track does loop, its a fairly long track. The volume problems are present from the beginning.

posted 2014-08-28T15:00:56-07:00
capybaracreations

Market Level 2Community Level 2
132 posts

Using Construct 2 for a long time and I like to think I'm somehow good with it.

Unfortunately, I never encountered any similar problem to yours. I have a few ideas like:
- You are messing up the music with some events
- Try to keep the track of the music using debugging
- Make sure sounds are Preloaded (and you are using latest C2)
- With some devices, audio wont play at all unless the screen has been touched.
- What JHII said. You have a silent track, but your code keeps adding another BGM tracks to the loop so you get the feeling of sound inconsistency. For example: at 0:00 you play BGM "nature" and its silent, at 0:01 your code play another BGM "nature" so you have 2 tracks running simultaneously and with each another it sounds like its getting louder.
- Your sound device messes audio (there is an option like "communication muting" or something like this)

That's all I can think of. Try these things out. The best way to check it would be the debugger and filtering event sheet by "Audio" to see if by any chance you are not messing events up.

posted 2014-08-28T23:33:54-07:00
GrimLantern

Market Level 0Community Level 0
11 posts

Thank you, capybaracreations, for taking the time to respond. I've solved the issue. Occam's razor. I had forgotten to update my version of C2. That seems to have solved the problem.

posted 2014-08-29T19:45:44-07:00 | edited 2014-08-29T19:46:26-07:00
FGL_Dave

FGL AdminCommunity Level 4
303 posts

Glad to hear you got it sorted; I was going to recommend that. One of the (minor) issues with Construct 2 is that there's so many releases and they release so fast that stuff tends to get broken from time to time. Luckily, since they do release so fast, things also tend to get fixed relatively quickly!

posted 2014-08-30T02:17:43-07:00
capybaracreations

Market Level 2Community Level 2
132 posts

Fun thing to know is this thread: (Also construct 2 audio related, but bug is coming from chrome!)
https://code.google.com/p/chromium/issues/detail?id=396075

posted 2014-08-30T08:57:33-07:00
FGL_Dave

FGL AdminCommunity Level 4
303 posts

Maybe someone should recommend that Scirra switch to using howlerjs instead of the Web Audio API.

posted 2014-08-30T10:35:16-07:00
GameOp

Market Level 3Community Level 3
206 posts

Just wondering, but do games using the latest construct release pass QA? The double canvas bug for stock browsers is still there on older android devices(Samsung S3) with the newest Construct release, and it seems that fgl still uses the S3 for testing. Is the stock browser still used as part of the test?

On Aug 30, 2014, FGL_Dave said:

Maybe someone should recommend that Scirra switch to using howlerjs instead of the Web Audio API.

posted 2014-09-19T23:38:10-07:00 | edited 2014-09-20T22:42:29-07:00
FGL_Dave

FGL AdminCommunity Level 4
303 posts

They should do - it's a known issue (though Construct 2 updates so fast we struggle to keep up). We do actually have a recommendation for how to fix that particular issue. The idea is you flip the opacity of the whole game back and forth between 1 and 0.999999, forcing the device to re-flush the canvas. This has a minimal impact on performance (almost none) and provided you have enough 9's won't have any visible effect, but it will fix the Galaxy S3 double canvas drawing issue.

One issue we haven't been able to figure a fix to is that the samsung devices' stock browsers seem to register two events for every touch in Construct 2 games - one about 1 second later than the real touch.

Anyway, all that said, since we know about these issues I believe we should be skipping over them during QA and allowing C2 games through!

posted 2014-09-20T22:44:04-07:00
GameOp

Market Level 3Community Level 3
206 posts

Oh right you mentioned this method to me before by email but I can't seem to get it working passed R175,I think something was re-arranged in newer updates of construct.

I did manage to find an alternative fix which I'm posting in the scirra forums.  

So basically you check if its an android browser and if it is then you remove overflow property from all canvas parents. This seems to fix the issue:

if (window.navigator && window.navigator.userAgent.indexOf('534.30') > 0) {

$("canvas").parents("*").css("overflow", "visible");

}

FGL_Dave said:

They should do - it's a known issue (though Construct 2 updates so fast we struggle to keep up). We do actually have a recommendation for how to fix that particular issue. The idea is you flip the opacity of the whole game back and forth between 1 and 0.999999, forcing the device to re-flush the canvas. This has a minimal impact on performance (almost none) and provided you have enough 9's won't have any visible effect, but it will fix the Galaxy S3 double canvas drawing issue.

posted 2014-09-21T00:45:17-07:00 | edited 2014-09-21T01:06:06-07:00
GameOp

Market Level 3Community Level 3
206 posts

Here's a downloadable link for anyone that needs it:

https://dl.dropboxusercontent.com/u/116208876/BrowserFix.capx

I recommend using a loader layout and placing the code in there so you don't have a loading screen with two canvas's.

posted 2014-09-21T01:04:56-07:00
GameOp

Market Level 3Community Level 3
206 posts

I'd like a fix for this as well. I'll probably look for a fix once I get my current games and its bugs fixed and working for QA.

FGL_Dave said:

One issue we haven't been able to figure a fix to is that the samsung devices' stock browsers seem to register two events for every touch in Construct 2 games - one about 1 second later than the real touch.

posted 2014-09-21T03:13:59-07:00 | edited 2014-09-21T03:32:17-07:00
FGL_Dave

FGL AdminCommunity Level 4
303 posts

Thanks GameOp! Really helpful as always.

posted 2014-09-21T13:09:35-07:00
GameOp

Market Level 3Community Level 3
206 posts

Construct 2 was recently updated to R181. It contains the fix mentioned above so I recommend updating to it. If you plan to use a version between R169 to R180 then make sure to use the fix if you want to support stock browser, Otherwise update to R181 which solves most problems already.

@FGL_Dave

Yup, no probs ;)

posted 2014-09-23T20:00:24-07:00 | edited 2014-09-23T20:01:11-07:00
FGL_Dave

FGL AdminCommunity Level 4
303 posts

GameOp said:

Construct 2 was recently updated to R181. It contains the fix mentioned above so I recommend updating to it. If you plan to use a version between R169 to R180 then make sure to use the fix if you want to support stock browser, Otherwise update to R181 which solves most problems already.

@FGL_Dave

Yup, no probs ;)

Most excellent!

posted 2014-09-24T01:58:53-07:00