Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Microphone Recorder

Hey, I just made a microphone recorder and wanted to share it.

I needed microphone functionality for a project and after I made that I thought about making a recorder. I used the WinMM.Net dll to get data from the microphone. Your virus scanner would probably say the WinMM dll is a virus, because some RATs use it, so don't worry it is a false positive.

[Image: nHCXu6H.png]

It will save the recording in a .mr file I made up. So if you want to listen to the recording again you have to use the right side of the application.

Why not save it as an MP3 file?
I don't know how to save it as an MP3 file.

There are some settings, but don't change them for the best quality.

There are probably some bugs in it, but it is just to show people how to use the microphone.
Source on GitHub

🤝
using api much simple http :// www .visual-basic-tutorials.com/MicRecord.php
[Image: bitcoin.png] Be Nice For Once 15hVUVz7xA4kazHdk2BuErENGCskVwjYXP
Even more simple using NAudio instead "unknown dlls used in RATs"

PHP Code

<?php 
public WaveIn waveSource = null;
public 
WaveFileWriter waveFile = null;

private 
void StartBtn_Click(object sender, EventArgs e)
{
    
StartBtn.Enabled = false;
    
StopBtn.Enabled = true;

    
waveSource = new WaveIn();
    
waveSource.WaveFormat = new WaveFormat(44100, 1);

    
waveSource.DataAvailable += new EventHandler<WaveInEventArgs>(waveSource_DataAvailable);
    
waveSource.RecordingStopped += new EventHandler<StoppedEventArgs>(waveSource_RecordingStopped);

    
waveFile = new WaveFileWriter(@"C:\Temp\Test0001.wav", waveSource.WaveFormat);

    
waveSource.StartRecording();
}

private 
void StopBtn_Click(object sender, EventArgs e)
{
    
StopBtn.Enabled = false;

    
waveSource.StopRecording();
}

void waveSource_DataAvailable(object sender, WaveInEventArgs e)
{
    if (
waveFile != null)
    {
        
waveFile.Write(e.Buffer, 0, e.BytesRecorded);
        
waveFile.Flush();
    }
}

void waveSource_RecordingStopped(object sender, StoppedEventArgs e)
{
    if (
waveSource != null)
    {
        
waveSource.Dispose();
        
waveSource = null;
    }

    if (
waveFile != null)
    {
        
waveFile.Dispose();
        
waveFile = null;
    }

    
StartBtn.Enabled = true;
} 

NAudio github: https://github.com/naudio/NAudio
NAudio NuGet: https://www.nuget.org/packages/NAudio/
(Jul 7, 2016 10:49 AM)HFDone Wrote:  using api much simple http :// www .visual-basic-tutorials.com/MicRecord.php

Could be much more simple, but you cannot use settings or get the data directly in a byte array.

(Jul 7, 2016 11:57 AM)Zilog80 Wrote:  Even more simple using NAudio instead "unknown dlls used in RATs"

I have heard of NAudio, but the dll is 10 times the size of WinMM.Net.
That it is used in RATs doesn't mean it is bad. AForge is also used in many RATs, but it is very useful too.
cscore > naudio just saying been targeting naudio for a few years can be a pain in the assin most occasions .. but like everything it has its advantages which is widely used still
{ Vi Veri Universum Vivus Vici }
aah this could be pretty useful in the future :)
It's a bit simple and broad but i'll try it


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by Unixroot™Aug 12, 2021 09:40 PM 9 400 Aug 12, 2021 09:40 PM
Last Post: daxiqehk_daxiqehk
[C#] by BahNahNahDec 30, 2020 03:51 PM 25 1,040 Dec 30, 2020 03:51 PM
Last Post: Hashmumu
[Java] by Consulting DetectiveAug 1, 2018 03:15 AM 4 236 Aug 1, 2018 03:15 AM
Last Post: hash