ACC2000 - Audio CD mciSendString API no sound

  • Thread starter Thread starter Tony_VBACoder
  • Start date Start date
T

Tony_VBACoder

Can anyone tell me why in Windows 2000 SP4, Access 2000
SP3, when I issue a call to the mciSendString API to play
a Audio CD, the only sound I get is from my headphones?
If I play the Audio CD with Windows Media player, I get
sound from my speakers. Why won't sound play out my
speakers when issuing a call to the API? What do I need
to do to have sound from my speakers?

My code is below:

Public Function StartPlay()
Dim lngRet As Long

lngRet = mciSendString("play cd", 0, 0, 0)

End Function
 
I solved it by adding the following line of code before I
called my StartPlay function:

lngRet = mciSendString("open D: type cdaudio alias cd wait
shareable", 0, 0, 0)
Call StartPlay()
 
Back
Top