Add a couple of error codes to AudioBackend::ErrorCode
authorTim Mayberry <mojofunk@gmail.com>
Sat, 26 Sep 2015 07:02:37 +0000 (17:02 +1000)
committerTim Mayberry <mojofunk@gmail.com>
Wed, 30 Sep 2015 23:10:19 +0000 (09:10 +1000)
Also use the error message from ARDOUR_UI::reconnect_to_engine as the default
error string

libs/ardour/ardour/audio_backend.h
libs/ardour/audio_backend.cc

index ed5b0532746b61e72e672fdc482249657f6c28c3..27b6e7e2b5fd1036c4d9a079a44a29cf50580d12 100644 (file)
@@ -101,12 +101,14 @@ class LIBARDOUR_API AudioBackend : public PortEngine {
                MidiDeviceNotAvailableError,
                MidiDeviceNotConnectedError,
                MidiDeviceIOError,
+               SampleFormatNotSupportedError,
                SampleRateNotSupportedError,
                RequestedInputLatencyNotSupportedError,
                RequestedOutputLatencyNotSupportedError,
                PeriodSizeNotSupportedError,
                PeriodCountNotSupportedError,
                DeviceConfigurationNotSupportedError,
+               ChannelCountNotSupportedError,
                InputChannelCountNotSupportedError,
                OutputChannelCountNotSupportedError,
                AquireRealtimePermissionError,
index 225b64dbf18a749822fca889e49e17ef6b24d475..35bff3b06e5508bb6b2a0ee495eb4dee04f66af3 100644 (file)
@@ -55,6 +55,8 @@ AudioBackend::get_error_string (ErrorCode error_code)
                return _("MIDI device not connected");
        case MidiDeviceIOError:
                return _("MIDI device Input/Output error");
+       case SampleFormatNotSupportedError:
+               return _("Sample format is not supported");
        case SampleRateNotSupportedError:
                return _("Sample rate is not supported");
        case RequestedInputLatencyNotSupportedError:
@@ -67,6 +69,8 @@ AudioBackend::get_error_string (ErrorCode error_code)
                return _("Period count is not supported");
        case DeviceConfigurationNotSupportedError:
                return _("Device configuration not supported");
+       case ChannelCountNotSupportedError:
+               return _("Channel count configuration not supported");
        case InputChannelCountNotSupportedError:
                return _("Input channel count configuration not supported");
        case OutputChannelCountNotSupportedError:
@@ -78,7 +82,7 @@ AudioBackend::get_error_string (ErrorCode error_code)
        case SettingMIDIThreadPriorityError:
                return _("Setting MIDI device thread priorities failed");
        }
-       return std::string();
+       return _("Could not reconnect to Audio/MIDI engine");
 }
 
 std::string