Solved

playing wavefiles simultaneusly

Posted on 1998-08-15
8
152 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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

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…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
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…

695 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