Thread: 2 Sounds at the same time.

  1. #1
    0x01
    Join Date
    Sep 2001
    Posts
    88

    2 Sounds at the same time.

    k, to play "a" sound in a win32 console program, you would link the necessary .lib file and header file, then use the "PlaySound()" function.

    Lets say I wanted to play music and then a sound effect w/o the sound effect completely stopping the music.... is there a flag that can be added to PlaySound to do this??? Anything???

    Compiler: MSVC++ OS: Windows XP

  2. #2
    Registered User
    Join Date
    Feb 2003
    Posts
    162
    I would think that would be sound card dependent.....some sound cards (usually on-board), can only process one sound at a time....Having said that, I have no idea how to help you, just that you should keep that in mind

  3. #3
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    I also think you can only play one wave sound at once. You can play more than one MIDI sound at a time, depending on how many "voices" your sound card has. I assume that you can also play a wave file and MIDI sounds at the same time.

  4. #4
    Registered User
    Join Date
    Dec 2002
    Posts
    56
    I believe this ability is at least partly OS-dependent. I'm pretty sure (but not 100%) that I can play multiple sounds at once when in linux, but definitely not in windows98 (same machine, dual boot).

  5. #5
    Registered User
    Join Date
    Jan 2002
    Posts
    75
    Well Im not really sure how to do so...

    But you will notice on many games made for windows that the 'music' comes off the cd and the sounds are on your harddrive.

    Cd audio is seperate from usual Wave sound files.

    So I would assume that you could just burn whatever music you wanted going on in the background onto a cd. and have the program read that it.

    Ive never tried it but it sounds good

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 26
    Last Post: 07-05-2010, 10:43 AM
  2. Representing floats with color?
    By DrSnuggles in forum C++ Programming
    Replies: 113
    Last Post: 12-30-2008, 09:11 AM
  3. calculating user time and time elapsed
    By Neildadon in forum C++ Programming
    Replies: 0
    Last Post: 02-10-2003, 06:00 PM
  4. Is this really true or it's just science fiction?
    By Nutshell in forum A Brief History of Cprogramming.com
    Replies: 145
    Last Post: 04-09-2002, 06:17 PM
  5. time class
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 12-11-2001, 10:12 PM