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. Play two audio file in different different Left Right speaker

Play two audio file in different different Left Right speaker

Scheduled Pinned Locked Moved C / C++ / MFC
6 Posts 3 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.
  • S Offline
    S Offline
    Shivanand Gupta
    wrote on last edited by
    #1

    hi i want to play two sound file same time and want to listen the sound of these file on separtly on left and right speaker,means sound of one file should play on left speaker and second file should play on right speaker

    K M 2 Replies Last reply
    0
    • S Shivanand Gupta

      hi i want to play two sound file same time and want to listen the sound of these file on separtly on left and right speaker,means sound of one file should play on left speaker and second file should play on right speaker

      K Offline
      K Offline
      KarstenK
      wrote on last edited by
      #2

      this is a nice and simple task: you only got to combine to wave files in a new stereo file. For further information you can consult: https://ccrma.stanford.edu/courses/422/projects/WaveFormat/[^]

      Press F1 for help or google it. Greetings from Germany

      S 1 Reply Last reply
      0
      • K KarstenK

        this is a nice and simple task: you only got to combine to wave files in a new stereo file. For further information you can consult: https://ccrma.stanford.edu/courses/422/projects/WaveFormat/[^]

        Press F1 for help or google it. Greetings from Germany

        S Offline
        S Offline
        Shivanand Gupta
        wrote on last edited by
        #3

        Thanks for giving reply I have no idea to handle this problem. I need sample code if is possiable.i think direct sound is the solution but not having correct API.

        M 1 Reply Last reply
        0
        • S Shivanand Gupta

          hi i want to play two sound file same time and want to listen the sound of these file on separtly on left and right speaker,means sound of one file should play on left speaker and second file should play on right speaker

          M Offline
          M Offline
          molesworth
          wrote on last edited by
          #4

          If you want to do this programmatically, it's fairly straightforward as well. The actual method will depend on which audio API you're using. e.g. in DirectSound there's a "SetPan" method which can pan a buffer between left and right. So just load and play the two sounds, and set one to fully left pan, and the other to fully right.

          There are three kinds of people in the world - those who can count and those who can't...

          1 Reply Last reply
          0
          • S Shivanand Gupta

            Thanks for giving reply I have no idea to handle this problem. I need sample code if is possiable.i think direct sound is the solution but not having correct API.

            M Offline
            M Offline
            molesworth
            wrote on last edited by
            #5

            You can download the Direct X SDK from Microsoft, as well as a lot of useful information about it from here. It's fairly easy to use, and comes with plenty of sample code to get you started.

            There are three kinds of people in the world - those who can count and those who can't...

            S 1 Reply Last reply
            0
            • M molesworth

              You can download the Direct X SDK from Microsoft, as well as a lot of useful information about it from here. It's fairly easy to use, and comes with plenty of sample code to get you started.

              There are three kinds of people in the world - those who can count and those who can't...

              S Offline
              S Offline
              Shivanand Gupta
              wrote on last edited by
              #6

              Thank you so much,

              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