Re: Recording from a microphone

From: Phil Taylor (phil_at_private-citizen.com)
Date: 12/13/04


Date: Mon, 13 Dec 2004 14:12:28 -0800

I think you misunderstand the API and what it is providing.

DSound capture allows you access to the capture side of the sound card to
capture audio from an input source, where the microphone is input into. not
from the output buffer.

the docs are pretty clear on this, eg

Microsoft® DirectSound® enables you to capture sounds from a microphone or
other input to the sound card, for immediate playback or storage in a file.
Data can be captured in Pulse Code Modulation (PCM) or compressed formats.

The Capture object is used to query the capabilities of sound capture
devices and to create buffers for capturing sound samples.

The CaptureBuffer object represents a buffer used for receiving data from
the input device. This buffer is conceptually circular: When input reaches
the end of the buffer, it automatically starts again at the beginning.

The methods of CaptureBuffer enable you to retrieve the properties of the
buffer, start and stop audio capture, and retrieve data. On operating
systems that support capture effects, it also provides methods for
retrieving effect objects and ascertaining the status of effects.

so its there. what are you seeing as a limitation?

check out FullDuplex in the C++ samples, it captures from the mic and plays
back thru the speakers.

"marc" <marc@discussions.microsoft.com> wrote in message
news:ABCEA8AE-72E5-4E97-B202-2A85B3142747@microsoft.com...
> How would you record from a microphone in C#?
> I can capture sound from the sound card output (CaptureSound sample in
> SDK)
> but not input to the card.
> Is this a limitation in the managed world?
>
> Thanks,
>
> Marcus
>