We help IT Professionals succeed at work.

record 16bit wave from microphone

Kunfufaresi asked
Medium Priority
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.

Watch Question


I've got in my archives (from undu.com - 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
      http://www.bhnet.com.br/~simonet   //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 http://www.delphipages.com/threads/thread.cfm?ID=24980&G=24936
"How to create/save a Wave file
Example application coded in Delphi 2 with full source
http://www.bhnet.com.br/~simonet/archive/waverec.zip  // 2006 : dead.

and was also mentionned in

You can also have a look at:

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Have you checked http://www.efg2.com/Lab/Library/Delphi/Graphics/Multimedia.htm

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

No answer ?
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.