Open
Description
Attempting to start a WASAPI capture with the default constructor returns an exception from hresult 0x8000FFFF, Catastrophic failure when called from a Windows service. Since the latest Windows 11 update, my app has been crashing on trying to start a WASAPI mic capture and is deployed as a self contained, single file Windows service.
Initializing the capture:
waveFormat = new WaveFormat(48000, 16, 1);
writerMic = new WaveFileWriter(Path.Combine(outputPath, "mic.wav"), waveFormat);
captureMic = new WasapiCapture();
captureMic.WaveFormat = waveFormat;
captureMic.DataAvailable += (s, a) =>
{
writerMic?.Write(a.Buffer, 0, a.BytesRecorded);
};
try
{
captureMic.StartRecording();
}
This only happens when the application is deployed as a service, it runs fine when running from Visual Studio. I've been spinning my wheels on this problem for months, does anyone have any ideas?
Metadata
Assignees
Labels
No labels
Activity