[SOLVED]musics not playing while in construct

For questions about using Classic.

Post » Thu Apr 07, 2011 8:16 pm

Long time I don't use construct so I don't really remember some things..

I loaded a project and when I run it, it doesn't play musics and sounds, but if I compile it to .exe it plays all the stuff correctly.. so I really doesn't know what's wrong..

I used the Xaudio2 like this:
AppPath & ''OST\test.mp3"

it's all there and compiled it plays the mp3 but while testing it in construct, it doesn't play the music.. the '.CAP' file and '.EXE' file are all in the same place with a OST directory in it and the musics inside..
B
30
S
6
G
5
Posts: 433
Reputation: 6,061

Post » Fri Apr 08, 2011 11:06 pm

On the Project tab, under your application, right click the folder "Files" and click "Add file(s)" and select your music file.
Then on your Start of frame event, use XAudio -> Play Music, and the music will appear there
B
83
S
21
G
15
Posts: 1,039
Reputation: 15,134

Post » Sat Apr 09, 2011 2:04 am

But using my way isn't possible? Just to clarify.. if I compile the example and test it, it plays the music but during the editing in construct, It doesn't play while running it, so I really don't know what's wrong.. there is my CAP file, there is a folder 'OST' and inside there is the test.mp3 file..

Construct doesn't play the musics while running it? Only after compiled?


edit: Also I did the way u pointed and still not working, added the .mp3 file to files
and at start of layout I added xaudio: play file from resource and select the file and still no music. But, if I compile it, then the music plays.
B
30
S
6
G
5
Posts: 433
Reputation: 6,061

Post » Sat Apr 09, 2011 3:49 am

Construct does play music when running it. So this is something on your computer, maybe some folder rights or something else. I don't know what exactly is causing it, but I can say for sure it is not Construct's normal behavior.
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Sat Apr 09, 2011 5:30 am

So anyone have any idea what could it be? I didn't changed anythng inside construct, and I instaled few other programs after.. like autocad and a few games..
B
30
S
6
G
5
Posts: 433
Reputation: 6,061

Post » Sat Apr 09, 2011 5:49 am

Might try AppPath & ''\OST\test.mp3"
Instead of AppPath & ''OST\test.mp3"
Image Image
B
161
S
48
G
91
Posts: 7,358
Reputation: 67,271

Post » Sat Apr 09, 2011 6:06 am

[quote="newt":1e2ijfco]Might try AppPath & ''\OST\test.mp3"
Instead of AppPath & ''OST\test.mp3"[/quote:1e2ijfco]
still nothing...

reminding you that if I compile the game to .exe it plays all the musics N' sounds.. so It's something wrong with my Construct, I recentry updated to the newest version and still no music while testing the game inside construct.


tested with music in the same folder of .CAP file
like xaudio2: play music > AppPath & "test.mp3" and nothing, but again, if compiled, then it works


I'll tomorrow reinstall all the construct and try if works..... if not then I have no idea what's wrong.
B
30
S
6
G
5
Posts: 433
Reputation: 6,061

Post » Sat Apr 09, 2011 8:57 am

Be sure and have the DirectX updater run, other than that I kind of wonder if it might have something to do with how you you have your system set up to play audio.
Image Image
B
161
S
48
G
91
Posts: 7,358
Reputation: 67,271

Post » Sat Apr 09, 2011 9:25 am

Try put music files in construct's AppData folder (in win7 it's C:\Users\<ur name>\AppData\Roaming\Scirra\) where Temp.exe is (it's 'preview' exe, generated when you run game from construct editor). It sould works even if you didn't saves cap
B
2
S
2
G
2
Posts: 158
Reputation: 1,366

Post » Sat Apr 09, 2011 4:10 pm

[quote="DtrQ":2fz8xqgd]Try put music files in construct's AppData folder (in win7 it's C:\Users\<ur name>\AppData\Roaming\Scirra\) where Temp.exe is (it's 'preview' exe, generated when you run game from construct editor). It sould works even if you didn't saves cap[/quote:2fz8xqgd]
still nothing
B
30
S
6
G
5
Posts: 433
Reputation: 6,061

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests