0 Favourites

[SOLVED]musics not playing while in construct

This forum is currently in read-only mode.
  • 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..

  • 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

  • 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.

  • 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.

  • 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..

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Might try AppPath & ''\OST\test.mp3"

    Instead of AppPath & ''OST\test.mp3"

  • Might try AppPath & ''\OST\test.mp3"

    Instead of AppPath & ''OST\test.mp3"

    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.

  • 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.

  • 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

  • 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

    still nothing

  • What is the value of AppPath? Make a Text object and set it's text to AppPath. If it isn't the directory the cap file is in maybe try re-saving the cap file and see if that fixes it.

  • 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.

    but compiled it plays the sound/musics correctly, so probably it must be something with my construct..

  • What is the value of AppPath? Make a Text object and set it's text to AppPath. If it isn't the directory the cap file is in maybe try re-saving the cap file and see if that fixes it.

    the value for the Apppath is right, tested it with the text object..

    also, I already tryed re-saving the file and nothing... Today I had to work all day, still working so after I will reinstall the whole Construct and see if works..

  • I still think in the direction of rights for the temp exe and rights for the final exe. Maybe you restricted the temp exe's access to files or folders by accident? (e.g in your av suite?)

  • I still think in the direction of rights for the temp exe and rights for the final exe. Maybe you restricted the temp exe's access to files or folders by accident? (e.g in your av suite?)

    Sorry I didn't understood what u said..

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)