2
\$\begingroup\$

I have some environmental music playing in the background, but when I try to play another track (door opening sound effect) at the same time the background music stops playing.

How can I play two audio tracks simultaneously?

\$\endgroup\$
0
\$\begingroup\$

The UDK site says you can use the SoundCue editor to combine sounds, maybe you could fade these two musics in and out quickly so it sounds like they're playing at the same time.

You could use Volume Ducking to lower these background sounds when the door opens.

https://docs.unrealengine.com/latest/INT/Engine/Audio/Overview/index.html

[BELOW] This person used an AudioComponent class to use music and sound on a loop, and got two musics to play at the same time:

http://romerounrealscript.blogspot.com/2011/11/playing-sounds-in-unrealscript.html

Hope this helps. :)

\$\endgroup\$
0
\$\begingroup\$

You haven't displayed any code, making it difficult to help you.

REMEMBER: To have two sounds playing at one time, you must require two audio sources. By guessing (without seeing code or your scenes) you will have a single audio source, and you've set it to change dependent on what is happening.

E.g. door not opening = background music, door opening = door sound. However, instead, have two separate audio sources. One on the door, and one on an empty game object named "game audio".

This way two sounds can play at once.

Equally, remember you DO NOT need multiple audio listeners. Only audio sources.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.