Music

This forum is currently in read-only mode.
From the Asset Store
Epic Music 01
$5.99 USD
Epic Music 01 - Music for fantasy world: dwarves, elves, orcs, wizards.
  • Im new user of construct and can get musics working. I tried with wav/mp3 with Xaudio2.

    Example if I got music file called "Backround.mp3" how I should get it working

  • Can XAudio play mp3s? I had some impression that there are licensing restrictions forcing us to use mainly .ogg?

    *waits for someone who knows

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • pretty sure i've played an .mp3 file easily with xaudio2

    as far as the OP goes, make sure to include the path of the file (not just the name).

  • But theres one little problem, if I do it like "C:\Documents & Setting\user\Name\Game\Music\Music.mp3" it will only work with me but if someone else tries it wont play them.

  • But theres one little problem, if I do it like "C:\Documents & Setting\user\Name\Game\Music\Music.mp3" it will only work with me but if someone else tries it wont play them.

    put the sound file in the same folder as the .cap or .exe and use

    AppPath + "music.mp3"[/code:v7tgm7n7]
  • Or do AppPath +/Music/Music.mp3"

    But Path object is bugged soooo its best to Binary that music.

  • Umm how I can binary music then?

  • Umm how I can binary music then?

    In your resources tab, right click on "Binary" and select "Add file" to add a copy of the file to the .exe itself. You can now use "Play music from resorce or "Play file from resource" or whatever in the events.

    put the sound file in the same folder as the .cap or .exe and use

    AppPath + "music.mp3"[/code:11j7sxtn]
    

    If it's in the same folder you just have to put "\music.mp3"

    If it's in a subfolder of the same folder just do "\sub\music.mp3"

    Relative paths work fine like that.

  • Ok thanks this will help me alot.

  • AppPath returns a backslash at the end. And you should use backslashes (\) not forward slashes (/) for local files. So the correct formatting for a subfolder would be:

    AppPath + "Music\File.mp3"

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