Recording a Conversation in Communicator.

Feb 18, 2011 at 6:40 AM



I am new to NAudio. I am trying to record a conversation in communicator. As per the microsoft documentation I think I have to do a LoopBack recording.

So in AudioClient I trind to Initialize using first two parameters as shared and loopback. 

 int hresult = audioClientInterface.Initialize(AudioClientShareMode.Shared, AudioClientStreamFlags.Loopback, bufferDuration, periodicity, waveFormat, ref audioSessionGuid);  

I am getting an exception like below. 

Exception from HRESULT: 0x88890003

my hresult value is -2004287485


Can anybody tell me the reason and how I can correct it??




Feb 21, 2011 at 9:37 AM

You'll have to use google to get the exact meaning of that error code. What OS are you using? And what waveFormat are you trying to record in?


Feb 22, 2011 at 9:06 AM

My OS is Windows 7 Enterprise Edition, and I am recording in wav format.

Feb 22, 2011 at 10:19 AM

I mean what sample rate & bit depth etc (do a waveFormat.ToString())


Feb 25, 2011 at 3:24 AM

This is the wav format.

it's the devices mixformat and the device is a usb handset.

"32 bit PCM: 44kHz 1 channels wBitsPerSample:32 dwChannelMask:4 subFormat:00000003-0000-0010-8000-00aa00389b71 extraSize:22"

Feb 25, 2011 at 8:56 AM

can you open it in exclusive mode?

Feb 28, 2011 at 4:39 AM


it also throws exception 

Exception from HRESULT: 0x88890003


Feb 28, 2011 at 12:46 PM

ok, I would suggest you find some forums where WASAPI is discussed and find out the meaning of those error codes


Mar 1, 2011 at 4:43 AM

Thanks Mark.

Jun 2, 2011 at 12:08 PM
Edited Jun 2, 2011 at 12:20 PM

For those still looking for HRESULT: 0x88890003 description and other exceptions see


Description : The AUDCLNT_STREAMFLAGS_LOOPBACK flag is set but the endpoint device is a capture device, not a rendering device.

Also, reason for failure to Initialize explained copied from msdn :

The AUDCLNT_STREAMFLAGS_LOOPBACK flag enables loopback recording. In loopback recording, the audio engine copies the audio stream that is being played by a rendering endpoint device into an audio endpoint buffer so that a WASAPI client can capture the stream. If this flag is set, the IAudioClient::Initialize method attempts to open a capture buffer on the rendering device. This flag is valid only for a rendering device and only if the Initialize call sets the ShareMode parameter to AUDCLNT_SHAREMODE_SHARED. Otherwise the Initialize call will fail. If the call succeeds, the client can call the IAudioClient::GetService method to obtain an IAudioCaptureClient interface on the rendering device. For more information, see Loopback Recording.