Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to paly 2 *.WAV files at the same time?

How to paly 2 *.WAV files at the same time?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    julych
    wrote on last edited by
    #1

    I need to play two *.WAV files at the same time in my application - as in solitaire games - the first file is the background music and second sound file is played when the cards are moved (or similar events). Any idea how to do this? I'm trying with PlaySound() and a new thread, but nothing is happenning - maybe I can't set the flags properly or there is something else?

    R 1 Reply Last reply
    0
    • J julych

      I need to play two *.WAV files at the same time in my application - as in solitaire games - the first file is the background music and second sound file is played when the cards are moved (or similar events). Any idea how to do this? I'm trying with PlaySound() and a new thread, but nothing is happenning - maybe I can't set the flags properly or there is something else?

      R Offline
      R Offline
      Rickard Andersson20
      wrote on last edited by
      #2

      void StartPlayTwoSounds()
      {
      PlaySound("MyFirstSound.wav", NULL, SND_FILENAME | SND_ASYNC);
      PlaySound("MySecondSound.wav", NULL, SND_FILENAME | SND_ASYNC);
      }

      Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318

      J 1 Reply Last reply
      0
      • R Rickard Andersson20

        void StartPlayTwoSounds()
        {
        PlaySound("MyFirstSound.wav", NULL, SND_FILENAME | SND_ASYNC);
        PlaySound("MySecondSound.wav", NULL, SND_FILENAME | SND_ASYNC);
        }

        Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318

        J Offline
        J Offline
        julych
        wrote on last edited by
        #3

        It doesn't work man:-( In that order only second file is played, but not the first!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups