Page 1 of 1

Exorcist needed for ghost MP3 file - Solved

Posted: Wed Dec 14, 2016 5:41 am
by KimD
I'm having a weird day ;-) Probably best that I start at the beginning. I'm trying (for the first time) to get sound working in an app.

1) I imported file aaa.mp3 as a control.
2) Then I read some posts about mp3 files not working on Android if imported as a control. So I deleted aaa.mp3. I could not do this using the Project Browser (the Clear command had no effect), so I typed a command into the message box to delete it. aaa.mp3 then disappeared from my project browser.
3) I then included aaa.mp3 in my Standalone Setting > Copy Files
4) And using Play Audioclip (EngineFolder & "/myfolder/aaa.mp3") I was successfully able to play aaa.mp3 on my windows IDE. Additionally - using mobilePlaySoundOnChannel I was able to get aaa.mp3 to play on my Android test device.

Everything was looking good............

But when I tried to load a second sound (bbb.mp3) into my app, things started getting weird. I added bbb.mp3 to my Standalone Setting > Copy Files, but when I Play Audioclip (EngineFolder & "/myfolder/bbb.mp3"), file aaa.mp3 plays.

I've tried adding a whole bunch of other mp3 files into my copy files and playing them. Regardless of what VALID filename I put in my Play Audioclip command, file aaa.mp3 always plays!

If I provide an invalid file name (a file that has not been included in the copy files) then nothing plays.

If I delete aaa.mp3 from the list of copy files, but leave bbb.mp3 in there; when I try to play file bbb.mp3, then file aaa.mp3 plays.

If I include bbb.wav in my copy files, then I can successfully play the wav sound file.

bbb.mp3 does play on my Android test device (but the app suspends as soon as it stops playing, but I suspect that that will be another post).

Can anyone tell me how to exorcise the ghost aaa.mp3 that has hijacked ALL of the mp3 sounds in the IDE of my app? At least thank **** that it's not some really terrible piece of music ;-)

I'm guessing that this is related to my earlier attempt to delete the "Import As Control" version of aaa.mp3.

Thanks in advance

Kim

LC 8.0.2 on Windows 7

Re: Exorcist needed for ghost MP3 file

Posted: Wed Dec 14, 2016 2:19 pm
by Klaus
Hi Kim,

does this also happen when you create a new stack and only add these 2 MP3 files?

BTW:
Get used to the correct location of files copied with "Copy files..." -> specialfolderpath("resources")
Which happens to be the same as the engine folder on mobile, so this is not the troublemaker!


Best

Klaus

Re: Exorcist needed for ghost MP3 file - Solved

Posted: Wed Dec 14, 2016 9:13 pm
by KimD
Sorry Klaus. I should have tried creating a new stack.

It turns out that in the LC8.0.2 IDE on my windows 7 PC - Play abc.mp3 gives me X seconds of static / white noise sound, where X equals the length of abc.mp3

I got fooled by the fact that my original aaa.mp3 track was the sound of people clapping, which sounded a lot like white noise anyway.

I've now found your previous posts about MP3 not being supported on Windows using the Play Audioclip command.

I will investigate using WAV format for my current Windows + Android project.

Regards (and Merry Christmas)

Kim