On 2006-04-10,
<> wrote:
> Hi
> Can anyone tell me how I can stream audio input from a microphone input
> in C/C++? I would prefer plain C/C++, rather than DirectX/Windows
> programming, though those would be fine too.
It's not possible to actually get data from the microphone input without
using some OS specific APIs (i.e. something like DirectX/Windows
programming).
If you want to stream the data internally in your program because you're
processing it in some way (e.g. you're writing a mixer), then you can do
that in plain C or C++, probably by implementing some kind of "ring
buffer". But I'm not sure if that's really your question so I won't go
on.
> Also, how can i read/write wav files using file handles?
You have to find a doc somewhere about wav file format and then
construct the header and write out the data as the format dictates. It's
quite simple to make an uncompressed wav file, so this is feasible. Or
of course find a lib etc. that can do it for you.