Sounds, how?

For questions about using Classic.

Post » Fri Apr 11, 2008 3:23 pm

I can't get anything else but "Play music from file." produce any kind of sound!

Could someone please provide step-by-step guide on how to make , for example, a cannon make a sound from file cannon.wav when it shoots?

Cause I've tried everything.

Setting volumes high.

Using all the autoplay and play thingies.

Channels, directional sounds etc.

How do I get it to work.

I'm really getting bored of this, help would be awesome!
B
2
S
1
G
4
Posts: 35
Reputation: 1,270

Post » Fri Apr 11, 2008 3:33 pm

Put a PCM .wav file in the same directory as your game, then "Autoplay file" with the filename should make it play. For example, upon any key pressed, autoplay play "myfile.wav".
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Fri Apr 11, 2008 3:50 pm

Alright, working now.

Although it only worked after I converted it to PCM 16-bit mono, are there other variations of PCM which work?
B
2
S
1
G
4
Posts: 35
Reputation: 1,270

Post » Fri Apr 11, 2008 3:54 pm

Any PCM format should work.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Sat May 03, 2008 2:02 am

excuse me... but...
what is pcm?? :(
thank you.
B
2
G
4
Posts: 14
Reputation: 1,078

Post » Sat May 03, 2008 2:09 am

PCM is an old-fashion (well, in computer years) way of saying Microsoft WAV format.
http://en.wikipedia.org/wiki/WAV
B
3
S
2
G
4
Posts: 310
Reputation: 2,120

Post » Sun May 04, 2008 6:03 pm

PCM, without going in to the details, is essentially uncompressed audio. The ".wav" file extension unfortunately covers a lot of different compressed formats of sound (even MP3 files can be stored as .wav files), and only the uncompressed ones (PCM) can be played by Directsound.

Windows Sound Recorder can tell you what format a sound is - open a sound and go file/properties - it should say something like:

Audio Format: PCM 22.050KHz, 16 Bit, Mono

It says "PCM" there so you're safe. If it doesn't, you can simply choose file/save as, choose a PCM format, and save a version Directsound can play.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Sun May 04, 2008 10:02 pm

Thank you Ashley!
now is clear for me, but i convert the file in "Windows sound recording" and there's no option to save as pcm file :? i save it like .wav, but there`s the same problem with audio...
Anyway i will search another converter or change the sound files.
thanks for all your help! :D
B
2
G
4
Posts: 14
Reputation: 1,078

Post » Sun May 04, 2008 10:06 pm

Go File -> Save As, and at the bottom, there's a button that says 'Change' next to the Format. Click it and select 'PCM' as the format, and try to match the same bits per sample/frequency as the original file.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Mon May 05, 2008 12:30 am

that's it!!
thanks a lot and sorry for my questions but i am a mac user and i have Pc only for construct for now, i am learning slowly about the windows system too.
B
2
G
4
Posts: 14
Reputation: 1,078

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests