Playing Sounds and Music

For questions about using Classic.

Post » Sat May 24, 2008 8:03 pm

Hello it's Mr. Question again :wink:

1.What sounds types does Construct support now and are there any future types to be supported?

2.How do you play sounds? LOL...I want to play a midi at the start of layout, so:
Start of Layout->System: Play Sound "cheese.mid" with flags
But no play, also tried playing a .wav but no work either. (The midi is in the same directory as game file.)

Sorry to ask so many questions :()
B
13
S
3
G
5
Posts: 286
Reputation: 3,193

Post » Sat May 24, 2008 8:15 pm

B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Sat May 24, 2008 8:49 pm

Thanks Rich! I wasn't aware of that object!

I still cannot play any sounds, even after converting my wav to pcm format using the directions on the wiki.

Can I assume midi playback is not supported?


(does not play sound-------------------------------^)
B
13
S
3
G
5
Posts: 286
Reputation: 3,193

Post » Sat May 24, 2008 9:42 pm

B
3
S
2
G
4
Posts: 322
Reputation: 2,119

Post » Sat May 24, 2008 10:03 pm

Argghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh Construct is really erking me :x

The example TheInstance gave works fine, i use his .wav file and use the same events and it won't play the sound on my game. Then, some "texture error" comes up at run time and i have to alt f4 out.

I can't get anything accomplished with construct...maybe I should wait till 1.0
B
13
S
3
G
5
Posts: 286
Reputation: 3,193

Post » Sat May 24, 2008 10:05 pm

Email the cap to ashley@scirra.com, and hopefully Ashley can fix it :)
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Sat May 24, 2008 10:42 pm

You guys use the auto-save i hope ? So far it saved my butt several times.

You said it has a texture error at runtime ?
So i assume you can still open the .cap in construct, just not run it.

In that case, look in the events wizard while adding any object based event,
look for an object with a gear as thumbnail,

thats the object causing u texture problems at runtime.

Maybe Ashley can fix that, but i am afraid not.
So make a backup, of the .cap

Do not delete the phantom object in the layout till you fixed all events.
Deleting it will take every action, every event containing the object away !

First remake the object in the layout editor. (a new object)
Go into your events/actions line by line ....
And change the pointers from the error object to the newly made object.
Then delete the phantom object.

That should fix the texture problem. Hope you have only one error object to go.

Now Your music not playing.
Weird, my example plays you say.

Are you sure .cap and the .wav are in same folder ?
not in a folder in the folder, if u know what i mean ?

I dont know if construct takes spaces in file paths well. I have no idea, since non of my paths have spaces, partly thx to vistas new way of using symbolic links to mark the user folders.

Can u, because i wonder, copy the folder containing the .cap on the C drives root ? and try from there ?

hope i helped some.

Although one wanted to pronounce it "skeera" its not that "skeering" ... lol
just keep going
you will manage
and turn that auto save on !!

Man i hate this spellings checker i lined up with my IE, but guess, i am a little readable now .. lol
B
3
S
2
G
4
Posts: 322
Reputation: 2,119

Post » Sun May 25, 2008 4:51 am

Alright, works now! I am so embarrassed, I had the layout set to the wrong event sheet! I'm going to have to re-register and change my name I'm so ashamed! :cry:

If anyone needs help playing sounds, let me explain what I have learned:
Let's assume you want the sound at layout start. Make sure to have the sound file in the same directory as .cap file for ease of use, otherwise you music specify the directory!

1. Right click-> Insert the Audio Object Direct Sound into the layout (it will not be visible)
2. Several play options:
2a. Start of Layout-> Direct Sound/ Play music "filename.mid" (Works with Midi)

2b. Start of Layout-> Direct Sound/ Load File "filename.wav" (you can edit which channel, but it is okay to leave at channel 0)
+
Play Direct Sound Channel 0 (or you can specify another channel)

2c. Start of Layout-> Direct Sound/ Autoplay "filename.wav"

This may be trivial to some but if you don't know what you're doing then all power to ya! :wink:
Hope this helps someone! Rich, Instance, Ashley, thank you all so much!
B
13
S
3
G
5
Posts: 286
Reputation: 3,193


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests