Setting sound volume question

0 favourites
  • 6 posts
From the Asset Store
Grenade Sound Library contains: 135 sounds 50 grenade sounds and 85 surface sounds
  • 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.

    System - OnStartOfLayout > Audio - Play "GameMusic" Looping (tag "Music")
                               Audio - Set "Music" Volume -10db
    
  • Which browser are you using? Have you tried other browsers?

    Some browsers have dubious audio support, so it might be better with another browser.

  • 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.

  • 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.

  • What's the format of the audio? I use OGG and has never given me a problem...

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Same, OGG.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)