13
0

Replace some more "samples" with "frames" (rectangles)

This commit is contained in:
Robin Gareus 2019-04-09 00:31:29 +02:00
parent 01a43c6b1e
commit eb4e854a56
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
5 changed files with 19 additions and 19 deletions

View File

@ -485,7 +485,7 @@ MidiRegionView::leave_internal()
_grabbed_keyboard = false;
}
// Raise sample handles above notes so they catch events
// Raise frame handles above notes so they catch events
if (frame_handle_start) {
frame_handle_start->raise_to_top();
}

View File

@ -203,7 +203,7 @@ RegionView::~RegionView ()
delete *i;
}
drop_silent_samples ();
drop_silent_frames ();
delete editor;
}
@ -218,12 +218,12 @@ RegionView::canvas_group_event (GdkEvent* event)
}
void
RegionView::set_silent_samples (const AudioIntervalResult& silences, double /*threshold*/)
RegionView::set_silent_frames (const AudioIntervalResult& silences, double /*threshold*/)
{
samplecnt_t shortest = max_samplecnt;
/* remove old silent samples */
drop_silent_samples ();
drop_silent_frames ();
if (silences.empty()) {
return;
@ -235,7 +235,7 @@ RegionView::set_silent_samples (const AudioIntervalResult& silences, double /*th
ArdourCanvas::Rectangle* cr = new ArdourCanvas::Rectangle (group);
cr->set_ignore_events (true);
_silent_samples.push_back (cr);
_silent_frames.push_back (cr);
/* coordinates for the rect are relative to the regionview origin */
@ -319,21 +319,21 @@ RegionView::set_silent_samples (const AudioIntervalResult& silences, double /*th
}
void
RegionView::hide_silent_samples ()
RegionView::hide_silent_frames ()
{
for (list<ArdourCanvas::Rectangle*>::iterator i = _silent_samples.begin (); i != _silent_samples.end (); ++i) {
for (list<ArdourCanvas::Rectangle*>::iterator i = _silent_frames.begin (); i != _silent_frames.end (); ++i) {
(*i)->hide ();
}
_silence_text->hide();
}
void
RegionView::drop_silent_samples ()
RegionView::drop_silent_frames ()
{
for (list<ArdourCanvas::Rectangle*>::iterator i = _silent_samples.begin (); i != _silent_samples.end (); ++i) {
for (list<ArdourCanvas::Rectangle*>::iterator i = _silent_frames.begin (); i != _silent_frames.end (); ++i) {
delete *i;
}
_silent_samples.clear ();
_silent_frames.clear ();
delete _silence_text;
_silence_text = 0;
@ -742,7 +742,7 @@ RegionView::set_height (double h)
(*i)->set_y1 (h + 1);
}
for (list<ArdourCanvas::Rectangle*>::iterator i = _silent_samples.begin(); i != _silent_samples.end(); ++i) {
for (list<ArdourCanvas::Rectangle*>::iterator i = _silent_frames.begin(); i != _silent_frames.end(); ++i) {
(*i)->set_y1 (h + 1);
}

View File

@ -116,9 +116,9 @@ public:
void move_contents (ARDOUR::sampleoffset_t);
virtual void thaw_after_trim ();
void set_silent_samples (const ARDOUR::AudioIntervalResult&, double threshold);
void drop_silent_samples ();
void hide_silent_samples ();
void set_silent_frames (const ARDOUR::AudioIntervalResult&, double threshold);
void drop_silent_frames ();
void hide_silent_frames ();
struct PositionOrder {
bool operator()(const RegionView* a, const RegionView* b) {
@ -188,7 +188,7 @@ protected:
/** a list of rectangles used to show silent segments
*/
std::list<ArdourCanvas::Rectangle*> _silent_samples;
std::list<ArdourCanvas::Rectangle*> _silent_frames;
/** a list of rectangles used to show the current silence threshold
*/
std::list<ArdourCanvas::Rectangle*> _silent_threshold_samples;

View File

@ -176,7 +176,7 @@ StripSilenceDialog::drop_rects ()
_lock.unlock ();
for (list<ViewInterval>::iterator v = views.begin(); v != views.end(); ++v) {
v->view->drop_silent_samples ();
v->view->drop_silent_frames ();
}
cancel_button->set_sensitive (false);
@ -223,7 +223,7 @@ StripSilenceDialog::update_silence_rects ()
double const y = _threshold.get_value();
for (list<ViewInterval>::iterator v = views.begin(); v != views.end(); ++v) {
v->view->set_silent_samples (v->intervals, y);
v->view->set_silent_frames (v->intervals, y);
}
}

View File

@ -224,8 +224,8 @@ protected:
ArdourCanvas::Rectangle* name_highlight;
/* with these two values, if frame_handle_start == 0 then frame_handle_end will also be 0 */
ArdourCanvas::Rectangle* frame_handle_start; ///< `sample' (fade) handle for the start of the item, or 0
ArdourCanvas::Rectangle* frame_handle_end; ///< `sample' (fade) handle for the end of the item, or 0
ArdourCanvas::Rectangle* frame_handle_start; ///< `frame' (fade) handle for the start of the item, or 0
ArdourCanvas::Rectangle* frame_handle_end; ///< `frame' (fade) handle for the end of the item, or 0
bool frame_handle_crossing (GdkEvent*, ArdourCanvas::Rectangle*);