Solved

playing wavefiles simultaneusly

Posted on 1998-08-15
8
151 Views
Last Modified: 2010-04-30
How can I play a "click" wavefile without disturbing the music background?  
It is possible in VB?
0
Comment
Question by:afonso
[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
  • 2
  • 2
8 Comments
 
LVL 1

Expert Comment

by:BabyFace
ID: 1468939
Hi,
using the Microsoft MMControl you can open multiwave and
play them simultanously.
Ex:
MMControl1.DeviceType = "WaveAudio"
MMControl1.filename = App.Path + "\" + "wave1.wav"
MMControl1.Command = "Open"
MMControl1.Command = "Play"

MMControl1.filename = App.Path + "\" + "wave2.wav"
MMControl1.Command = "Open"
MMControl1.Command = "Play"

Hope this helps

0
 

Author Comment

by:afonso
ID: 1468940
Sorry, my friend, but it did't work
I'm using VB5 enterprise edition, and in the 'help' and in the manual, it is very clear that it's impossible to change the filename property of a MMControl with the device open. I tried, anyway, and it didn't work.
I tried too, with two MMControls, but the second control refuses to open the device.
I've heard about a WAVEMIX.DLL library, and downloaded it from the WEB,but it did'nt work. I seached the WEB for hours, trying to find a 32 bit version and could only find a name. "WAVMIX32.DLL", but not available for download or even sale.
I'm using a Sound Blaster AWE32 card, on a Pentium 200 MMX with 64 RAM, and trying do write a simple Multimidia program, with a wave music playing in the background (in a loop), and I would like to play a Click when any button is pressed without interfering the background music, as we can see in any simple computer game. But the task appears to be beyond my limited skills.

Thank you

Afonso
0
 
LVL 1

Expert Comment

by:BabyFace
ID: 1468941
Well it worked on my PC.

I used just one MMControl as you see from my peice of code.
Sorry.
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!

 

Author Comment

by:afonso
ID: 1468942
See the comments above.
0
 
LVL 3

Accepted Solution

by:
CesarGon earned 100 total points
ID: 1468943
Use the PlaySound API function.

Regards,
César.

0
 

Author Comment

by:afonso
ID: 1468944
Hi, César (something tells me that you speak portuguese or at least spanish)

It didn't work. The API PlaySound and sndPlaySound cannot play sounds simultaneously, no matter the flags you use. I checked in the Microsoft site, and in the support area I found an article that confirms it.

BUT I FOUND THE ANSWER. And the answer is......

DIRECT SOUND

But to learn how to write a code to play sounds using the DirectX technology don't appears to me being a easy task. So I purchased a special OCX custom control from TEGO corporation, that worked fine. Now my World-Cup-France-98 database program is soundig professionally.

Thank you, anyway

Afonso

0
 

Author Comment

by:afonso
ID: 1468945
Hi, César (something tells me that you speak portuguese or at least spanish)

It didn't work. The API PlaySound and sndPlaySound cannot play sounds simultaneously, no matter the flags you use. I checked in the Microsoft site, and in the support area I found an article that confirms it.

BUT I FOUND THE ANSWER. And the answer is......

DIRECT SOUND

But to learn how to write a code to play sounds using the DirectX technology don't appears to me being a easy task. So I purchased a special OCX custom control from TEGO corporation, that worked fine. Now my World-Cup-France-98 database program is soundig professionally.

Thank you, anyway

Afonso

0
 
LVL 3

Expert Comment

by:CesarGon
ID: 1468946
Hi Afonso. I speak Spanish and Galego, which is quite close to portuguese. Congratulations you have found the answer.

Regards,
César.
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

739 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