Solved

playing wavefiles simultaneusly

Posted on 1998-08-15
8
145 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
Comment Utility
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
Comment Utility
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
Comment Utility
Well it worked on my PC.

I used just one MMControl as you see from my peice of code.
Sorry.
0
 

Author Comment

by:afonso
Comment Utility
See the comments above.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 3

Accepted Solution

by:
CesarGon earned 100 total points
Comment Utility
Use the PlaySound API function.

Regards,
César.

0
 

Author Comment

by:afonso
Comment Utility
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
Comment Utility
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
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
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 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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

772 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

9 Experts available now in Live!

Get 1:1 Help Now