Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access to sound buffer (Delphi MMsystem)

Status
Not open for further replies.

Amtrup

Programmer
Jan 3, 2006
3
DK
Dear sir

I have licence to a Delphi 5.0, where I two years ago have written a program to record sound from a mocrophone connected to the microphone plug in the sound unit (C-media wave device).

The program is using the Delphi MMsystem to capture sound to a sound buffer and then playing part of the the buffer. I want access to the buffer, so i can draw the sound wave on the screen.

My program was working with Windows 95 and 98; but now I have installed Windows XP, and no data are coming to the sound input buffer (BytesRecorded=0).

I have selected Microphone in Windows Recording Control and set recording level to maximum. What else can I do?

I can record sound with the Windows Media Player an with the Delphi MCI sound system; but that doesn't give me access to the sound buffer.

Could it be, that Delphi MMsystem (5.0) is not compatible to Windows XP (XP not backward compatible)? If so, what can I do?

Is there another way to get access to the sound buffer, so I can 'cut the ends off' and save the rest to a file? I too am saving the position of the sound in the the .wav file to another file.

By the way, Is it possible to save the waveform (compressed) to an MP3 file?

Kindest regards

Torben Amtrup
 
Hi friends

The problem is solved!

The error was, that a call to WaveInReset did not update the field dwBytesRecorded in the waveheader (as promised). The solution is to use the facility MMTime instead.

Greetings from Torben
 
Thanks for sharing what you learnt.

Clive
Runner_1Revised.gif

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer." (Paul Ehrlich)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top