

MessageBox.Show( " This sample can only work on Windows Vista or higher versions.ĪudioSoundRecorder1.InitRecordingSystem() If (nReturn = enumErrorCodes.ERR_INVALID_PLATFORM) initialize usage of WASAPI audio driversĮnumErrorCodes nReturn = audioSoundRecorder1.InitDriversType (enumDriverTypes.DRIVER_TYPE_WASAPI)
#NAUDIO AUDIO LOOPBACK DRIVERS#
NET accesses audio devices through DirectSound and WDM drivers so, in order to leverage WASAPI, we need to specify to the component that we want to use a different kind of drivers through the InitDriversType method, then we can initialize the component through the mandatory call to the InitRecordingSystem method:Ĭopy Code private void Form1_Load( object sender, EventArgs e) Initializing the WASAPI subsystem and the component’s recording systemīy default Audio Sound Recorder for. The user interface of our sample application will look like this:
#NAUDIO AUDIO LOOPBACK HOW TO#
In this tutorial we want to see how to start a recording session, from a capture device or from a loopback device, in order to store incoming audio data into an output sound file of a specific audio format with the possibility to playback the same file once the recording session is stopped.

Stopping the recording session and the specific audio endpoint device.Starting the specific endpoint device and recording its data flow.Enumerating various types of audio endpoint devices (render, capture and loopback).

The main points related to the usage of WASAPI features through the Audio Sound Recorder for. NET allows developers leveraging in a easy way a subset of WASAPI features in order to create and manage audio streams to and from audio endpoint devices inside their applications. NET can be of help in managing WASAPI easilyĪs seen for most of the APIs developed by Microsoft, WASAPI consists of a combination of several COM interfaces whose usage is not always straightforward: Audio Sound Recorder for.
