Choppy Sound

For questions about using Classic.

Post » Wed Jun 29, 2011 5:39 am

I am trying to get an explosion sound for a boss ship but when it plays, it is static and choppy. The file, in VLC, plays fine. I tried it on an unused channel, 3, but same results. What could cause this, if anything?

Thanks.
B
5
S
1
G
1
Posts: 157
Reputation: 1,219

Post » Wed Jun 29, 2011 7:28 pm

1, Could be the sound file your using?
2, Try a different sound(s) just as a test.
3, Open the sound in an editor, if it looks like pictures 2 or 3 (below) it wont sound correct.



4, Upload the sound file/cap for someone to look at?
B
19
S
6
G
7
Posts: 1,204
Reputation: 7,296

Post » Thu Jun 30, 2011 12:41 am

[QUOTE=GSPforChrist] I am trying to get an explosion sound for a boss ship but when it plays, it is static and choppy. The file, in VLC, plays fine. I tried it on an unused channel, 3, but same results. What could cause this, if anything?

Thanks.[/QUOTE]

That happens a lot.

In the Xaudio object properties uncheck "Limiter enabled".

I hope it helps ;)
B
4
S
3
G
3
Posts: 125
Reputation: 1,450

Post » Tue Jul 05, 2011 6:32 am

I disabled limiter but still same results.

Here are two of the sound files I have tried and the current CAP.

http://www.mediafire.com/file/yc4xx3hwrttk2az/bigboom.wav
http://www.mediafire.com/file/s3tg04d5ky78txe/explosion4.wav
http://www.mediafire.com/file/tglmgbbb0ggui3p/humanfactor.cap

I made a Media File account since it seems the easiest way to be sharing files here.

Pretty much all other sounds disabled, except Hero so I know sound is working.

This is the boss info at the bottom of the event page. This was my latest attempt, but as mentioned I have tried an empty channel (3).

+ System: Is global variable 'Boss001' Less or equal 0
-> Boss001: Destroy
-> System: Add 500 to global variable 'Score'
-> XAudio2: Load resource "bigboom.wav" to channel 2 (No loop)
-> XAudio2: Play channel 2
-> System: Set global variable 'Mode' to 0

Thank you.
B
5
S
1
G
1
Posts: 157
Reputation: 1,219

Post » Fri Jul 08, 2011 11:28 am

Had a look at your cap and when it starts the following error pops up:

Resource file error -wav samples not found.(12 sounds)

The cap actually runs, but with the missing sounds you can't really test it.

Looking at the events, it looks like there's loads of sounds being activated / loaded to play on channel 2.

Here's a list of them:

+ MouseKeyboard: On key Space pressed
-> System: Create object Bullet on layer 1 at (0, 0) from Hero 's image point 1
-> XAudio2: Load resource "imphenzia_soundtrack_laser36.wav" to channel 2 (No loop)
-> XAudio2: Play channel 2


+ Hero: Value 'Health' Less or equal 0
-> Hero: Destroy
-> RESET: Make Visible
-> XAudio2: Load resource "gameover.wav" to channel 1 (No loop)
-> XAudio2: Play channel 1

+ Hero: On collision between Hero and Enemy001
-> Hero: Subtract 15 from 'Health'
-> Enemy001: Destroy
-> XAudio2: Load resource "damage.wav" to channel 2 (No loop)
-> XAudio2: Play channel 2

+ System: Hero.X-Enemy002.X is between -90 and 110

+ System: Every 1000 milliseconds
-> System: Create object EnemyLaser2 on layer 1 at (0, 0) from Enemy002 's image point 1
-> XAudio2: Load resource "imphenzia_soundtrack_laser20.wav" to channel 2 (No loop)
-> XAudio2: Play channel 2

