Use translated error messages in PortaudioBackend when SR or i/o channel counts don...
authorTim Mayberry <mojofunk@gmail.com>
Sun, 23 Aug 2015 02:36:34 +0000 (12:36 +1000)
committerTim Mayberry <mojofunk@gmail.com>
Wed, 2 Sep 2015 02:07:14 +0000 (12:07 +1000)
These errors are probably preventable but currently they do occur so at least
tell the user about them(and hope they check the error log window)

libs/backends/portaudio/portaudio_backend.cc

index a9a8304d04eccde105ba341b00f33083158f0fc1..0b8e8c6b3a8055d6cac9c3be9b826d700130a305 100644 (file)
@@ -469,12 +469,12 @@ PortAudioBackend::_start (bool for_latency_measurement)
 
        if (_n_outputs != _pcmio->n_playback_channels ()) {
                _n_outputs = _pcmio->n_playback_channels ();
-               PBD::info << _("PortAudioBackend: adjusted output channel count to match device.") << endmsg;
+               PBD::info << get_error_string(OutputChannelCountNotSupportedError) << endmsg;
        }
 
        if (_n_inputs != _pcmio->n_capture_channels ()) {
                _n_inputs = _pcmio->n_capture_channels ();
-               PBD::info << _("PortAudioBackend: adjusted input channel count to match device.") << endmsg;
+               PBD::info << get_error_string(InputChannelCountNotSupportedError) << endmsg;
        }
 #if 0
        if (_pcmio->samples_per_period() != _samples_per_period) {
@@ -486,7 +486,7 @@ PortAudioBackend::_start (bool for_latency_measurement)
        if (_pcmio->sample_rate() != _samplerate) {
                _samplerate = _pcmio->sample_rate();
                engine.sample_rate_change (_samplerate);
-               PBD::warning << _("PortAudioBackend: sample rate does not match.") << endmsg;
+               PBD::warning << get_error_string(SampleRateNotSupportedError) << endmsg;
        }
 
        _measure_latency = for_latency_measurement;