we always only use the "C" locale when saving.
[ardour.git] / libs / ardour / audio_diskstream.cc
index 6f7c2d62297bfd392c28330e34dce335cc651820..0a6a62017b8975bbf4890eadb86d2f3cb6ec63d0 100644 (file)
@@ -168,7 +168,7 @@ AudioDiskstream::non_realtime_input_change ()
                        need_write_sources = true;
                }
 
-               if (input_change_pending.type == IOChange::ConfigurationChanged) {
+               if (input_change_pending.type & IOChange::ConfigurationChanged) {
                        RCUWriter<ChannelList> writer (channels);
                        boost::shared_ptr<ChannelList> c = writer.get_copy();
 
@@ -1895,7 +1895,7 @@ AudioDiskstream::get_state ()
 {
        XMLNode& node (Diskstream::get_state());
        char buf[64] = "";
-       LocaleGuard lg (X_("C"));
+       LocaleGuard lg ();
 
        boost::shared_ptr<ChannelList> c = channels.reader();
        snprintf (buf, sizeof(buf), "%u", (unsigned int) c->size());
@@ -1932,12 +1932,12 @@ AudioDiskstream::get_state ()
 int
 AudioDiskstream::set_state (const XMLNode& node, int version)
 {
-       const XMLProperty* prop;
+       XMLProperty const * prop;
        XMLNodeList nlist = node.children();
        XMLNodeIterator niter;
        uint32_t nchans = 1;
        XMLNode* capture_pending_node = 0;
-       LocaleGuard lg (X_("C"));
+       LocaleGuard lg ();
 
        /* prevent write sources from being created */
 
@@ -2237,11 +2237,11 @@ AudioDiskstream::playback_buffer_load () const
        boost::shared_ptr<ChannelList> c = channels.reader();
 
        if (c->empty ()) {
-               return 0;
+               return 1.0;
        }
 
        return (float) ((double) c->front()->playback_buf->read_space()/
-                       (double) c->front()->playback_buf->bufsize());
+                          (double) c->front()->playback_buf->bufsize());
 }
 
 float
@@ -2250,7 +2250,7 @@ AudioDiskstream::capture_buffer_load () const
        boost::shared_ptr<ChannelList> c = channels.reader();
 
        if (c->empty ()) {
-               return 0;
+               return 1.0;
        }
 
        return (float) ((double) c->front()->capture_buf->write_space()/
@@ -2260,7 +2260,7 @@ AudioDiskstream::capture_buffer_load () const
 int
 AudioDiskstream::use_pending_capture_data (XMLNode& node)
 {
-       const XMLProperty* prop;
+       XMLProperty const * prop;
        XMLNodeList nlist = node.children();
        XMLNodeIterator niter;
        boost::shared_ptr<AudioFileSource> fs;