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

x
?
Solved

vb3 multichannel wav support

Posted on 1997-06-21
8
Medium Priority
?
273 Views
Last Modified: 2006-11-17
I need to know if it's possible, and if so how can I play at least 2 wavs as the same time using VB3 standard 16-bit code/API calls?  If I can at least get 2 wavs to play at the same time I will be happy...  I know it can be done with other languages...but how bout in this case?  Please provide code if possible...
0
Comment
Question by:ChrisK
[X]
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
  • 4
  • 3
8 Comments
 
LVL 5

Expert Comment

by:y96andha
ID: 1427526
It can be done by mixing the two wav files yourself and then playing the resulting file.
0
 
LVL 2

Author Comment

by:ChrisK
ID: 1427527
That would defeat the purpose...and take up way too much hd space.
0
 
LVL 1

Accepted Solution

by:
lmarceau earned 100 total points
ID: 1427528
You can mix the two file yourself in memory in small chunks or look for Microsoft's WaveMix.dll which does it for you.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Author Comment

by:ChrisK
ID: 1427529
I'm gonna look for this dll, but if I don't find it, how would I mix 2 wavs in memory in vb3????  Is there some API calls or something that do it? (I DO NOT have MCI.VBX)
0
 
LVL 2

Author Comment

by:ChrisK
ID: 1427530
I'm gonna look for this dll, but if I don't find it, how would I mix 2 wavs in memory in vb3????  Is there some API calls or something that do it? (I DO NOT have MCI.VBX)
0
 
LVL 1

Expert Comment

by:lmarceau
ID: 1427531
Sure, look for the WaveOut familly of function.


(ps: Attend very short answer for 15pt)
0
 
LVL 2

Author Comment

by:ChrisK
ID: 1427532
ok, give me 100% working VB 3 16-bit code and 55 points are yours.
0
 
LVL 1

Expert Comment

by:lmarceau
ID: 1427533
Check for sound card driver with
  waveOutGetNumDevs
Get the capabilities of them all with
  waveOutGetDevCaps
If there is more than one ask the user which he wants to use
Open the selected devices at the selected format with
  waveOutOpen

Mix and write the data to memory using arrays

Prepare the data for playback with
  waveOutPrepareHeader
Send it to the device with
  waveOutWrite
Send another just after, it will be put in the queue.

In a loop with a DoEvents, Check for the WHDR_DONE flag in the WAVEHDR structure of the first buffer. This will in dicate that the first buffer has finished its playback.
At this time, you will clear the first array and use it to place and prepare a third data block and send it to the device.
Continue like this until all data had been played.

Allways check for error, if anything appends :
  waveOutGetErrorText
and show this error to the user and ask him want to do next

When you are done :
   waveOutClose

If you need the Windows 3.1 Multimedia reference, give me your email and I will send it to you. It is a 340k windows help file.

Tell me if you can't make it work. But tell me if you succeed too !

            --- Guim
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
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