Results 1 to 5 of 5

Thread: two sounds at a time (real audio and wav)

  1. #1

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

    Post

    Hi!
    I've asked this question before, but got no reponse:
    Is there a way to play a real audio file (using the real audio activex control), while at the same time playing (and hearing) a WAV file. This is the code I used to play the WAV file:

    Declarations:
    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
    Code:
    Code:
    SoundFile$ = "c:\windows\example.wav"
    wFlags% = SND_ASYNC Or SND_NODEFAULT
    x% = sndPlaySound(SoundFile$, wFlags%)
    Please help! Thanks.


    ------------------
    Regards,
    Alexander McAndrew
    VB Zone
    http://vbzone.cjb.net



  2. #2
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923

    Post

    I think the only condition is if your sound hardware supports it. I have a SB AWE 64 which will only play 1 file at a time...I also have a Turtle Beach Montego II that plays as many as 64 files at a time.

    RealAudio uses the WAV output of your sound card, so if your hardware don't support multiple waves, it won't work!

    hope that helps,

    ------------------
    - Chris
    [email protected]
    If it ain't broke - don't fix it

  3. #3

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

    Post

    Thanks for the reply.
    Question: If what you told me is true, then how can major game publishers take care of that problem? I'm sure that they don't hope that the user's card supports multiple files at a time.
    Thanks.

    ------------------
    Regards,
    Alexander McAndrew
    VB Zone
    http://vbzone.cjb.net



  4. #4
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    North East America
    Posts
    463

    Post

    chrisjk Check again your Awe64 is a duplex sound card an will play more than one audio file at a time. I do MIDI and Audio recording and listen to more then 1 audio track at a time with my Awe 64.

    ------------------
    TMacPherson
    Customer Suport Software Analyst
    [email protected]


  5. #5
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923

    Post

    Andrew - Games publishers take care of this by using DirectX...it allows you to overlay sounds, producing only 1 sound for crap hardware (not being rude or anything). You'll have to integrate DirectX into your app (don't ask me how...i have no idea )
    Before DirectX existed, they developed their own method of overlaying sounds.

    Troy - Sorry, I meant my REALLY old computer (P120 sitting in the corner feeling sorry for itself). It has a SB16 that only plays 1 WAV at a time

    Regards,

    ------------------
    - Chris
    [email protected]
    If it ain't broke - don't fix it


    [This message has been edited by chrisjk (edited 01-25-2000).]

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