How to handle microphone input in real time?

I am starting to create a proof of concept for my idea, and at this stage I need to be guided by how I should start.

I need to try the microphone input and process this signal in real time (I think Auto-Tune, but work live), as opposed to “recording” for a while.

What I'm doing is a “kind of” “mic input to MIDI converter”, so it needs to respond pretty quickly.

I learned a bit online, and, apparently, the way is either DirectSound or WaveIn * API functions. Now, according to what I read, the WaveIn API will allow me to fill a buffer of a certain size, which is suitable for recording and subsequent processing, but I wonder ... How do I process in real time?

Do I use 10 ms buffers and save a circular array of 50 ms or 100 ms and I get a function that starts the analysis every 10 ms? (which has access to the last 100 ms of input, of which only 10 ms are new)

Did I miss something?

Also, how is this done with DirectSound? Does it provide any enhanced features compared to regular Win32 APIs?

+3
source share
2 answers

DirectSound, Wave API , , . , 10 . , 10 , , . 5 .

, DirectSound , DirectSound, Wave API WAVEHDR, , . API, . , , .

DirectSound API Wave - , , .

, , . , , () .

API, . ASIO, Kernel Streaming ( XP - ) , Vista, API.

+8

( ) ++, .

+1

Source: https://habr.com/ru/post/1699047/


All Articles