Quantcast
Channel: naudio Work Item Rss Feed
Viewing all articles
Browse latest Browse all 738

Created Unassigned: Microphone Data to FFT [16415]

$
0
0
I have a working FFT, I need to know how to get RAW data from my microphone in real time.

this is the code I have so far:
```
private NAudio.Wave.WaveIn sourceStream = null;
private NAudio.Wave.DirectSoundOut waveOUT = null;
NAudio.Wave.WaveFileWriter waveWriter = null;
NAudio.Wave.WaveInProvider waveIn = null;
void Voice()
{
Byte[] buffer = new Byte[10];
// sound from the Mic
int deviceNumber = 0;
sourceStream = new NAudio.Wave.WaveIn();
sourceStream.DeviceNumber = deviceNumber;
sourceStream.WaveFormat = new NAudio.Wave.WaveFormat(44100, NAudio.Wave.WaveIn.GetCapabilities(deviceNumber).Channels);
NAudio.Wave.WaveInProvider waveIn = new NAudio.Wave.WaveInProvider(sourceStream);
sourceStream.DataAvailable += new EventHandler<NAudio.Wave.WaveInEventArgs>(sourceStream_DataAvailable);
waveIn.Read(buffer, 0, 10);

```
is the raw data store in wavein.read?
how do I know how big the buffer is?
should I use a Tlist and not an array?
should I use
sourceStream.DataAvailable += new EventHandler<NAudio.Wave.WaveInEventArgs>?

when will this be done.. or when will there be DataAvaiable ?

Viewing all articles
Browse latest Browse all 738

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>