|
-
Jan 29th, 2000, 08:57 AM
#1
Thread Starter
Hyperactive Member
Is there a way to have lets say a background .wav file playing then when something happens another .wav file plays but the background music keeps playing so you have the background music playing and another at the same time and you can hear them both? thanks a lot!!
------------------
Sincerely,
Chris
:-) ;-)
just have fun out there and live life to the fullest while it is still here
Email [email protected]
-
Jan 29th, 2000, 09:20 AM
#2
Hyperactive Member
La dee da, put this where it goes, you know the drill.
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Const SND_SYNC = &H0
Const SND_ASYNC = &H1
Const SND_NODEFAULT = &H2
Const SND_LOOP = &H8
Const SND_NOSTOP = &H10
and this in it's correct place:
wFlags = SND_SYNC Or SND_NODEFAULT
x1 = sndPlaySound("Your file, wFlags)
x2 = sndPlaySound("Your file, wFlags)
and that should be it. you don't need all the constants and they are pretty self explanatory as to what they do. BTW, Synchronous means at the same time (syn=same chron=time) asynchronous means it suspends the program until it's done playing the sound. Hope it works.
bob
-
Jan 29th, 2000, 11:27 AM
#3
Frenzied Member
I get an error on this:
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Const SND_SYNC = &H0
Const SND_ASYNC = &H1
Const SND_NODEFAULT = &H2
Const SND_LOOP = &H8
Const SND_NOSTOP = &H10
then I get, sndplaysound "argument not optional"
------------------
Steve Mack
----------
Teenage Programmer
Email: [email protected]
-
Apr 11th, 2002, 12:57 PM
#4
Hyperactive Member
Anyone know how to make this work? I'm new to sound and need a hand.
-
Apr 19th, 2002, 10:57 AM
#5
Fanatic Member
you have an underscore "_" in a single line declare...
try taking it out 
HIH,
/: Tim :\____________________
\: VB, HTML, ASP, VBScript, QBASIC, JavaScript :/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|