Results 1 to 3 of 3
  1. #1

    Thread Starter
    New Member
    Join Date
    May 2007
    South-East England

    Post How to play multiple sound effects?

    I am making a small game in VB6 and I need to know how to play multiple sound effects.

    Right now I am using...
    Private Declare Function sndPlaySound Lib "winmn.dll" Alias "sndPlaySoundA" _
    (ByVal ipszSoundName as String, ByVal uFlags As Long) As Long
    and triggering a sound with...
    sndPlaySound "soundfile.wav",1
    This code only allows me to play one sound at a time.
    I need to know how to play multiple sounds at once, at least five.


  2. #2
    Super Moderator Hack's Avatar
    Join Date
    Aug 2001
    Searching for mendhak

    Re: How to play multiple sound effects?

    VB is a single threaded development platform. You need it to multi-task beyond its capabilities.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    I dont answer coding questions via PM or EMail. Please post a thread in the appropriate forum section.

    Creating A Wizard In VB.NET
    Paging A Recordset
    What is wrong with using On Error Resume Next
    Good Article: Language Enhancements In Visual Basic 2010
    Upgrading VB6 Code To VB.NET
    Microsoft MVP 2005/2006/2007/2008/2009/2010/2011/2012/Defrocked

  3. #3
    Join Date
    Feb 2002
    Canada, Toronto

    Re: How to play multiple sound effects?

    You probably need to do this in DirectSound

    I did something simmilar in this thread:

    Look at the attachment in post #22

    Also, take a look at my sound tutorial (though not finished) to learn more.
    Last edited by CVMichael; May 29th, 2007 at 03:13 PM.

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

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.