Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Recording and saving wave with microphone

yarnisoyarniso Member Posts: 1
Hello there,

I'm trying to make a simple application that has to record sound from a microphone and then save it to an .wav-file (16bit, mono, 8000Hz)

Recording works fine. I use the waveIn..... routines from microsoft.
This gives me a buffer with all the audio-data. When I play this with the waveOut.... routines, I hear everything. No problems there.

I know how to make the correct header for a wave-file (for the format described above), so there is no problem there. My problem is the data-chunck. When I copy my buffer from the waveIn... routines to the data-chunck, it won't work. When I transform the buffer into little-endian format, it won't work. To keep things short, it just won't work. All I get is a lot of noise. Even when I save the buffer to a file and try to play it again, it just produces a lot of noise.

Is there anyone who can explain to me what I should do, or what I'm doing wrong? Or are there examples that use the waveIn... routines and then save the data to a .wav-file?

Thanx, Bart


  • Chris BrownChris Brown USAMember Posts: 4,624 ✭✭

    < /> free video tutorials and ebooks about [ C++, R, PHP, Python, Swift, Java, C#, Ruby, Visual Basic, C, Visual Basic .NET, PL/SQL, Delphi, Scratch, Perl, Objective-C, MATLAB, Go, JavaScript, Assembly Scala, Logo, Prolog, FoxPro, Lisp, Rust, Kotlin, Alice, Hack, Scheme, COBOL, F#, SAS, Bash, Crystal, VBScript, Ada, D, Julia, Transact-SQL, Clojure, Erlang, Apex, Fortran, Awk, Lua, ABAP, Dart, ML, LabVIEW ] __

Sign In or Register to comment.