Setting sound volume question

Discussion and feedback on Construct 2

Post » Sun May 13, 2012 5:10 pm

Hello, I have loaded a short music file from the sound folder (that I do not want to stream thus why it is in the sound folder) that I wish to play instantly upon the start of layout which I have set. Straight after this I have an action to set the volume of my sound to -10db. This doesn`t seem to work. If I move the action set volume action into another event it does work however.

Can anyone suggest what is wrong? Here is what I am doing.

[CODE]
System - OnStartOfLayout > Audio - Play "GameMusic" Looping (tag "Music")
                           Audio - Set "Music" Volume -10db
[/CODE]Zeus2012-05-13 17:14:33
B
35
S
4
G
8
Posts: 65
Reputation: 6,106

Post » Sun May 13, 2012 5:20 pm

Which browser are you using? Have you tried other browsers?

Some browsers have dubious audio support, so it might be better with another browser.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Sun May 13, 2012 5:27 pm

Sometimes the order of events matters. It has happened to me several times. Try to place the Volume event first instead and then the Play event. Also, maybe the browser has crappy support for audio, which if I remember correctly, is the case with HMTL5 audio for some browsers. Putting the actions in the same order as in yer example works for me on Chrome. You can also try to make the music lower, put it at -50db to make sure if it works or not.
B
47
S
10
G
6
Posts: 455
Reputation: 8,326

Post » Sun May 13, 2012 5:44 pm

Thanks for the replies. Strangely it works fine in Firefox but not Chrome (latest version). I have tried changing the order of events and setting -50db as suggested but that had no effect.

No big deal just wondered what may be causing this.

B
35
S
4
G
8
Posts: 65
Reputation: 6,106

Post » Sun May 13, 2012 5:49 pm

What's the format of the audio? I use OGG and has never given me a problem...
B
47
S
10
G
6
Posts: 455
Reputation: 8,326

Post » Sun May 13, 2012 5:54 pm

Same, OGG.
B
35
S
4
G
8
Posts: 65
Reputation: 6,106


Return to Construct 2 General

Who is online

Users browsing this forum: pablo7 and 14 guests