we always only use the "C" locale when saving.
[ardour.git] / gtk2_ardour / engine_dialog.cc
index 48cf35ba8f8b5ab06a7ab2b9528e04f87048260a..6f6d31ff182b3ab044953679c23a47667f471d85 100644 (file)
@@ -1900,7 +1900,7 @@ EngineControl::maybe_display_saved_state ()
 XMLNode&
 EngineControl::get_state ()
 {
-       LocaleGuard lg (X_("C"));
+       LocaleGuard lg ();
 
        XMLNode* root = new XMLNode ("AudioMIDISetup");
        std::string path;
@@ -1970,9 +1970,9 @@ EngineControl::set_state (const XMLNode& root)
 {
        XMLNodeList          clist, cclist;
        XMLNodeConstIterator citer, cciter;
-       XMLNode* child;
-       XMLNode* grandchild;
-       XMLProperty* prop = NULL;
+       XMLNode const * child;
+       XMLNode const * grandchild;
+       XMLProperty const * prop = NULL;
 
        fprintf (stderr, "EngineControl::set_state\n");
 
@@ -2771,7 +2771,8 @@ void
 EngineControl::set_desired_sample_rate (uint32_t sr)
 {
        _desired_sample_rate = sr;
-       if (ARDOUR::AudioEngine::instance()->running()) {
+       if (ARDOUR::AudioEngine::instance ()->running ()
+                       && ARDOUR::AudioEngine::instance ()->sample_rate () != sr) {
                stop_engine ();
        }
        device_changed ();