+ System: For each Enemy003
+ System: Hero.X-Enemy003.X is between -80 and 126
+ System: Every 800 milliseconds
-> System: Create object EnemyLaser3 on layer 1 at (0, 0) from Enemy003 's image point 1
-> XAudio2: Load resource "imphenzia_soundtrack_laser30.wav" to channel 2 (No loop)
-> XAudio2: Play channel 2
-> System: Create object EnemyLaser3 on layer 1 at (0, 0) from Enemy003 's image point 2

+ System: For each Boss00
+ System: Hero.X-Boss001.X is between -80 and 126
+ System: Every 800 milliseconds
-> System: Create object BossPulse on layer 1 at (0, 0) from Boss001 's image point 3
-> XAudio2: Load resource "imphenzia_soundtrack_laser30.wav" to channel 2 (No loop)
-> XAudio2: Play channel 2
-> System: Create object EnemyLaser3 on layer 1 at (0, 0) from Enemy003 's image point 2

+ System: Is global variable 'Boss001' Less or equal 0
-> Boss001: Destroy
-> System: Add 500 to global variable 'Score'
-> XAudio2: Load resource "bigboom.wav" to channel 2 (No loop)
-> XAudio2: Play channel 2
-> System: Set global variable 'Mode' to 0

It looks like many of these might overlap or loop.

You could try just autoplaying the sounds as you need them, using a 'trigger once' to stop any looping?

example:
+ Hero: On collision between Hero and Enemy001
+ System: Trigger once
-> XAudio2: Autoplay file AppPath & "sounds\ouch.ogg" (No loop)

Hope this helps.
B
19
S
6
G
7
Posts: 1,204
Reputation: 7,296

Post » Wed Jul 27, 2011 5:19 am

Wonder why the sounds did not make it in. Will look at that and double check the loops and nons. Only thing that should be looking is the background music. Will gander and let you know. Thank you.
B
5
S
1
G
1
Posts: 157
Reputation: 1,219

Post » Sat Jul 30, 2011 4:57 pm

I realize now the sounds would not work from the CAP because they are still linked to the file until made into an EXE, where they become resources.

I have made all changes such as:

+ System: Start of layout
-> XAudio2: Autoplay resource "Skillet - Hero (instrumental).wav" (Loop)

+ System: Every 800 milliseconds
-> System: Create object BossPulse on layer 1 at (0, 0) from Boss001 's image point 3
-> XAudio2: Autoplay resource "imphenzia_soundtrack_laser35.wav" (No loop)
-> System: Create object EnemyLaser4 on layer 1 at (0, 0) from Boss001 's image point 2
-> System: Create object EnemyLaser4 on layer 1 at (0, 0) from Boss001 's image point 1

+ System: Every 1000 milliseconds
-> System: Create object EnemyLaser1 on layer 1 at (0, 0) from Enemy001 's image point 1
-> XAudio2: Autoplay resource "imphenzia_soundtrack_laser09.wav" (No loop)

+ MouseKeyboard: On key Space pressed
-> System: Create object Bullet on layer 1 at (0, 0) from Hero 's image point 1
-> XAudio2: Autoplay resource "imphenzia_soundtrack_laser36.wav" (No loop)

The only one that would not work right without the TRIGGER was this:

+ System: Is global variable 'Boss001' Less or equal 0
-> Boss001: Destroy
-> System: Add 500 to global variable 'Score'
-> System: Set global variable 'Mode' to 2
+ System: Trigger once
-> XAudio2: Autoplay resource "bigboom.wav" (No loop)

If I took line "XAudio2: Autoplay resource "bigboom.wav" (No loop)" and put it in with "-> Boss001: Destroy," it still goes choppy. Having this one sound in TRIGGER made it work, and the rest were able to work fine as you saw above.

Now, I am not sure right now the difference between using a channel and doing it the above way, but at this time, all sounds work fine. Thank you.

I included a copy of the game and cap if you wanted to review.
http://www.mediafire.com/?ad39s9qt9z4czv1
B
5
S
1
G
1
Posts: 157
Reputation: 1,219


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests