• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

[SOLVED] SFX Cancelling out Background Music

Velocity

Member
Hi,

So I wanted sound effects in my game

So, originally I tried coding in a script and in an object collision code with audio_play_sound(snd_sound, 10, false)

But that didn't work

So then, I successfully coded with sound_play(snd_sound)

BUT

Now whenever I do my fireball sound the background music cancels out

Both the fireball and the BGM are loud

I know that with audio_play_sound(snd_sound, 100, true) - the 100 supposedly represents the highest priority of sound, so that other sounds can't cancel it out

But for some reason I can't use audio_play_sound(); ANYWHERE in my game

I tried making my background music with an object placed in my room, with a room start event, and in the code I put audio_play_sound(snd_sound, 100, true)

But nothing happens

Can anyone help?
 
K

Kreastricon62

Guest
I already know your problem.

audio_play_sound() works with the NEW audio engine.
sound_play() works with the OLD audio engine

In the global game settings, under the general tab, there is a tick box that says "Use new audio engine." if you check it, 'audio_play' will work, but 'sound_play' will not and vice versa.

This happened to me too. Personally, I like the new audio engine better, but it is up to you which one you use.


Edit: Oh, by the way, 100 does not mean it is the highest priority sound. 1 is the highest priority.
 

Velocity

Member
I already know your problem.

audio_play_sound() works with the NEW audio engine.
sound_play() works with the OLD audio engine

In the global game settings, under the general tab, there is a tick box that says "Use new audio engine." if you check it, 'audio_play' will work, but 'sound_play' will not and vice versa.

This happened to me too. Personally, I like the new audio engine better, but it is up to you which one you use.


Edit: Oh, by the way, 100 does not mean it is the highest priority sound. 1 is the highest priority.
Awesome man, thanks!

I'll try and get around to it very soon.

Sounds like a nice and easy fix.

I think I might have to lower the background music in another program like Reaper too.

Cheers!
 
Top