Results 1 to 5 of 5

Thread: Playing sounds simultaneously

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    New Jersey
    Posts
    334

    Post

    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.

  2. #2
    Hyperactive Member
    Join Date
    Sep 1999
    Posts
    305

    Post

    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

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    New Jersey
    Posts
    334

    Post

    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.

  4. #4
    Hyperactive Member
    Join Date
    Sep 1999
    Posts
    305

    Post

    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

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    New Jersey
    Posts
    334

    Post

    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
  •  



Click Here to Expand Forum to Full Width