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. PCM

PCM

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
4 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.
  • V Offline
    V Offline
    viliam
    wrote on last edited by
    #1

    hi, i am looking for way how to enumerate formats for recording from sound card. I know how to show dialog with it, but I have no idea how to do it without dialog and also how to specify which card (if i had more than one) Thank you

    viliam

    M 1 Reply Last reply
    0
    • V viliam

      hi, i am looking for way how to enumerate formats for recording from sound card. I know how to show dialog with it, but I have no idea how to do it without dialog and also how to specify which card (if i had more than one) Thank you

      viliam

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      Using DirectSound or Windows Multimedia APIs?

      V 1 Reply Last reply
      0
      • M Mark Salsbery

        Using DirectSound or Windows Multimedia APIs?

        V Offline
        V Offline
        viliam
        wrote on last edited by
        #3

        thank you, I can use any of them. Any solution would be good. (I am already using both - but mostly Direct)

        viliam

        M 1 Reply Last reply
        0
        • V viliam

          thank you, I can use any of them. Any solution would be good. (I am already using both - but mostly Direct)

          viliam

          M Offline
          M Offline
          Mark Salsbery
          wrote on last edited by
          #4

          For DirectSound, the IDirectSoundCapture8::GetCaps() will give you the standard supported formats. The DSCCAPS struct dwFormats member will contain bit flags indicating supported formats. You can mask them out with the following defines: WAVE_FORMAT_1M08 /* 11.025 kHz, Mono, 8-bit */ WAVE_FORMAT_1S08 /* 11.025 kHz, Stereo, 8-bit */ WAVE_FORMAT_1M16 /* 11.025 kHz, Mono, 16-bit */ WAVE_FORMAT_1S16 /* 11.025 kHz, Stereo, 16-bit */ WAVE_FORMAT_2M08 /* 22.05 kHz, Mono, 8-bit */ WAVE_FORMAT_2S08 /* 22.05 kHz, Stereo, 8-bit */ WAVE_FORMAT_2M16 /* 22.05 kHz, Mono, 16-bit */ WAVE_FORMAT_2S16 /* 22.05 kHz, Stereo, 16-bit */ WAVE_FORMAT_4M08 /* 44.1 kHz, Mono, 8-bit */ WAVE_FORMAT_4S08 /* 44.1 kHz, Stereo, 8-bit */ WAVE_FORMAT_4M16 /* 44.1 kHz, Mono, 16-bit */ WAVE_FORMAT_4S16 /* 44.1 kHz, Stereo, 16-bit */ WAVE_FORMAT_44M08 /* 44.1 kHz, Mono, 8-bit */ WAVE_FORMAT_44S08 /* 44.1 kHz, Stereo, 8-bit */ WAVE_FORMAT_44M16 /* 44.1 kHz, Mono, 16-bit */ WAVE_FORMAT_44S16 /* 44.1 kHz, Stereo, 16-bit */ WAVE_FORMAT_48M08 /* 48 kHz, Mono, 8-bit */ WAVE_FORMAT_48S08 /* 48 kHz, Stereo, 8-bit */ WAVE_FORMAT_48M16 /* 48 kHz, Mono, 16-bit */ WAVE_FORMAT_48S16 /* 48 kHz, Stereo, 16-bit */ WAVE_FORMAT_96M08 /* 96 kHz, Mono, 8-bit */ WAVE_FORMAT_96S08 /* 96 kHz, Stereo, 8-bit */ WAVE_FORMAT_96M16 /* 96 kHz, Mono, 16-bit */ WAVE_FORMAT_96S16 /* 96 kHz, Stereo, 16-bit */ For non-standard or non-PCM formats you can try creating a capture buffer and see if it succeeds. IDirectSoundCapture8::CreateCaptureBuffer() returns DSERR_BADFORMAT if it fails. Mark

          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