A configured device that was virtual, output-only, renamed or unplugged was replaced by the hardware default input, with only a log warning. The capture source now refuses an explicit selection that cannot be used as configured: it raises AudioDeviceUnavailableError, skips reconnection (retrying cannot help), and reports it through the desktop notification path. System Default (unset, or -1) keeps its implicit default. Behaviour change: an unplugged or renamed configured microphone now fails visibly instead of recording from the default input. Pulse source selection is unchanged. Fixes #42
15 lines
510 B
Python
15 lines
510 B
Python
"""Errors shared by microphone and system-audio capture sources."""
|
|
|
|
|
|
class CaptureStalledError(IOError):
|
|
"""The capture device stopped delivering audio frames."""
|
|
|
|
|
|
class AudioDeviceUnavailableError(IOError):
|
|
"""The configured capture device cannot be used as configured.
|
|
|
|
Raised instead of recording from another input: a configured device that
|
|
is missing, renamed, virtual or output-only must fail visibly (issue #42).
|
|
The message is user-facing and names the configured device.
|
|
"""
|