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. audio recording

audio recording

Scheduled Pinned Locked Moved C / C++ / MFC
help
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.
  • K Offline
    K Offline
    kadkir
    wrote on last edited by
    #1

    My requirement is to record a voice file from a web apllocation in the following format.., "PCM 8kHz, 16 bit, mono" 1) I imported the winmm.dll DLLImport("winmm.dll", Entrypint:="mciExecute", charset:=charse,ansi, set last error:=true, Exact spelling:=true) private shared function mciExecute(byVal lpStrCommand as string) as boolean end function 2) opened the audio device mciExecute("open new Type waveaudio recSound") 3) setting the format of voice file mciExecute("set recsoud time format ms bitspersample 16 channels 1 samplespersec 8000") ----> after executing this last statement, I faced the following error "The specified parameter is out of range for the specified command". I am able to record voice file at 11.25 khz fq, and even at higher fq. with the same above mentioned steps. is there any other way to meet my requirement, for the last 10days I was browsig, no where I found proper solution, thank u all, with regards, kiran

    M D 2 Replies Last reply
    0
    • K kadkir

      My requirement is to record a voice file from a web apllocation in the following format.., "PCM 8kHz, 16 bit, mono" 1) I imported the winmm.dll DLLImport("winmm.dll", Entrypint:="mciExecute", charset:=charse,ansi, set last error:=true, Exact spelling:=true) private shared function mciExecute(byVal lpStrCommand as string) as boolean end function 2) opened the audio device mciExecute("open new Type waveaudio recSound") 3) setting the format of voice file mciExecute("set recsoud time format ms bitspersample 16 channels 1 samplespersec 8000") ----> after executing this last statement, I faced the following error "The specified parameter is out of range for the specified command". I am able to record voice file at 11.25 khz fq, and even at higher fq. with the same above mentioned steps. is there any other way to meet my requirement, for the last 10days I was browsig, no where I found proper solution, thank u all, with regards, kiran

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

      I haven't used MCI in a looong time, but are you sure all your strings are right? mciExecute("open new type waveaudio alias recSound") mciExecute("set recSound time format milliseconds bitspersample 16 channels 1 samplespersec 8000")

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      1 Reply Last reply
      0
      • K kadkir

        My requirement is to record a voice file from a web apllocation in the following format.., "PCM 8kHz, 16 bit, mono" 1) I imported the winmm.dll DLLImport("winmm.dll", Entrypint:="mciExecute", charset:=charse,ansi, set last error:=true, Exact spelling:=true) private shared function mciExecute(byVal lpStrCommand as string) as boolean end function 2) opened the audio device mciExecute("open new Type waveaudio recSound") 3) setting the format of voice file mciExecute("set recsoud time format ms bitspersample 16 channels 1 samplespersec 8000") ----> after executing this last statement, I faced the following error "The specified parameter is out of range for the specified command". I am able to record voice file at 11.25 khz fq, and even at higher fq. with the same above mentioned steps. is there any other way to meet my requirement, for the last 10days I was browsig, no where I found proper solution, thank u all, with regards, kiran

        D Offline
        D Offline
        dtr1
        wrote on last edited by
        #3

        VB code ?

        K 1 Reply Last reply
        0
        • D dtr1

          VB code ?

          K Offline
          K Offline
          kadkir
          wrote on last edited by
          #4

          Actually, I am able to save my voice file in 11.25kHz fq, and above fqs just by changing the set parameter values. It works fine. But I need to save it in 8000 hz format. Yes I am using these statements in VBScript.

          D 1 Reply Last reply
          0
          • K kadkir

            Actually, I am able to save my voice file in 11.25kHz fq, and above fqs just by changing the set parameter values. It works fine. But I need to save it in 8000 hz format. Yes I am using these statements in VBScript.

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

            Was not really a question. I try to suggest why not answers: it is a c++ forum

            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