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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to play a .wav file?

How to play a .wav file?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
5 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.
  • A Offline
    A Offline
    Artem Moroz
    wrote on last edited by
    #1

    How to play a .wav file when the wave device is already opened by another DirectSound app? PlaySound or sndPlaySound don't work

    L 3 Replies Last reply
    0
    • A Artem Moroz

      How to play a .wav file when the wave device is already opened by another DirectSound app? PlaySound or sndPlaySound don't work

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      i am not sure but, u can try with "mciSendString" with Open Command and in Sharable mode

      L 1 Reply Last reply
      0
      • A Artem Moroz

        How to play a .wav file when the wave device is already opened by another DirectSound app? PlaySound or sndPlaySound don't work

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Use API function: PlaySound()

        1 Reply Last reply
        0
        • L Lost User

          i am not sure but, u can try with "mciSendString" with Open Command and in Sharable mode

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Hi guy, Please see the note: Note: from MSDN shareable::Initializes the device or file as shareable. Subsequent attempts to open the device or file fail unless you specify "shareable" in both the original and subsequent open commands. MCI returns an invalid device error if the device is already open and not shareable. The MCISEQ sequencer and MCIWAVE devices do not support shared files.

          1 Reply Last reply
          0
          • A Artem Moroz

            How to play a .wav file when the wave device is already opened by another DirectSound app? PlaySound or sndPlaySound don't work

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            Try to play your sound Synchronously(SND_SYNC) Shibu K.V.

            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