• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 685
  • Last Modified:

record 16bit wave from microphone

Hello,

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.

Thanks
0
Kunfufaresi
Asked:
Kunfufaresi
  • 2
1 Solution
 
bernaniCommented:
Hi,

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
      simonet@bhnet.com.br
      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
http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20246916.html


You can also have a look at:
http://www.efg2.com/Lab/Library/Delphi/Graphics/Multimedia.htm
 

0
 
bernaniCommented:
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 ?
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now