| Previous | Next |
| MF_E_AUDIO_RECORDING_DEVICE_IN_USE | MF_E_VIDEO_RECORDING_DEVICE_INVALIDATED |
MF_E_AUDIO_RECORDING_DEVICE_INVALIDATED
MF_E_AUDIO_RECORDING_DEVICE_INVALIDATED is a device-lifetime failure, not a malformed audio-sample error. The underlying WASAPI endpoint can become invalid after the Media Foundation capture source has already been created.
Preserve the reason and rebuild the endpoint path
- Log the audio endpoint ID, the last successful capture operation, and the first failing operation. Device invalidation can follow unplugging, disable/removal, or hardware-resource reconfiguration.
- Distinguish a default-role selection from a specifically selected endpoint. Microsoft documents different recovery decisions for applications that always use the default device and applications pinned to a particular device.
- Do not continue issuing reads against the old audio client indefinitely. WASAPI recovery for a default endpoint releases the old interfaces, obtains the current default endpoint, and activates a new
IAudioClient.
An audio session can also be disconnected when the endpoint changes or becomes unavailable. The important evidence is whether the endpoint itself disappeared, its configuration changed, or the application was bound to a device that is no longer the current default. Recreating the media source from the intended endpoint is more relevant than retrying the same closed stream.
Microsoft: recovering from an invalid audio device · Microsoft: MFCreateDeviceSource
Looking for a different code? Search another status or error code.