Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


playing multiple .wav files without using API

Posted on 1999-06-28
Medium Priority
Last Modified: 2009-12-16
playing multiple wavefiles after each other saved on hard without using API
wether using counter or timer or anything else but not APIs
Question by:twity
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 1520278
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.

Expert Comment

ID: 1520279
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.

Accepted Solution

Spax earned 40 total points
ID: 1520280
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


Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question