More music problems

For questions about using Classic.

Post » Mon Oct 04, 2010 3:29 pm

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?
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Tue Oct 05, 2010 11:12 am

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.
B
79
S
24
G
54
Posts: 4,740
Reputation: 40,743

Post » Tue Oct 05, 2010 4:02 pm

Wow I feel stupid now :lol: 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!
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests