Audio caching

For questions about using Classic.

Post » Wed Jul 21, 2010 5:14 pm

I've been experimenting audio talking, and I noticed that each time an audio file plays, the entire layout pause for a bit and then the file plays.

The files are very small. The smallest one I had was a 96kb .wav file, I've also done MP3's as well and just the one file alone made the layout pause.

I had an idea, I have no idea if it will work:

*What if I just had all of the audio files play at a zero volume level when starting the game up. Then when the game reaches the layout where music is supposed to play, it will fire up faster from cache (?)

I don't know, just wondering...?
B
12
S
4
G
3
Posts: 426
Reputation: 2,458

Post » Wed Jul 21, 2010 7:43 pm

did you try the cache file action?

or loading the wavs to channels at start of layout?
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Wed Jul 21, 2010 9:33 pm

^^^ I ignored those for some reason. I guess because my other sounds played without the hitch I thought it might've been some other issue. Thanks for the tip, I'm going to try those.

I have a two-part question... the layout where I'm trying the talking audio doesn't last for long. It only lasts until there is a collision and that takes about 3 or 4 seconds, then it jumps back to the previous layout. This is done by design. My fear is that in layouts where I need a lot of dialog with some of it triggered by collisions (also by design), there may be more pausing hiccups.

1. Do you think these actions you've pointed out will address that and keep the timing smooth without there being hiccups? I haven't done all the audio yet and I'd hate to do it all then have it cause a bunch of stops.

2. Is there a way to load audio for the next layout? For example, I'm in Layout 1 and I want to start loading the audio for layout 2?
B
12
S
4
G
3
Posts: 426
Reputation: 2,458

Post » Thu Jul 22, 2010 3:10 am

Hmmmm, this is weird... here are some new issues I'm encountering:

-At the start of the layout I loaded two .wav files. I tried it loading each from separate Xaudio2 objects. I had one on channel 1, the other on channel 2. I also tried it loading both .wav files from the Xaudio2 object and also putting both files on the same channel... I used "play channel" to play the .wav's.

... the result in both situations... a very nasty, loud, garbled electronic sound from one of the files, and the other file playing normally. Very, very strange. It's basically a situation where I'm not able to play more than one sound file at a time.

-I also attempted to load an MP3 at the start of layout, and then "play channel" to play the file. But, the file doesn't play. If I select "play music from file" it plays but causes the layout to pause. In fact, If I choose "play music from file" with .wav's it does the same thing. All of this happens even after loading the file at the start of the layout.
B
12
S
4
G
3
Posts: 426
Reputation: 2,458


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests