Article View: borland.public.cppbuilder.multimedia
Article #86Re: Playing Audio CD
From: Remy Lebeau (TeamB)
Date: Tue, 01 Nov 2005 23:28
Date: Tue, 01 Nov 2005 23:28
34 lines
2442 bytes
2442 bytes
"Stefano Bonifazi" <stefboombastic@libero.it> wrote in message news:4367e9aa@newsgroups.borland.com... > I need to play audio-cds from within my application. The problem > is that both TMediaPlayer and mci APIs seem to open always a > "default" CD-ROM drive, that is I cannot set the CD-ROM drive > in which the Audio cd is :-( TMediaPlayer does not support what you are looking for. The MCI API, on the other hand, has an MCI_OPEN_TYPE_ID flag available for the MCI_OPEN command. That flag will allow you to specify the index of the specific CD-ROM drive that you want to use. You can use the MCI_SYSINFO command to determine how many CD-ROM drives are available to MCI. If successful, the MCI_OPEN command returns the ID of the device, which you can then use to send other commands to that same device. > I'd need seek capabilities into the played track too There is an MCI_SEEK command available for that. Make sure to use the MCI_SET command after opening the CD-ROM drive to set the device's time format to MCI_FORMAT_TMSF (track/minute/second/frame). You can use the MCI_MAKE_TMSF() macro when specifying time stamps to the MCI_PLAY and MCI_SEEK commands. Use the MCI_TMSF_TRACK(), MCI_TMSF_MINUTE(), MCI_TMSF_SECOND(), and MCI_TMSF_FRAME() macros when retreiving the individual values from time stamps that you obtain. You can use the MCI_STATUS command to query information about the individual tracks, such as their lengths. Gambit
Technical Details
Message-ID:
<4367fa1f@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<4367e9aa@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10d0fc,b7a843302d134117 X-Google-Attributes: gid10d0fc,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.multimedia References: <4367e9aa@newsgroups.borland.com> Subject: Re: Playing Audio CD Date: Tue, 1 Nov 2005 15:28:30 -0800 Lines: 36 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <4367fa1f@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1130887711 68.69.17.41 (1 Nov 2005 15:28:31 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail