T
T
tex6202018-01-13 14:04:37
C++ / C#
tex620, 2018-01-13 14:04:37

How are sounds digitally recorded?

There is this code:

static WasapiLoopbackCapture wi;
        static void Main(string[] args)
        {
            wi = new WasapiLoopbackCapture();
            wi.DataAvailable += new EventHandler<WaveInEventArgs>(wi_DataAvailable);
            wi.StartRecording();
        }


       static void wi_DataAvailable(object sender, WaveInEventArgs e)
        {
            byte[] bytes = e.Buffer;


        }

I want to decompose into frequencies and for this you need to have a list of amplitudes to decompose through the Fourier
But I can’t find how the amplitudes are written in e.Buffer:
someone writes that every 2 bytes is 1 point on the amplitude graph, someone says that this is for gray - 1 left 2 right.
Tell me how the amplitudes are written there and how to get them for further use in the Fourier transform.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
asdz, 2018-01-13
@asdz

A ready
-made example that does what you need

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question