record 16bit wave from microphone

Posted on 2006-03-20
Last Modified: 2008-01-09

I've used recording components to record and disply sound as wave but i've not figured out how to record 16bit mono hz is not really an issue. If i get a list of bytes how should i convert them to 16bit integer or word data? i'm looking for this solution. If you can show code that opens mic for recording that would be very well also as the components i've tried sometimes crashes or locks up windows and i cant debug them.

Question by:Kunfufaresi
    LVL 9

    Accepted Solution


    I've got in my archives (from - don't exist anymore) a demo called waverec.dpr (compiles OK with D5 on XP).

    The readme.text of the demo says:

    From: Alex S. Abreu

   //2006 : link is dead.

    Ref.: Wave Sound Recorder
          PART I....... For Delphi Programmers
          PART II...... If you want only the executable
    PART I ... For Delphi Programmers
          The purpose for this Delphi 2.0 project is to implement wave recording management routines. The program allows you to record (and save to file) wave files that conforms to the PCM specification or you can create your own Wave file formats (for example: 8.0 kHz, instead or the standard 11.025, 22.050 and 44.100 kHz formats).
          The full source is included (and also a executable, case you don't have the Delphi compiler. The source is for Delphi 2.0, but with little changes it can be easily adapted to Delphi 1.0.
          Case this project comes in handy for you, send me a note, either asking for more, newer, better stuff, or simply saying thanks!

    PART II ... Running the Executable

          This interface may not be as intuitive as it was supposed to be, as what really matters in this program is its functionality. Well, I could spend a little more time developing a better inteface! All that you have to do is:
          1. Specify a filename
          2. Select a wave format (you can select a pre-defined sampling rate or, or if you prefer, specify your own, on the 'Sampling rate' edit Sound Quality box. Write a valid number, once no checking is done on the validity of the value on the edit box).
          3. Select how long the recording must be
          4. If you want, use the CD player (included) to start the CD
          5. Click on 'Start' to start the recording (The recording will stop automatically after the time length you set up is elapsed or you can click on 'Stop' to stop it before the elapsed time.)
          6. Use the top media player to hear your recording.

    That's it! It's not that fun, but can be of some educational help on using and managing sound files.

          This code was last updated on January 5th, 1997.

          Alex Simonetti Abreu
          Belo Horizonte, MG, Brazil

    If you believe this can help you, tell it. I can send you the demo (127k including the exe) by mail as I don't have the least idea if it's legal to paste the units here (main unit= 7k dfm= 6k dpr=1k). No mention of a copyright in the demo.

    The links always exists on
    "How to create/save a Wave file
    Example application coded in Delphi 2 with full source  // 2006 : dead.

    and was also mentionned in

    You can also have a look at:

    LVL 9

    Expert Comment

    Have you checked

    If you believe this can help you, tell it. I can send you the demo ...

    No answer ?

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Suggested Solutions

    Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
    In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
    This video discusses moving either the default database or any database to a new volume.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now