Hello I'm doing a DetectPeakFrequency on my microphone input (or Default device -1).
I could do it with an mp3 but I need help with the input of the microphone:
That works for me with the mp3 file:
Visuals BassMiscVisuals = new Visuals();
float energie;
int freqs = new Int32();
int streamchannel;
private void button2_Click(object sender, EventArgs e)
{
if (Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero))
{
streamchannel = Bass.BASS_StreamCreateFile("tones.mp3", 0L, 0L, BASSFlag.BASS_DEFAULT);
Bass.BASS_ChannelPlay(streamchannel, false);
timer1.Start();
}
}
private void timer1_Tick(object sender, EventArgs e)
{
freqs = BassMiscVisuals.DetectPeakFrequency(streamchannel, out energie);
textBox1.Text = freqs.ToString();
}
What do i need to change to make it work with microphone input? I also cannot find any examples