
-----------------------------------
Sur_real
Sun Jun 01, 2008 4:24 pm

Music.PlayFile not working
-----------------------------------
For some reason, I can't play music in my program.  I tried using Music.PlayFile, Music.PlayFileLoop, Music.PlayFileReturn with and without processes.
The program runs but really slowly and of course, without music.

EDIT:I also tried to shorten the music file's name and change the dir to a shorter length.
EDIT2:Does the file size have any effect on it?

-----------------------------------
TheWanderer
Sun Jun 01, 2008 4:58 pm

Re: Music.PlayFile not working
-----------------------------------
EDIT:I also tried to shorten the music file's name and change the dir to a shorter length.
EDIT2:Does the file size have any effect on it?

Turing is able to take in full dir lines without problem. But in normal cases you should be able to access the music file if you put it in the same directory as the .t file. Then you only have to state the filename.ext and it will work

File size shouldn't matter, I've successfully imported a 10 minute song before and it played fine.

Can you post the code where you defined the music file, and the lines where you use Music.PlayFile?
I'll try to debug your code as best as I can.

-----------------------------------
Sur_real
Sun Jun 01, 2008 5:19 pm

RE:Music.PlayFile not working
-----------------------------------
well, like I said I tried many ways including...


Music.PlayFileLoop ("music.MP3")



process BgMusic
loop
Music.PlayFile ("music.MP3")
end loop
end BgMusic

fork BgMusic



Music.PlayFileReturn ("music.MP3")


and more (I think b/c I searched the forum for answers)

-----------------------------------
Insectoid
Sun Jun 01, 2008 5:23 pm

RE:Music.PlayFile not working
-----------------------------------
Is the music file in the same folder as the program? That's the only problem I can think of.

-----------------------------------
Sur_real
Sun Jun 01, 2008 5:35 pm

RE:Music.PlayFile not working
-----------------------------------
yes it is.

-----------------------------------
Sean
Sun Jun 01, 2008 5:40 pm

Re: Music.PlayFile not working
-----------------------------------
Is that the exact name of the music?

-----------------------------------
Sur_real
Sun Jun 01, 2008 5:54 pm

RE:Music.PlayFile not working
-----------------------------------
Yes, I changed it though...
If you must know it was called "1-18 18 Ghosts II.mp3"(by Nine Inch Nails) before

-----------------------------------
Sean
Sun Jun 01, 2008 6:09 pm

RE:Music.PlayFile not working
-----------------------------------
Then try that extension, and see if that works. Might be going to its old name, and not the renamed. It would still have the properties of the old one before, I believe.

-----------------------------------
Sur_real
Sun Jun 01, 2008 6:23 pm

RE:Music.PlayFile not working
-----------------------------------
nope, ".mp3" doesn't work either...

-----------------------------------
vapour99
Sun Jun 01, 2008 7:29 pm

RE:Music.PlayFile not working
-----------------------------------
is this an encoded .mp3?

have you tried other sounds?

I recommend trying a windows sound or a .wav file

-----------------------------------
Sur_real
Sun Jun 01, 2008 7:40 pm

RE:Music.PlayFile not working
-----------------------------------
not sure...I'll recode it to .wav or something...
P.S. Nice avatar btw!

-----------------------------------
TheWanderer
Sun Jun 01, 2008 7:44 pm

Re: Music.PlayFile not working
-----------------------------------
.mp3 and .MP3 are the same extension... though I'm not sure if Turing recognizes that.
however, it does NOT accept windows format media.

process play_music
Music.PlayFile ("music.mp3")
end play_music

fork play_music 

works fine.. i just tried it o.o

possibly its not a Turing problem?
If the file is playable elsewhere but not playable in Turing it could be a problem with the file. Not all mp3s are encoded alike.

as a last resort, backup all your saved Turing files and unit files, then reinstall Turing. clean sweep and extract from source.
the sound module files might be corrupted.. somehow?

-----------------------------------
Sur_real
Sun Jun 01, 2008 8:18 pm

RE:Music.PlayFile not working
-----------------------------------
Oooo...FIXED IT
Had to recode it!
Thanks for your help and effort!
