Music not exporting

Non-platform specific questions.

Music not exporting

Postby ikarus » Mon Aug 22, 2011 2:56 am

None of my music is present in the exported version of my game, in neither linux or windows. Oddly both works when playing the game from the editor??? Only when exported... I've tried oggs and wavs, but oddly my wav sound effects work fine :/

Any ideas? :/
>>>>>>>>>>>>>>>>>>>>> http://www.code1011.com <<<<<<<<<<<<<<<<<<<<<<<
ikarus
 
Posts: 143
Joined: Fri Aug 12, 2011 3:06 am
Score: 11 Give a positive score

Re: Music not exporting

Postby ikarus » Mon Aug 22, 2011 3:30 am

Wait figured a bit out! I have an array of the music filenames to play depending on which level it is cause I didn't want to have to play each file manually. Then I built the correct path using sprintf and play it with a variable as the path. I changed the PlaySound to a complete path to one of the music files and now it plays exported. I think because I'm not using full path names that it's just not including them in the exported data.
Anyone know a way around this!? I really don't want to have to manually put in the music for the like 50+ levels I plan on having...
>>>>>>>>>>>>>>>>>>>>> http://www.code1011.com <<<<<<<<<<<<<<<<<<<<<<<
ikarus
 
Posts: 143
Joined: Fri Aug 12, 2011 3:06 am
Score: 11 Give a positive score

Re: Music not exporting

Postby skydereign » Mon Aug 22, 2011 10:43 am

Nope, there are known problems with this, but that's just how it works. For gE to play your sound, you need to have a PlayMusic2 or PlaySound2 call with the name of the file. Otherwise gE won't keep the file. This has been a problem for me as like you I prefer to keep it in an array or similar, but what I usually end up doing is this. Have a function for playing music, and just put in a switch that has the many PlayMusic2 calls. This appeases gE's need to have the PlayMusic2 function calls, which is rather sad... What I do for sounds is just have a function that stores all the PlaySound2 calls, that way I can use more custom sound functions.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Music not exporting

Postby ikarus » Mon Aug 22, 2011 12:16 pm

It's funny lol, that's exactly what I ended up doing haha. But I never gave up hope that I'd be able to make it easier^^
>>>>>>>>>>>>>>>>>>>>> http://www.code1011.com <<<<<<<<<<<<<<<<<<<<<<<
ikarus
 
Posts: 143
Joined: Fri Aug 12, 2011 3:06 am
Score: 11 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest