From da45f489dd3d923bbba8f1cee39ab445c4bf1b64 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 2 May 2008 18:35:05 +0000 Subject: Fixes for GCC 4.3. git-svn-id: svn://localhost/ardour2/branches/3.0@3303 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/amp.cc | 6 +++--- libs/ardour/ardour/audio_buffer.h | 1 + libs/ardour/ardour/silentfilesource.h | 1 + libs/ardour/audio_diskstream.cc | 4 ++-- libs/ardour/audioanalyser.cc | 1 + libs/ardour/automation_event.cc | 2 +- libs/ardour/find_session.cc | 1 + libs/ardour/gdither.cc | 4 ++-- libs/ardour/midi_diskstream.cc | 4 ++-- libs/ardour/recent_sessions.cc | 1 + libs/ardour/session.cc | 4 ++-- libs/ardour/smf_reader.cc | 1 + libs/ardour/sndfilesource.cc | 1 + libs/ardour/utils.cc | 1 + 14 files changed, 20 insertions(+), 12 deletions(-) (limited to 'libs/ardour') diff --git a/libs/ardour/amp.cc b/libs/ardour/amp.cc index ae540b86e8..a2ad70e8b1 100644 --- a/libs/ardour/amp.cc +++ b/libs/ardour/amp.cc @@ -16,10 +16,10 @@ 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include - -#include +#include #include +#include +#include #include #include diff --git a/libs/ardour/ardour/audio_buffer.h b/libs/ardour/ardour/audio_buffer.h index 1f6c2f63bf..71eaf60ade 100644 --- a/libs/ardour/ardour/audio_buffer.h +++ b/libs/ardour/ardour/audio_buffer.h @@ -19,6 +19,7 @@ #ifndef __ardour_audio_buffer_h__ #define __ardour_audio_buffer_h__ +#include #include namespace ARDOUR { diff --git a/libs/ardour/ardour/silentfilesource.h b/libs/ardour/ardour/silentfilesource.h index 87065c1cd0..cbb123139a 100644 --- a/libs/ardour/ardour/silentfilesource.h +++ b/libs/ardour/ardour/silentfilesource.h @@ -20,6 +20,7 @@ #ifndef __ardour_silentfilesource_h__ #define __ardour_silentfilesource_h__ +#include #include namespace ARDOUR { diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc index 059fed8752..59e6007a6d 100644 --- a/libs/ardour/audio_diskstream.cc +++ b/libs/ardour/audio_diskstream.cc @@ -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 */ diff --git a/libs/ardour/audioanalyser.cc b/libs/ardour/audioanalyser.cc index eccc38434d..98c4206301 100644 --- a/libs/ardour/audioanalyser.cc +++ b/libs/ardour/audioanalyser.cc @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/libs/ardour/automation_event.cc b/libs/ardour/automation_event.cc index a3edc9dcde..e01e349281 100644 --- a/libs/ardour/automation_event.cc +++ b/libs/ardour/automation_event.cc @@ -1210,7 +1210,7 @@ AutomationList::rt_safe_earliest_event_linear_unlocked (double start, double end x = first->when + (y - first->value) / (double)slope; - while ((inclusive && x < start) || x <= start && y != next->value) { + while ((inclusive && x < start) || (x <= start && y != next->value)) { if (first->value < next->value) // ramping up y += 1.0; diff --git a/libs/ardour/find_session.cc b/libs/ardour/find_session.cc index f8ed3d5a46..4388d8e299 100644 --- a/libs/ardour/find_session.cc +++ b/libs/ardour/find_session.cc @@ -1,6 +1,7 @@ #include #include +#include #include #include diff --git a/libs/ardour/gdither.cc b/libs/ardour/gdither.cc index 7242f857c8..ac47a0a61e 100644 --- a/libs/ardour/gdither.cc +++ b/libs/ardour/gdither.cc @@ -387,7 +387,7 @@ void gdither_runf(GDither s, uint32_t channel, uint32_t length, } /* some common case handling code - looks a bit wierd, but it allows - * the compiler to optiomise out the branches in the inner loop */ + * the compiler to optimise out the branches in the inner loop */ if (s->bit_depth == 8 && s->dither_depth == 8) { switch (s->type) { case GDitherNone: @@ -411,7 +411,7 @@ void gdither_runf(GDither s, uint32_t channel, uint32_t length, ss, x, y, MAX_U8, MIN_U8); break; } - } else if (s->bit_depth == s->dither_depth == 16) { + } else if (s->bit_depth == 16 && s->dither_depth == 16) { switch (s->type) { case GDitherNone: gdither_innner_loop(GDitherNone, s->channels, 0.0f, SCALE_S16, diff --git a/libs/ardour/midi_diskstream.cc b/libs/ardour/midi_diskstream.cc index 885435e238..2e1647f507 100644 --- a/libs/ardour/midi_diskstream.cc +++ b/libs/ardour/midi_diskstream.cc @@ -339,7 +339,7 @@ MidiDiskstream::check_record_status (nframes_t transport_frame, nframes_t nframe /* 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) || + 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 */ @@ -909,7 +909,7 @@ MidiDiskstream::do_flush (Session::RunContext context, bool force_flush) total = _session.transport_frame() - _last_flush_frame; - if (total == 0 || _capture_buf->read_space() == 0 && _session.transport_speed() == 0 || (total < disk_io_chunk_frames && !force_flush && was_recording)) { + if (total == 0 || (_capture_buf->read_space() == 0 && _session.transport_speed() == 0) || (total < disk_io_chunk_frames && !force_flush && was_recording)) { goto out; } diff --git a/libs/ardour/recent_sessions.cc b/libs/ardour/recent_sessions.cc index ebc5499f89..9b8668dd88 100644 --- a/libs/ardour/recent_sessions.cc +++ b/libs/ardour/recent_sessions.cc @@ -17,6 +17,7 @@ */ +#include #include #include #include diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 8357b7e901..ff269cc931 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -134,8 +134,8 @@ Session::Session (AudioEngine &eng, _session_dir (new SessionDirectory(fullpath)), pending_events (2048), post_transport_work((PostTransportWork)0), - midi_requests (128), _send_smpte_update (false), + midi_requests (128), diskstreams (new DiskstreamList), routes (new RouteList), auditioner ((Auditioner*) 0), @@ -204,8 +204,8 @@ Session::Session (AudioEngine &eng, _session_dir ( new SessionDirectory(fullpath)), pending_events (2048), post_transport_work((PostTransportWork)0), - midi_requests (16), _send_smpte_update (false), + midi_requests (16), diskstreams (new DiskstreamList), routes (new RouteList), _bundle_xml_node (0), diff --git a/libs/ardour/smf_reader.cc b/libs/ardour/smf_reader.cc index 63a020f141..c5e715c2ce 100644 --- a/libs/ardour/smf_reader.cc +++ b/libs/ardour/smf_reader.cc @@ -17,6 +17,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc index e534964343..ab090381b4 100644 --- a/libs/ardour/sndfilesource.cc +++ b/libs/ardour/sndfilesource.cc @@ -17,6 +17,7 @@ */ +#include #include #include diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc index 50b9ff320e..f30f568f9d 100644 --- a/libs/ardour/utils.cc +++ b/libs/ardour/utils.cc @@ -21,6 +21,7 @@ #include #include /* for sprintf */ +#include #include #include #include -- cgit v1.2.3