When devices go missing, the program fails catastrophically and deletes all recorded content. The problem is reproducable by disabling the device in the control panel. Would it be possible to make the program write any content that was saved to disk as a default mode of failure (not only for this event but for other errors as well)?
Command line options:
fmedia --record --out=$date-$time.opus --opus.bitrate=64 --dev-loopback=2
Hi! Handling AUDCLNT_E_DEVICE_INVALIDATED is in my todo list for quite some time but it never was a priority. Looks like it's time to finally do it, thank you for bringing this up!
When devices go missing, the program fails catastrophically and deletes all recorded content. The problem is reproducable by disabling the device in the control panel. Would it be possible to make the program write any content that was saved to disk as a default mode of failure (not only for this event but for other errors as well)?
Command line options: fmedia --record --out=$date-$time.opus --opus.bitrate=64 --dev-loopback=2
Sample output: fmedia v1.25 (win-x64) Recording... Source: float32 48000Hz stereo. Press "s" to stop. 0:00 [..........] -40dB / -40dB 00:47:50.533 :3598 [warning] #soundmod.autoconv: 1: conversion format was overwritten by output filters: float32/2/48000 0:23 [..........] -40dB / -12dB 00:48:13.542 :3598 [error] wasapi.out: 2:write(): IAudioClient_GetCurrentPadding: (0x88890004) AUDCLNT_E_DEVICE_INVALIDATED 00:48:13.543 :3598 [error] wasapi.in: *1: read(): IAudioCaptureClient_GetBuffer: (0x88890004) AUDCLNT_E_DEVICE_INVALIDATED