13
0

Fix more broken whitespace.

git-svn-id: svn://localhost/ardour2/branches/3.0@9152 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard 2011-03-15 01:16:24 +00:00
parent 148c1f805b
commit be3002c239
7 changed files with 215 additions and 210 deletions

View File

@ -100,8 +100,8 @@ MidiBuffer::read_from (const Buffer& src, framecnt_t nframes, framecnt_t dst_off
if (ev.time() >= src_offset && ev.time() < (nframes+src_offset)) { if (ev.time() >= src_offset && ev.time() < (nframes+src_offset)) {
push_back (ev); push_back (ev);
} else { } else {
cerr << "MIDI event @ " << ev.time() << " skipped, not within range " << src_offset << " .. " cerr << "MIDI event @ " << ev.time() << " skipped, not within range "
<< (nframes + src_offset) << endl; << src_offset << " .. " << (nframes + src_offset) << endl;
} }
} }

View File

@ -1,6 +1,6 @@
/* /*
Copyright (C) 2007 Paul Davis Copyright (C) 2007 Paul Davis
Author: Dave Robillard Author: David Robillard
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -1606,8 +1606,9 @@ MidiModel::resolve_overlaps_unlocked (const NotePtr note, void* arg)
continue; continue;
} }
DEBUG_TRACE (DEBUG::Sequence, string_compose ("\toverlap is %1 for (%2,%3) vs (%4,%5)\n", enum_2_string(overlap), DEBUG_TRACE (DEBUG::Sequence, string_compose (
sa, ea, sb, eb)); "\toverlap is %1 for (%2,%3) vs (%4,%5)\n",
enum_2_string(overlap), sa, ea, sb, eb));
if (insert_merge_policy() == InsertMergeReject) { if (insert_merge_policy() == InsertMergeReject) {
DEBUG_TRACE (DEBUG::Sequence, string_compose ("%1 just reject\n", this)); DEBUG_TRACE (DEBUG::Sequence, string_compose ("%1 just reject\n", this));

View File

@ -1,6 +1,6 @@
/* /*
Copyright (C) 2006 Paul Davis Copyright (C) 2006 Paul Davis
Written by Dave Robillard, 2006 Author: David Robillard
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by

View File

@ -1,6 +1,6 @@
/* /*
Copyright (C) 2006 Paul Davis Copyright (C) 2006 Paul Davis
By Dave Robillard, 2006 Author: David Robillard
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -16,6 +16,7 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
#include "pbd/error.h" #include "pbd/error.h"
#include "pbd/enumwriter.h" #include "pbd/enumwriter.h"
@ -107,7 +108,9 @@ MidiTrack::set_diskstream (boost::shared_ptr<Diskstream> ds)
_diskstream_data_recorded_connection.disconnect (); _diskstream_data_recorded_connection.disconnect ();
boost::shared_ptr<MidiDiskstream> mds = boost::dynamic_pointer_cast<MidiDiskstream> (ds); boost::shared_ptr<MidiDiskstream> mds = boost::dynamic_pointer_cast<MidiDiskstream> (ds);
mds->DataRecorded.connect_same_thread (_diskstream_data_recorded_connection, boost::bind (&MidiTrack::diskstream_data_recorded, this, _1, _2)); mds->DataRecorded.connect_same_thread (
_diskstream_data_recorded_connection,
boost::bind (&MidiTrack::diskstream_data_recorded, this, _1, _2));
DiskstreamChanged (); /* EMIT SIGNAL */ DiskstreamChanged (); /* EMIT SIGNAL */
} }
@ -165,8 +168,8 @@ MidiTrack::_set_state (const XMLNode& node, int version, bool call_base)
} }
} }
/* set rec-enable control *AFTER* setting up diskstream, because it may want to operate /* set rec-enable control *AFTER* setting up diskstream, because it may
on the diskstream as it sets its own state want to operate on the diskstream as it sets its own state
*/ */
for (niter = nlist.begin(); niter != nlist.end(); ++niter){ for (niter = nlist.begin(); niter != nlist.end(); ++niter){
@ -182,7 +185,8 @@ MidiTrack::_set_state (const XMLNode& node, int version, bool call_base)
pending_state = const_cast<XMLNode*> (&node); pending_state = const_cast<XMLNode*> (&node);
if (_session.state_of_the_state() & Session::Loading) { if (_session.state_of_the_state() & Session::Loading) {
_session.StateReady.connect_same_thread (*this, boost::bind (&MidiTrack::set_state_part_two, this)); _session.StateReady.connect_same_thread (
*this, boost::bind (&MidiTrack::set_state_part_two, this));
} else { } else {
set_state_part_two (); set_state_part_two ();
} }

View File

@ -875,8 +875,9 @@ TempoMap::bbt_time_with_metric (framepos_t frame, BBT_Time& bbt, const TempoMetr
framecnt_t framecnt_t
TempoMap::count_frames_between (const BBT_Time& start, const BBT_Time& end) const TempoMap::count_frames_between (const BBT_Time& start, const BBT_Time& end) const
{ {
/* for this to work with fractional measure types, start and end have to be "legal" BBT types, /* for this to work with fractional measure types, start and end have to be
that means that the beats and ticks should be inside a bar "legal" BBT types, that means that the beats and ticks should be inside
a bar
*/ */
framecnt_t frames = 0; framecnt_t frames = 0;
@ -997,15 +998,12 @@ TempoMap::bbt_duration_at_unlocked (const BBT_Time& when, const BBT_Time& bbt, i
TempoMetric metric = metric_at(result); TempoMetric metric = metric_at(result);
beats_per_bar = metric.meter().beats_per_bar(); beats_per_bar = metric.meter().beats_per_bar();
/* Reduce things to legal bbt values we have to handle possible
fractional=shorter beats at the end of measures and things like 0|11|9000
/*reduce things to legal bbt values as a duration in a 4.5/4 measure the musical decision is that the
we have to handle possible fractional=shorter beats at the end of measures fractional beat is also a beat , although a shorter one
and things like 0|11|9000 as a duration in a 4.5/4 measure
the musical decision is that the fractional beat is also a beat , although a shorter one
*/ */
if (dir >= 0) { if (dir >= 0) {
result.beats = when.beats + bbt.beats; result.beats = when.beats + bbt.beats;
result.ticks = when.ticks + bbt.ticks; result.ticks = when.ticks + bbt.ticks;
@ -1017,9 +1015,12 @@ TempoMap::bbt_duration_at_unlocked (const BBT_Time& when, const BBT_Time& bbt, i
beats_per_bar = metric.meter().beats_per_bar(); beats_per_bar = metric.meter().beats_per_bar();
} }
/*we now counted the beats and landed in the target measure, now deal with ticks
this seems complicated, but we want to deal with the corner case of a sequence of time signatures like 0.2/4-0.7/4 /* We now counted the beats and landed in the target measure, now deal
and with request like bbt = 3|2|9000 ,so we repeat the same loop but add ticks with ticks this seems complicated, but we want to deal with the
corner case of a sequence of time signatures like 0.2/4-0.7/4 and
with request like bbt = 3|2|9000 ,so we repeat the same loop but add
ticks
*/ */
/* of course gtk_ardour only allows bar with at least 1.0 beats ..... /* of course gtk_ardour only allows bar with at least 1.0 beats .....
@ -1182,7 +1183,6 @@ TempoMap::round_to_beat_subdivision (framepos_t fr, int sub_num, int dir)
return fr; return fr;
} }
} else { } else {
/* round to nearest */ /* round to nearest */