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. Sound Please?!

Sound Please?!

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

    How to include a library (or something like that) that can play sound (wav)(but mp3 would be a lot cooler!)? I know that winmm can do something like that, but the linker bails out then.

    B A 2 Replies Last reply
    0
    • D DaFrawg

      How to include a library (or something like that) that can play sound (wav)(but mp3 would be a lot cooler!)? I know that winmm can do something like that, but the linker bails out then.

      B Offline
      B Offline
      basementman
      wrote on last edited by
      #2

      See the WIN32 API function PlaySound()  onwards and upwards...

      1 Reply Last reply
      0
      • D DaFrawg

        How to include a library (or something like that) that can play sound (wav)(but mp3 would be a lot cooler!)? I know that winmm can do something like that, but the linker bails out then.

        A Offline
        A Offline
        Alexander M
        wrote on last edited by
        #3

        do your homework alone please... you can do this yourself, it isn't that difficult! Don't try it, just do it! ;-)

        D 1 Reply Last reply
        0
        • A Alexander M

          do your homework alone please... you can do this yourself, it isn't that difficult! Don't try it, just do it! ;-)

          D Offline
          D Offline
          DaFrawg
          wrote on last edited by
          #4

          No I can't. I assume that PlaySound etc. is declared in , is that okay? Well, if it is and I build the thing (executable), the LINKER crashes, cuz there is no .lib file for that function. SO: Where the heck can I get it?!

          D 1 Reply Last reply
          0
          • D DaFrawg

            No I can't. I assume that PlaySound etc. is declared in , is that okay? Well, if it is and I build the thing (executable), the LINKER crashes, cuz there is no .lib file for that function. SO: Where the heck can I get it?!

            D Offline
            D Offline
            DaFrawg
            wrote on last edited by
            #5

            Okay, I found it. It's #pragma comment(lib, "winmm.lib")

            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