playing multiple .wav files without using API

playing multiple wavefiles after each other saved on hard without using API
wether using counter or timer or anything else but not APIs
twityAsked:
Who is Participating?
 
SpaxConnect With a Mentor Commented:
If your still looking for the OCX in question, try the MCI control.

As for playing one WAV after another, you can make use of this objects done event to load up your next wav and play it.

The below is from the MSDN Library Visual studio 6.0
Copyright 1995-1998 Microsoft Corporation, all rights reserved.

Examples (Multimedia MCI Control)
Visual Basic Example

The following example illustrates the procedure used to open an MCI device with a compatible data file. By placing this code in the Form_Load procedure, your application can use the Multimedia MCI control "as is" to play, record, and rewind the file Gong.wav. To try this example, first create a form with a Multimedia MCI control.

Private Sub Form_Load ()
   ' Set properties needed by MCI to open.
   MMControl1.Notify = FALSE
   MMControl1.Wait = TRUE
   MMControl1.Shareable = FALSE
   MMControl1.DeviceType = "WaveAudio"
   MMControl1.FileName = "C:\WINDOWS\MMDATA\GONG.WAV"

   ' Open the MCI WaveAudio device.
   MMControl1.Command = "Open"
End Sub

To properly manage multimedia resources, you should close those MCI devices that are open before exiting your application. You can place the following statement in the Form_Unload procedure to close an open MCI device before exiting from the form containing the Multimedia MCI control.

Private Sub Form_Unload (Cancel As Integer)
   MMControl1.Command = "Close"
End Sub


0
 
rayfordCommented:
Why may I ask do you not want to use the API calls to play sound files?  You will need to use an OCX control is possibly your best next solution to using the API.
0
 
Dreamn3dCommented:
hi, just adding a comment,
I agree with rayford, by not using the api you are severly limiting yourself and the power of programming with vb not to mention you will either have to write or pay for a ocx that accomplishes this.  It's quicker and easier just to use the api.
0
All Courses

From novice to tech pro — start learning today.