Author |
Message |
Sur_real
|
Posted: 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? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
TheWanderer
|
Posted: 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. |
|
|
|
|
![](images/spacer.gif) |
Sur_real
|
Posted: 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) |
|
|
|
|
![](images/spacer.gif) |
Insectoid
![](http://compsci.ca/v3/uploads/user_avatars/13760332514cbd0ce972eaa.jpg)
|
Posted: 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. |
|
|
|
|
![](images/spacer.gif) |
Sur_real
|
Posted: Sun Jun 01, 2008 5:35 pm Post subject: RE:Music.PlayFile not working |
|
|
yes it is. |
|
|
|
|
![](images/spacer.gif) |
Sean
![](http://compsci.ca/v3/uploads/user_avatars/47413941748406f441f83e.png)
|
Posted: Sun Jun 01, 2008 5:40 pm Post subject: Re: Music.PlayFile not working |
|
|
Is that the exact name of the music? |
|
|
|
|
![](images/spacer.gif) |
Sur_real
|
Posted: 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 |
|
|
|
|
![](images/spacer.gif) |
Sean
![](http://compsci.ca/v3/uploads/user_avatars/47413941748406f441f83e.png)
|
Posted: 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. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Sur_real
|
Posted: Sun Jun 01, 2008 6:23 pm Post subject: RE:Music.PlayFile not working |
|
|
nope, ".mp3" doesn't work either... |
|
|
|
|
![](images/spacer.gif) |
vapour99
![](http://compsci.ca/v3/uploads/user_avatars/11560994674845da5b2e45a.png)
|
Posted: 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 |
|
|
|
|
![](images/spacer.gif) |
Sur_real
|
Posted: 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! |
|
|
|
|
![](images/spacer.gif) |
TheWanderer
|
Posted: 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? |
|
|
|
|
![](images/spacer.gif) |
Sur_real
|
Posted: 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! |
|
|
|
|
![](images/spacer.gif) |
|