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

Username:   Password: 
 RegisterRegister   
 Playing music in Turing Help Needed
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Foundation




PostPosted: Fri Oct 13, 2006 8:21 pm   Post subject: Playing music in Turing Help Needed

Hi, in my version of turing, Music.PlayFile does not work. Though I put the correct filename and extensions in, it does not work. The music file is in the same directory as the turing file. I have the newest version of turing, and I don't know what's wrong with my program. Please help, and if i didn't provide enough information, please informe me.
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Fri Oct 13, 2006 8:24 pm   Post subject: (No subject)

what kind of doesn't work? compile time error (doesn't compile), run time error (program crashes when run), or the program works, but you don't hear the sound?
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Foundation




PostPosted: Fri Oct 13, 2006 8:30 pm   Post subject: (No subject)

Yeah, I don't hear anything when the program runs. Nothing's wrong with my speakers, playing music in RealPlayer and Windows Media's fine. I don't know what's wrong.
neufelni




PostPosted: Fri Oct 13, 2006 8:33 pm   Post subject: (No subject)

If the program doesn't give you an error message but you don't hear the music, then the problem is likely that you did not put it in a process and then fork it with the rest of your program. You might want to use Music.PlayFileReturn instead, then you don't have to use a process, just put the Music.PlayFileReturn command at the beginning of your program.
Foundation




PostPosted: Fri Oct 13, 2006 8:58 pm   Post subject: (No subject)

I'm tried the Music.PlayFileReturn method, but I still don't hear anything. I did put it in a process, with a loop and forked it. It even made my program go slower than usual! Laughing But just no sound. Crying or Very sad The file doesn't have any bad problems, nor the program. The music file also seems okay, as it plays in Windows media player. Thanks for all your help, I appreciate your attention. Smile
BenLi




PostPosted: Sat Oct 14, 2006 9:13 am   Post subject: (No subject)

instead of using a process try Music.PlayFileLoop
neufelni




PostPosted: Sat Oct 14, 2006 9:20 am   Post subject: (No subject)

How about you post the source code that is giving you problems. We'll probably be able to help you better that way.
Foundation




PostPosted: Sat Oct 21, 2006 1:12 pm   Post subject: (No subject)

Well, thanks for all your help folks. But I finally figured it out.
I had a complex filing system on all of my folders. Example :
Schools/school year 2006 - 2007/subject/project/images/"file.bmp". This is only one of the simplest examples. Sometimes I have to click over 10 files to get to what I wanted to get to. But it helps to keep everything organized, so I can find what I want when I want to. Razz
And once I changed the music file and the turing file to \My Documents, it all worked out perfectly. Sorry for the almost false alarm there.
Embarassed
But the thing is, I found out that maybe turing can't take such a long file directory to find the music file that is *right beside* the turing source file. Turing makes me have a headache sometimes... Confused
Sponsor
Sponsor
Sponsor
sponsor
bruized




PostPosted: Fri Oct 27, 2006 5:25 pm   Post subject: (No subject)

I'm pretty sure that if the file is "right beside" your saved program then all you have to do is put the file name.

i.e. "file.bmp" would be all you need. It helps to keep it simpler.

But then again I could be wrong. This is only my first year with Turing.
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  [ 9 Posts ]
Jump to:   


Style:  
Search: