Fixes for GCC 4.3.
[ardour.git] / libs / ardour / audio_diskstream.cc
index 5c32b34e107f05ea3f544c256ba3f8f6000b7074..59e6007a6dafc138fc06f0037f24a1a7dd5a5642 100644 (file)
@@ -398,8 +398,8 @@ AudioDiskstream::check_record_status (nframes_t transport_frame, nframes_t nfram
 
        /* if per-track or global rec-enable turned on while the other was already on, we've started recording */
 
-       if ((change & track_rec_enabled) && record_enabled() && (!(change & global_rec_enabled) && can_record) || 
-           ((change & global_rec_enabled) && can_record && (!(change & track_rec_enabled) && record_enabled()))) {
+       if (((change & track_rec_enabled) && record_enabled() && (!(change & global_rec_enabled) && can_record)) || 
+           (((change & global_rec_enabled) && can_record && (!(change & track_rec_enabled) && record_enabled())))) {
                
                /* starting to record: compute first+last frames */
 
@@ -1570,7 +1570,9 @@ AudioDiskstream::transport_stopped (struct tm& when, time_t twhen, bool abort_ca
                        s->update_header (capture_info.front()->start, when, twhen);
                        s->set_captured_for (_name);
                        s->mark_immutable ();
-                       Analyser::queue_source_for_analysis (s, true);
+                       if (Config->get_auto_analyse_audio()) {
+                               Analyser::queue_source_for_analysis (s, true);
+                       }
                }
        }
 
@@ -2220,7 +2222,7 @@ AudioDiskstream::add_channel (uint32_t how_many)
 int
 AudioDiskstream::remove_channel_from (boost::shared_ptr<ChannelList> c, uint32_t how_many)
 {
-       while (--how_many && !c->empty()) {
+       while (how_many-- && !c->empty()) {
                delete c->back();
                c->pop_back();
        }