Sample's wont play when i build .exe!
Hello!
My app uses the "Play and loop a sample file on a specific channel" command. I set it to play on channel 32 and everything works fine.
It gets the sample using this line : "Appdrive$+Appdir$+"\Data\Sound\"+"MySong.ogg" **
And it works fine for all the song and all the different sound effects used in the game when i test it from within MMF2.
BUT when i build an exe file and run it it wont work. Its completely silence. Not even a sound effect will play. Im sure the exe is placed at the correct directory and all. Its in the directory wich leads to \Data\Sound\. Also the soundeffects are assigned to different channels.
Any clue of why this might happens?
Cheers!
Re: Sample's wont play when i build .exe!
Yeah this bug has been annoying me for ages. Not your fault at all, it's an MMF2 bug.
Re: Sample's wont play when i build .exe!
Oh, really. Im glad to hear that. Now i at least know whats causing it. It has bothered you for ages? It bothers me right now. Hmm, time to ask Yves to fix it? :)
So, if you, Yves, read this post?
Is this somthing you could look into? :)
Cheers!
Re: Sample's wont play when i build .exe!
Sound Filters Problem I'd guess.
Re: Sample's wont play when i build .exe!
So the only workaround is to include the sample file into the .exe. Wich is not acceptable in my app cause i want the player to be able to import his own sounds/music.
Re: Sample's wont play when i build .exe!
When a sample's referred to by name as an external file, MMF2 doesn't know to include its sound filter, as Dragonguy hinted at - to fix it, go into your application properties, find the sound filters, uncheck "Automatic" and select the ones you need.
I was fairly sure that Mechabowser already knew the solution, as this comes up a lot - but if not, this should work for you, too.
Re: Sample's wont play when i build .exe!
Oh, it was that easy! Now it works perfectly! Thanx David! :D
Re: Sample's wont play when i build .exe!
Oh. That's actually kinda silly.
Thanks aswell, I guess!
Re: Sample's wont play when i build .exe!
Try getting rid of the Appdrive$ in the beginning. I never use it, and Appdir$ works fine.
Re: Sample's wont play when i build .exe!
It's easier to just use Apppath$ than Appdrive$ + Appdir$.