This project has moved. For the latest updates, please go here.

InteropServices.COMException 0x88890001 when trying to accessAudioCaptureClient, BufferSize etc

Aug 28, 2016 at 5:03 PM
I tried this with several audio devices, both capture and render and the result is the same for all of them:


There are several properties of a device's AudioClient property I can't access - it just keeps throwing a System.Runtime.InteropServices.COMException ("Exception of HRESULT: 0x88890001")

I didn't even do anything advanced:
Dim devEnum As New NAudio.CoreAudioApi.MMDeviceEnumerator()
Dim deviceList As NAudio.CoreAudioApi.MMDeviceCollection = devEnum.EnumerateAudioEndPoints(NAudio.CoreAudioApi.DataFlow.Capture, NAudio.CoreAudioApi.DeviceState.Active)
Dim dev As NAudio.CoreAudioApi.MMDevice = devEnum.GetDevice(deviceList(0).ID)
All my audio devices are being listed by MMDeviceEnumerator and the MixingFormat property is recognized correctly.. Did I do anything wrong or is it a bug?

Operating System: Win7 Ultimate x64
Audio interfaces: Zoom G3X, Creative Sound Blaster X-Fi Xtreme Audio, ASUS Xonar D2
IDE: Visual Basic 2010 Express (.NET 4.0)
NAudio version:
Aug 30, 2016 at 8:07 PM
That error code is AUDCLNT_E_NOT_INITIALIZED, which means that until you call Initialize on the AudioClient, you can't access all its properties.