-
Hello,
I know I've asked this before, but I thought I'd try it one more time before I give up:
Is there a way to play .wav files simulatneously without DirectX?
Also, can someone give me a list of how to do all of the different smilies? :) ;) :(
Thanks a lot.
-
1. Look around this site. I've answered it at least twice before. It has to do with SND_ASYNC and SND_SYNC constants in the flags part of the SndPlaySound API. It's here somewhere.
2. http://www.vb-world.net/ubb/smilies.html
bob
-
Ok, thanks, I'll have a look. Here's what I'm using now to play a single file:
Code:
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
(THose were the declarations. Here's the code to play a file:
Code:
SoundFile$ = "c:\Windows\test.wav"
wFlags% = SND_ASYNC Or SND_NODEFAULT
x% = sndPlaySound(SoundFile$, wFlags%)
It would be cool if someone could make an ActiveX control to play wav files at the same time, choose when to stop them, etc.
Thanks.
-
Don't you hate it when the problem is one letter? Try removing the Letter A from SND_ASYNC so you get SND_SYNC. In English, that changes it from asynchronous (different times) to synchronous (same time). (I love latin) Anyway, with that flag changed, you can have a bunch of sndPlaySounds running at the same time (Synchronously).
bob
-
Gees, I didn't notice that!
Thanks a lot!