473,765 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Vb6 Sounds

H
Hi Guys,

I am using the PlaySound to play .wav files in my application. Eg.

a = PlaySound(App.P ath & chip_sound, SND_ASYNC)

Is it possible to play two sounds at the same time? Everytime the 2nd sound
is started the first sound is automatically stopped..

Thanks!
Jul 17 '05 #1
1 3876
In a word, no. The function can stop currently playing sounds to play the
sound you specify, or it can check if there's already a sound playing, and
if it is, not play the new sound. Search on microsoft.com for PlaySound for
a full explanation of the flags.

I haven't actually got round to adding any sounds to my games yet... but I
plan to! The first place I'd look for this sort of task is game programming
sites. Maybe you could consider using DirectSound?? Depending on the scope
of your application, obviously.
_______________ _______________ _____
The Grim Reaper

"H" <H@opijpoijpoij .com> wrote in message
news:X9******** ************@ka roo.co.uk...
Hi Guys,

I am using the PlaySound to play .wav files in my application. Eg.

a = PlaySound(App.P ath & chip_sound, SND_ASYNC)

Is it possible to play two sounds at the same time? Everytime the 2nd sound is started the first sound is automatically stopped..

Thanks!

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
9342
by: Kiteman \(Canada\) | last post by:
Instead of a beep sound playing as an alarm or reminder I would like to be able to play a more interesting sound. On the web, I found and tried a sound routine that uses the SOUND.DRV but it does not work for me. Maybe it would be best to try to play a small mp3 or wav file instead - does VB 6.0 have built-in support for sounds like that? Tom
6
3211
by: BlackHawke | last post by:
Hello! In our game package (www.andromedaonline.net) we are having problems with sounds. We have placed them in a jar file, and are trying to access them from there. The jar file has a directory structure. A number of sounds have the same name, but are in a different directory (for example, our game has 5 races. Each race has the same set of sounds- button clicks, etc, but the actual sound is different).
1
4674
by: Knocked Wood | last post by:
Hi, I looked around and can't find anything on this at all and can not get it to work for IE. I'm trying to loop multiple sounds on a game, with three unique variables, when a link is clicked. Something like... <Script Language="JavaScript"> <!-- function playSound(soundName, loops, timeLength){
3
1267
by: Lee David | last post by:
Where can I find some 1) sounds such as a "boing" or "click", 2) what tags do I use and 3) are there examples of triggering a sound such as 1) button clicked and 2) when a time interval has passed? TIA, Lee
6
2332
by: Jimnbigd | last post by:
I want to write a game, and sounds will really add to it. Note that I would always make the sounds optional. I hate it when I go to a URL and unexpectedly get sounds or music. I have played with bgsound in IE, and found I can have simultaneous sounds using multiple bgsound tags. I have done a google search, and the only results I found were for "multiple sounds", and all of these really meant "consecutive sounds" -- one sound...
1
1462
by: ilPostino | last post by:
Does anyone know how to play system sounds? Or to install your own sounds and then call them from the application? C
1
3745
by: Terry Olsen | last post by:
Using the following routine to play embedded wav files: Private Sub PlaySound(ByVal Sound As Int32) Select Case Sound Case 1 : My.Computer.Audio.Play(My.Resources.Sounds.GoOnline, AudioPlayMode.Background) Case 2 : My.Computer.Audio.Play(My.Resources.Sounds.DoorOpen, AudioPlayMode.Background) Case 3 : My.Computer.Audio.Play(My.Resources.Sounds.DoorSlam, AudioPlayMode.Background)
10
26208
ADezii
by: ADezii | last post by:
Most Access Users fail to realize that they can significantly enhance their applications by introducing various sounds (*.WAVs) in response to specific events. The only intrinsic sound that Access can generate is the DoCmd.Beep which is hardly worth the time to mention. You can incorporate sound functionality into your Access applications via a single call to a relatively simple API Function. A couple of arguments to the Function dictate where...
1
1524
by: michels287 | last post by:
Hello... Currently I have an array of 8 listboxes in VB6. Each item in my listbox plays a wav sound from a large file on my desktop called "Sounds". I am using the sndPlaySound API. The code I have to link everything up is: Private Sub List1_Click(Index As Integer) Const sSoundFolder = "C:\Users\Chris\Desktop\Sounds\"
0
9398
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9951
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9832
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7378
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5275
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5421
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3531
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2805
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.