Audio Capture SDK ActiveX

Audio Capture SDK ActiveX

Platform : Windows 10, Windows 8, Vista, Windows 7, XP

For Windows Developers who need to audio capture, record from Microphone or Playback Device, add pitch effects for C#,  C++ , , VB, Delphi, VFP, MS Access.

Popular Solution Go   Back

C# - How to record audio from output device ( speaker )

Step 1: To install the Audio Capture SDK ActiveX Control, begin by launching the setup file ( Select the desired installation folder for the Audio Capture ActiveX and continue with the installation on your development computer.

Step 2: Create New Visual C# Project, select Windows Application.

Step 3: The next step is to install Audio Capture ActiveX in ToolBox. Select Toolbox, select Components item, right click mouse button, select Choose Items...

Step 4: Select COM Component tab, select the Audio Capture Control, click OK.

Step 5: Now you will see the Audio Capture ActiveX's icon on toolbox, drag it to form.

Step 6: Add 2 buttons and one combo box on form. 

Step 7: Add the following code in Form1_Load event
        private void Form1_Load(object sender, EventArgs e)
            short i;
            for (i = 0; i < axAudioCapture1.GetPlaybackDeviceCount(); i )

            if (cboplaybackdevice.Items.Count > 0)
                cboplaybackdevice.SelectedIndex = 0;



Step 8: Add the following code in Capture button click event,  make sure you changed the AudioFileName to valid file path 
        private void button1_Click(object sender, EventArgs e)
            axAudioCapture1.CapturePlaybackDevice = true;
            axAudioCapture1.PlaybackDevice = (short)cboplaybackdevice.SelectedIndex;

            axAudioCapture1.ShowWaveForm = false;
            axAudioCapture1.OutputType = AUDIOCAPTURELib.AudioEnum.AUDIO_MP3;
            axAudioCapture1.AudioFileName = "c:\\yourfolder\\output.mp3";


Step 9: Add the following code in Stop button click event


Step 10: try playback music file or video file from windows media player 

Step 11: run the Windows Application. click the Capture button, it will capture the audio from selected playback device and output mp3 file.