diff options
author | Carl Hetherington <carl@carlh.net> | 2011-11-04 17:52:12 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-11-04 17:52:12 +0000 |
commit | fd2aea103790a1f49211f3bec7e9cdc246762e77 (patch) | |
tree | a30f2386ffecfa5ce4529fa25c24a8357098c359 /gtk2_ardour/midi_region_view.cc | |
parent | 07eadf68f342e289ca33a564a50f8f3af09996e3 (diff) |
Remove non-RT-safe alloc in the MIDI process() call.
git-svn-id: svn://localhost/ardour2/branches/3.0@10441 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/midi_region_view.cc')
-rw-r--r-- | gtk2_ardour/midi_region_view.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index fcab483287..0f30c35733 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -305,7 +305,7 @@ MidiRegionView::connect_to_diskstream () { midi_view()->midi_track()->DataRecorded.connect( *this, invalidator(*this), - ui_bind(&MidiRegionView::data_recorded, this, _1, _2), + ui_bind(&MidiRegionView::data_recorded, this, _1), gui_context()); } @@ -3525,11 +3525,10 @@ MidiRegionView::set_step_edit_cursor_width (Evoral::MusicalTime beats) } /** Called when a diskstream on our track has received some data. Update the view, if applicable. - * @param buf Data that has been recorded. - * @param w Source that this data will end up in. + * @param w Source that the data will end up in. */ void -MidiRegionView::data_recorded (boost::shared_ptr<MidiBuffer> buf, boost::weak_ptr<MidiSource> w) +MidiRegionView::data_recorded (boost::weak_ptr<MidiSource> w) { if (!_active_notes) { /* we aren't actively being recorded to */ @@ -3543,6 +3542,9 @@ MidiRegionView::data_recorded (boost::shared_ptr<MidiBuffer> buf, boost::weak_pt } MidiTimeAxisView* mtv = dynamic_cast<MidiTimeAxisView*> (&trackview); + + boost::shared_ptr<MidiBuffer> buf = mtv->midi_track()->get_gui_feed_buffer (); + BeatsFramesConverter converter (trackview.session()->tempo_map(), mtv->midi_track()->get_capture_start_frame (0)); framepos_t back = max_framepos; |