13
0

Merged with trunk R1729.

git-svn-id: svn://localhost/ardour2/branches/midi@1730 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard 2007-04-19 18:23:23 +00:00
parent bed7bacdd1
commit a9f5e379d2
11 changed files with 377 additions and 545 deletions

View File

@ -1435,7 +1435,7 @@ class Editor : public PublicEditor
void drag_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event);
void end_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event);
bool select_all_within (nframes_t start, nframes_t end, gdouble topy, gdouble boty, Selection::Operation op);
bool select_all_within (nframes_t start, nframes_t end, gdouble topy, gdouble boty, const TrackViewList&, Selection::Operation op);
ArdourCanvas::SimpleRect *rubberband_rect;

View File

@ -594,7 +594,7 @@ Editor::marker_menu_select_all_selectables_using_range ()
bool is_start;
if (((l = find_location_from_marker (marker, is_start)) != 0) && (l->end() > l->start())) {
select_all_within (l->start(), l->end() - 1, 0, DBL_MAX, Selection::Set);
select_all_within (l->start(), l->end() - 1, 0, DBL_MAX, track_views, Selection::Set);
}
}

View File

@ -4524,7 +4524,7 @@ Editor::end_range_markerbar_op (ArdourCanvas::Item* item, GdkEvent* event)
switch (mouse_mode) {
case MouseObject:
/* find the two markers on either side and then make the selection from it */
select_all_within (start, end, 0.0f, FLT_MAX, Selection::Set);
select_all_within (start, end, 0.0f, FLT_MAX, track_views, Selection::Set);
break;
case MouseRange:
@ -4727,9 +4727,9 @@ Editor::end_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event)
begin_reversible_command (_("rubberband selection"));
if (drag_info.grab_frame < drag_info.last_pointer_frame) {
commit = select_all_within (drag_info.grab_frame, drag_info.last_pointer_frame, y1, y2, op);
commit = select_all_within (drag_info.grab_frame, drag_info.last_pointer_frame, y1, y2, track_views, op);
} else {
commit = select_all_within (drag_info.last_pointer_frame, drag_info.grab_frame, y1, y2, op);
commit = select_all_within (drag_info.last_pointer_frame, drag_info.grab_frame, y1, y2, track_views, op);
}
if (commit) {

View File

@ -245,7 +245,7 @@ Editor::set_selected_control_point_from_click (Selection::Operation op, bool no_
y1 = clicked_control_point->get_x() - 10;
y2 = clicked_control_point->get_y() + 10;
return select_all_within (x1, x2, y1, y2, op);
return select_all_within (x1, x2, y1, y2, selection->tracks, op);
}
void
@ -770,13 +770,13 @@ Editor::invert_selection ()
}
bool
Editor::select_all_within (nframes_t start, nframes_t end, double top, double bot, Selection::Operation op)
Editor::select_all_within (nframes_t start, nframes_t end, double top, double bot, const TrackViewList& tracklist, Selection::Operation op)
{
list<Selectable*> touched;
list<Selectable*>::size_type n = 0;
TrackViewList touched_tracks;
for (TrackViewList::iterator iter = selection->tracks.begin(); iter != selection->tracks.end(); ++iter) {
for (TrackViewList::const_iterator iter = tracklist.begin(); iter != tracklist.end(); ++iter) {
if ((*iter)->hidden()) {
continue;
}

View File

@ -1614,6 +1614,7 @@ class Session : public PBD::StatefulDestructible
void jack_timebase_callback (jack_transport_state_t, nframes_t, jack_position_t*, int);
int jack_sync_callback (jack_transport_state_t, jack_position_t*);
void reset_jack_connection (jack_client_t* jack);
void record_enable_change_all (bool yn);
XMLNode& state(bool);

View File

@ -138,6 +138,7 @@ class JACK_Slave : public Slave
bool ok() const;
nframes_t resolution() const { return 1; }
bool requires_seekahead () const { return false; }
void reset_client (jack_client_t* jack);
private:
jack_client_t* jack;

View File

@ -612,7 +612,16 @@ AudioDiskstream::process (nframes_t transport_frame, nframes_t nframes, nframes_
if (nominally_recording || rec_nframes) {
for (n = 0, chan = c->begin(); chan != c->end(); ++chan, ++n) {
uint32_t limit = _io->n_inputs ().get(DataType::AUDIO);
/* one or more ports could already have been removed from _io, but our
channel setup hasn't yet been updated. prevent us from trying to
use channels that correspond to missing ports. note that the
process callback (from which this is called) is always atomic
with respect to port removal/addition.
*/
for (n = 0, chan = c->begin(); chan != c->end() && n < limit; ++chan, ++n) {
ChannelInfo* chaninfo (*chan);

View File

@ -1137,6 +1137,7 @@ AudioEngine::reconnect_to_jack ()
if (session) {
session->reset_jack_connection (_jack);
nframes_t blocksize = jack_get_buffer_size (_jack);
session->set_block_size (blocksize);
session->set_frame_rate (jack_get_sample_rate (_jack));

View File

@ -44,6 +44,12 @@ JACK_Slave::~JACK_Slave ()
{
}
void
JACK_Slave::reset_client (jack_client_t* j)
{
jack = j;
}
bool
JACK_Slave::locked() const
{

File diff suppressed because it is too large Load Diff

View File

@ -1267,3 +1267,13 @@ Session::allow_auto_play (bool yn)
{
auto_play_legal = yn;
}
void
Session::reset_jack_connection (jack_client_t* jack)
{
JACK_Slave* js;
if (_slave && ((js = dynamic_cast<JACK_Slave*> (_slave)) != 0)) {
js->reset_client (jack);
}
}