Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

polevault139

macrumors 6502
Original poster
Sep 24, 2006
342
0
Illinois
I am trying to play an mp3 in my code so I have a file called halo.mp3 on my desktop so how would I access it?

I have system("halo.mp3");

It's not working so how do I fix this?
I am working in XCode, my friend wrote the program on a Windows machine and I have no experience writing in C++ so I just hope this will work. The program works except for that part.

Thanks for your help.
 
I am trying to play an mp3 in my code so I have a file called halo.mp3 on my desktop so how would I access it?

I have system("halo.mp3");

It's not working so how do I fix this?
I am working in XCode, my friend wrote the program on a Windows machine and I have no experience writing in C++ so I just hope this will work. The program works except for that part.

Thanks for your help.

You need to put "open /path/to/halo.mp3"

so if your halo.mp3 was in your music folder just under the music folder it would be
system("open ~/Music/halo.mp3"); which then opens itunes and plays halo.mp3
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.