|
-
Feb 16th, 2000, 02:36 AM
#1
Thread Starter
Hyperactive Member
-
Feb 16th, 2000, 09:42 AM
#2
Hyperactive Member
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
-
Feb 17th, 2000, 12:42 PM
#3
Thread Starter
Hyperactive Member
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.
-
Feb 17th, 2000, 01:02 PM
#4
Hyperactive Member
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
-
Feb 17th, 2000, 02:01 PM
#5
Thread Starter
Hyperactive Member
Gees, I didn't notice that!
Thanks a lot!
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
|