Music/Sounds Troubles

For questions about using Classic.

Post » Sat Aug 21, 2010 5:48 am

I've run into a few problems while adding music & sounds to my game..All of the audio consists of wav files. I've never messed with separate channels so I just use "Auto play resource" and "Play music from resource".

Anyway, to the problems. Every time I play a new song the game pauses for a bit. Not only that but when this pause happens my player falls through certain platforms. How can I get rid of this pause?

Also, even though I add "Trigger once" to the condition that plays a new song, the event will sometimes trigger twice and have 2 of the same song play at once.

Besides that, is there any way stop a sound while it's playing?

Thanks!
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Sat Aug 21, 2010 8:18 am

are you using play song or play sound to play songs?
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Sat Aug 21, 2010 10:08 am

I'm using "Play music from resource" under Xaudio 2's music tab. I think the pause is due to the filesize, since the song is a .wav file, but I could be wrong. I normally use ogg but it seems ogg only works for sounds.
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Tue Aug 24, 2010 4:10 am

to avoid falling through on pauses, limit the lower frame rate in advanced runtime properties.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Tue Aug 24, 2010 4:44 am

[quote="Tokinsom":1j1rg0ed]I'm using "Play music from resource" under Xaudio 2's music tab. I think the pause is due to the filesize, since the song is a .wav file, but I could be wrong. I normally use ogg but it seems ogg only works for sounds.[/quote:1j1rg0ed]
If you are using a .wav file, you could use it as a channel sound instead of music, which enables you to cache it
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Tue Aug 24, 2010 11:28 am

Why would you need to use a .wav for music, by the way? It's pretty simple to convert to MP3 or even OGG (although OGG is having dramas at the moment). If you're concerned about quality, you can use high rate MP3 (320kbps VBR) which seems to work quite well in my testing. During the game, having high-quality music is a bit of a waste anyway with all the sound effects mixed in.

Just make sure your source wavs use standard frequencies:
11025, 22050, 44100
16 bit
mono/stereo

I'll put a detailed post in help/tech support in case others are having problems.
B
2
G
2
Posts: 42
Reputation: 734


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests