Add a couple of error codes to AudioBackend::ErrorCode

Also use the error message from ARDOUR_UI::reconnect_to_engine as the default
error string
This commit is contained in:
Tim Mayberry 2015-09-26 17:02:37 +10:00
parent c6f9a65081
commit 9a7f96f15a
2 changed files with 7 additions and 1 deletions

View file

@ -101,12 +101,14 @@ class LIBARDOUR_API AudioBackend : public PortEngine {
MidiDeviceNotAvailableError, MidiDeviceNotAvailableError,
MidiDeviceNotConnectedError, MidiDeviceNotConnectedError,
MidiDeviceIOError, MidiDeviceIOError,
SampleFormatNotSupportedError,
SampleRateNotSupportedError, SampleRateNotSupportedError,
RequestedInputLatencyNotSupportedError, RequestedInputLatencyNotSupportedError,
RequestedOutputLatencyNotSupportedError, RequestedOutputLatencyNotSupportedError,
PeriodSizeNotSupportedError, PeriodSizeNotSupportedError,
PeriodCountNotSupportedError, PeriodCountNotSupportedError,
DeviceConfigurationNotSupportedError, DeviceConfigurationNotSupportedError,
ChannelCountNotSupportedError,
InputChannelCountNotSupportedError, InputChannelCountNotSupportedError,
OutputChannelCountNotSupportedError, OutputChannelCountNotSupportedError,
AquireRealtimePermissionError, AquireRealtimePermissionError,

View file

@ -55,6 +55,8 @@ AudioBackend::get_error_string (ErrorCode error_code)
return _("MIDI device not connected"); return _("MIDI device not connected");
case MidiDeviceIOError: case MidiDeviceIOError:
return _("MIDI device Input/Output error"); return _("MIDI device Input/Output error");
case SampleFormatNotSupportedError:
return _("Sample format is not supported");
case SampleRateNotSupportedError: case SampleRateNotSupportedError:
return _("Sample rate is not supported"); return _("Sample rate is not supported");
case RequestedInputLatencyNotSupportedError: case RequestedInputLatencyNotSupportedError:
@ -67,6 +69,8 @@ AudioBackend::get_error_string (ErrorCode error_code)
return _("Period count is not supported"); return _("Period count is not supported");
case DeviceConfigurationNotSupportedError: case DeviceConfigurationNotSupportedError:
return _("Device configuration not supported"); return _("Device configuration not supported");
case ChannelCountNotSupportedError:
return _("Channel count configuration not supported");
case InputChannelCountNotSupportedError: case InputChannelCountNotSupportedError:
return _("Input channel count configuration not supported"); return _("Input channel count configuration not supported");
case OutputChannelCountNotSupportedError: case OutputChannelCountNotSupportedError:
@ -78,7 +82,7 @@ AudioBackend::get_error_string (ErrorCode error_code)
case SettingMIDIThreadPriorityError: case SettingMIDIThreadPriorityError:
return _("Setting MIDI device thread priorities failed"); return _("Setting MIDI device thread priorities failed");
} }
return std::string(); return _("Could not reconnect to Audio/MIDI engine");
} }
std::string std::string