Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Music.PlayFile not working
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Sur_real




PostPosted: Sun Jun 01, 2008 4:24 pm   Post subject: 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?
Sponsor
Sponsor
Sponsor
sponsor
TheWanderer




PostPosted: Sun Jun 01, 2008 4:58 pm   Post subject: Re: Music.PlayFile not working

Sur_real @ Sun Jun 01, 2008 4:24 pm wrote:
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




PostPosted: Sun Jun 01, 2008 5:19 pm   Post subject: RE:Music.PlayFile not working

well, like I said I tried many ways including...

code:

Music.PlayFileLoop ("music.MP3")


code:

process BgMusic
loop
Music.PlayFile ("music.MP3")
end loop
end BgMusic

fork BgMusic


code:

Music.PlayFileReturn ("music.MP3")


and more (I think b/c I searched the forum for answers)
Insectoid




PostPosted: Sun Jun 01, 2008 5:23 pm   Post subject: 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




PostPosted: Sun Jun 01, 2008 5:35 pm   Post subject: RE:Music.PlayFile not working

yes it is.
Sean




PostPosted: Sun Jun 01, 2008 5:40 pm   Post subject: Re: Music.PlayFile not working

Is that the exact name of the music?
Sur_real




PostPosted: Sun Jun 01, 2008 5:54 pm   Post subject: 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




PostPosted: Sun Jun 01, 2008 6:09 pm   Post subject: 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.
Sponsor
Sponsor
Sponsor
sponsor
Sur_real




PostPosted: Sun Jun 01, 2008 6:23 pm   Post subject: RE:Music.PlayFile not working

nope, ".mp3" doesn't work either...
vapour99




PostPosted: Sun Jun 01, 2008 7:29 pm   Post subject: 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




PostPosted: Sun Jun 01, 2008 7:40 pm   Post subject: RE:Music.PlayFile not working

not sure...I'll recode it to .wav or something...
P.S. Nice avatar btw!
TheWanderer




PostPosted: Sun Jun 01, 2008 7:44 pm   Post subject: 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.

Turing:
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




PostPosted: Sun Jun 01, 2008 8:18 pm   Post subject: RE:Music.PlayFile not working

Oooo...FIXED IT
Had to recode it!
Thanks for your help and effort!
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 13 Posts ]
Jump to:   


Style:  
Search: