Advertisement

CD Audio (how?)

Started by November 13, 2000 05:52 PM
3 comments, last by Fresh 24 years, 1 month ago
Can somebody really quickly give me the winapi to play a certain track on from an audio cd. Thanking you very muchly. "The mere thought hadn''t even begun to speculate about the slightest possibility of traversing the eternal wasteland that is my mind..."
Sorry, I don''t have the answer. But, I have heard that it''s an MCI (media control interface) string of some sort. Good luck!
Advertisement
Yep you can use MCI. It''s really easy here are some basic functions...
(BTW, make sure to link to winmm.lib and include mmsystem.h)

  // Set MCI to play cd audio...void Open_CDAudio(void){	mciSendString("open cdaudio",NULL,NULL,NULL);	mciSendString("set cdaudio time format tmsf",NULL,NULL,NULL);}// Play selected trackvoid Start_Track(int track){	char tk_string[255];	sprintf(tk_string, "play cdaudio from %i to %i", track, track+1);	mciSendString(tk_string,NULL,NULL,NULL);} // Stop a trackvoid Stop_Track(void){	mciSendString("stop cdaudio",NULL,NULL,NULL);} // Shut down cd audio stuff...void Release_CD(void){	mciSendString("stop cdaudio",NULL,NULL,NULL);	mciSendString("close cdaudio",NULL,NULL,NULL);}   





Digital Radiation</html>
Somewhere on one of the other posts, someone mentioned the FMOD API. I have this and it is very simple to use, and it handles all of this, mp3, wav, and cd Audio Streaming. Take a look for it.

Kevin =)
-----------------------------kevin@mayday-anime.comhttp://www.mayday-anime.com
hey, that''s a pretty cool there trick over theres.. hee hee =) that was fun. is that what they use to run cds for ingame play?

a2k
------------------General Equation, this is Private Function reporting for duty, sir!a2k

This topic is closed to new replies.

Advertisement