Solved

playing wavefiles simultaneusly

Posted on 1998-08-15
8
148 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
  • 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
I need help formating a date variable in my VB.Net application 2 51
using Access 8 68
RUNRMTCMD from AS/400 12 43
VBA - If Bookmark = "XXBOOKMARKXX" then 15 23
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

813 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now