Advertisement

Redbook audio

Started by July 10, 2000 07:53 PM
4 comments, last by gdlchris 24 years, 5 months ago
How do I play redbook audio in a windows/directX game?
Redbook audio is the regular "Audio" CD format you buy music on.

(I''m assuming you''re developing under Windows; if not, then this may not help much.)

To play music CD''s, try using the Windows Media Control Interface. Here is a link to a sample program in Visual Basic. If you''re into C++, you can get to the same functionality with the MMCONTROL.

http://msdn.microsoft.com/library/default.asp?URL=/library/devprods/vs6/vbasic/vbcon98/vbconusingmultimediamcicontrol.htm

If you''re using Visual C++ or equiv, here''s the top of the MCI reference pages at MSDN. Click the "Show TOC" at the top to expand the view to include the table of contents.

http://msdn.microsoft.com/library/psdk/multimed/mci_7vvt.htm

Hope that helps..

// CHRIS


// CHRIS [win32mfc]
Advertisement
Thanks,
I am using C++. I tried the example from the Microsoft site. ( http://msdn.microsoft.com/library/psdk/multimed/mci_45d7.htm ) It seems to start up the CD drive but I do not hear any music. The CD player program in windows plays CD fine. I was wondering if there was another call I need to make to tell the cound card to listen to the CD player or set the volume.

Thanks again
Chris
Well here are a set of very simple functions i wrote to play a cd through the windows mci(media control interface). Almost all of the code is just sending strings to the interface.

        // Tell MCI to start up the cd audiovoid Open_CDAudio(void){	mciSendString("open cdaudio",NULL,NULL,NULL);	mciSendString("set cdaudio time format tmsf",NULL,NULL,NULL);}//Plays a 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);} //Stops playing the current trackvoid Stop_Track(void){	mciSendString("stop cdaudio",NULL,NULL,NULL);} //Call at end of app to tell MCI to close cd audiovoid Release_CD(void){	mciSendString("stop cdaudio",NULL,NULL,NULL);	mciSendString("close cdaudio",NULL,NULL,NULL);}         



BTW, for the above code to work you have to link to winmm.lib and include mmsystem.h

+AA_970+

Edited by - +AA_970+ on July 11, 2000 4:57:25 PM
Thank you very much! That is much easier than what I was trying.

FMOD has a good Redbook Audio support, too.

- - - - - - - - - - - - - -
Andreas Mähler
Wolf359 Interactive

This topic is closed to new replies.

Advertisement