More music problems

This forum is currently in read-only mode.
From the Asset Store
6 looping tracks to use in your games and projects. These tracks are in the style of the 1960s detective movie genre.
  • Sorry to make yet another topic on this, but I've tried everything I know and I'm still having problems playing music.

    -Whenever I play a song (using "autoplay music from resource") I run into 2 problems. The first problem is there's about a 75% chance the song will be started twice, as in there are sometimes 2 "instances" of the same song playing at the same time. It's very loud and sounds awful.

    I've tried adding "trigger once," but that doesn't work. The event I use to start the music is a "one time event" anyway, so there should never be more than one instance of the music playing.

    -The second problem is on that 25% chance only one instance of a song is played, it sounds really distorted. Some songs sound like there's a strong delay/chorus effect, and other songs sound like they're playing the wrong notes.

    Basically I'm getting mixed results each time the music starts. Are there known bugs with the xaudio2 object or am I just doing something wrong?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sounds like you may have more than one instance of the XAudio2 object.

    Run debug layout and click on XAudio2 to see how many instances you have.

    If you have more than one, then you will want to remove the extras.

    Since you cannot select only one instance to delete, you will have to delete the XAudio2 object then re-add it. Or, if you have lots of sound events and don't want to re-add them all, do this:

    1. Give XAudio2 the destroy on start attribute.

    2. Add an event to create a XAudio2 at the start of the layout.

    hope that helps.

  • Wow I feel stupid now I don't know how but I did end up with multiple instances of the XAudio2 object, and that's been causing all of the music & sounds problems I've been running in to. Thanks!

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