参考
          
'Author: Gordon F. MacLeod
' How to play a CD Audio disc via API 
' Declare the following API
Declare Function mciSendString& Lib "MMSYSTEM" (ByVal lpstrCommand$,
ByVal lpstrReturnStr As Any, ByVal wReturnLen%, ByVal hCallBack%)'Add the code below to appropriate routinesSub cmdPlay_Click ()
Dim lRet As Long
Dim nCurrentTrack As Integer'Open the device
lRet = mciSendString("open cdaudio alias cd wait", 0&, 0, 0)'Set the time format to Tracks (default is milliseconds)
lRet = mciSendString("set cd time format tmsf", 0&, 0, 0)'Then to play from the beginning
lRet = mciSendString("play cd", 0&, 0, 0)'Or to play from a specific track, say track 4
nCurrentTrack = 4
lRet = mciSendString("play cd from" & Str(nCurrentTrack), 0&, 0, 0)End Sub
 ' Remember to Close the device when ending playbackSub cmdStop_Click ()
Dim lRet As Long'Stop the playback
lRet = mciSendString("stop cd wait", 0&, 0, 0)DoEvents  'Let Windows process the event'Close the device
lRet = mciSendString("close cd", 0&, 0, 0)End Sub

解决方案 »

  1.   

    ' 把CD文件录成Wav文件
    #VBIDEUtils#************************************************************
    ' * Programmer Name  : Waty Thierry
    ' * Web Site         : www.geocities.com/ResearchTriangle/6311/
    ' * E-Mail           : [email protected]
    ' * Date             : 29/10/98
    ' * Time             : 14:31
    ' * Module Name      : Browse_Folder
    ' * Module Filename  : Browse_Folder.bas
    ' **********************************************************************
    ' * Comments         : Recording a CD to a Wave file
    ' *  This Function uses the multimedia control interface (MCI) To control the CD drive.
    ' **********************************************************************Public Sub RecordWave(TrackNum As Integer, Filename As String)
       ' Tracknum: track to record
       ' Filename: file to save wave as
       On Local Error Resume Next
       Dim i As Long, RS As String, cb As Long, t#
       RS = Space$(128)
       i = mciSendString("stop cdaudio", RS, 128, cb)
       i = mciSendString("close cdaudio", RS, 128, cb)
       Kill Filename
       RS = Space$(128)
       i = mciSendString("status cdaudio position track " & TrackNum, RS, 128, cb)
       i = mciSendString("open cdaudio", RS, 128, cb)
       i = mciSendString("set cdaudio time format milliseconds", RS, 128, cb)
       i = mciSendString("play cdaudio", RS, 128, cb)
       i = mciSendString("open new type waveaudio alias capture", RS, 128, cb)
       i = mciSendString("record capture", RS, 128, cb)
       
       t# = Timer + 1: Do Until Timer > t#: DoEvents: Loop
       
       i = mciSendString("save capture " & Filename, RS, 128, cb)
       i = mciSendString("stop cdaudio", RS, 128, cb)
       i = mciSendString("close cdaudio", RS, 128, cb)
       
    End Sub'The method Is quite easy:
    '
    '1) Stop everything In the CD drive
    '2) Start playing track
    '3) Record a New wave With the information from the CD (note: it also records MIDI And microphone sounds: In fact anything coming out of the speakers)
    '4) Save the wave file
    '5) Stop the CD again
      

  2.   

    那么有没有这样的OCX呢?我找到一些,但是都是要注册的。我没有注册码。请问各位朋友,你们有么?(最好是不要注册的,要注册的话,也最好知道注册码)
    能发给我一份么?我的E-mail: [email protected]谢谢各位了!谢谢!   我找到的OCX,大家就不用找了。如ACD。
    希望大家能帮帮我,分不够,我会另外给的。
      

  3.   

    大家可否帮我找一下有关CD文件的格式和CD存储格式的文章,我想看一下。谢谢!
      

  4.   

    我这有一个CD播放器的程序,包括源码,不用任何额外控件,不知对你有否帮助,假如要请留EMAIL
      

  5.   

    我找到一个源程序,不用任何控件,但我未测试过,请留EMAIL