X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fapatchgui.C;h=59d18244c34260c9f4d26a1874f86bc22234d112;hb=a1ac06b20d3f74749b612998908e70fbac7f48ab;hp=f46e4ab7390d6426e0f7d7c007e373abd6292784;hpb=7fd85fb66168f6b518c5f2d73e04036e87faa0e1;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/apatchgui.C b/cinelerra-5.1/cinelerra/apatchgui.C index f46e4ab7..59d18244 100644 --- a/cinelerra-5.1/cinelerra/apatchgui.C +++ b/cinelerra-5.1/cinelerra/apatchgui.C @@ -104,9 +104,9 @@ int APatchGUI::update(int x, int y) FloatAuto *previous = 0, *next = 0; double unit_position = mwindow->edl->local_session->get_selectionstart(1); unit_position = mwindow->edl->align_to_frame(unit_position, 0); - unit_position = atrack->to_units(unit_position, 0); + int64_t unit_pos = atrack->to_units(unit_position, 0); FloatAutos *ptr = (FloatAutos*)atrack->automation->autos[AUTOMATION_FADE]; - float value = ptr->get_value((long)unit_position, PLAY_FORWARD, previous, next); + float value = ptr->get_value(unit_pos, PLAY_FORWARD, previous, next); fade->update(fade->get_w(), value, mwindow->edl->local_session->automation_mins[AUTOGROUPTYPE_AUDIO_FADE], mwindow->edl->local_session->automation_maxs[AUTOGROUPTYPE_AUDIO_FADE]); @@ -115,7 +115,7 @@ int APatchGUI::update(int x, int y) else if( h >= y2 ) { float v = mwindow->get_float_auto(this, AUTOMATION_FADE)->get_value(); patchbay->add_subwindow(fade = new AFadePatch(this, x1+x, y1+y, - patchbay->get_w() - 10, v)); + patchbay->get_w() - xS(10), v)); } y1 = y2; @@ -162,11 +162,11 @@ int APatchGUI::update(int x, int y) } else if( h >= y2 ) { patchbay->add_subwindow(mix = new AMixPatch(mwindow, this, x1+x, y1+y+5)); - x1 += mix->get_w() + 10; + x1 += mix->get_w() + xS(10); patchbay->add_subwindow(pan = new APanPatch(mwindow, this, x1+x, y1+y)); - x1 += pan->get_w() + 20; + x1 += pan->get_w() + xS(20); patchbay->add_subwindow(nudge = new NudgePatch(mwindow, this, x1+x, y1+y, - patchbay->get_w() - x1-x - 10)); + patchbay->get_w() - x1-x - xS(10))); } y1 = y2; @@ -188,7 +188,7 @@ void APatchGUI::update_faders(float v) float change = v - current->get_value(); current->set_value(v); - if( track->gang && track->record ) + if( track->is_ganged() && track->is_armed() ) patchbay->synchronize_faders(change, TRACK_AUDIO, track); mwindow->undo->update_undo_after(_("fade"), LOAD_AUTOMATION); change_source = 0; @@ -221,7 +221,7 @@ int AFadePatch::handle_event() } AKeyFadePatch::AKeyFadePatch(MWindow *mwindow, APatchGUI *patch, int x, int y) - : BC_SubWindow(x,y, 200,20, GWindowGUI::auto_colors[AUTOMATION_FADE]) + : BC_SubWindow(x,y, xS(200),yS(20), GWindowGUI::auto_colors[AUTOMATION_FADE]) { this->mwindow = mwindow; this->patch = patch; @@ -231,7 +231,7 @@ void AKeyFadePatch::create_objects() { int x = 0, y = 0; float v = mwindow->get_float_auto(patch, AUTOMATION_FADE)->get_value(); - add_subwindow(akey_fade_text = new AKeyFadeText(this, x, y, 64, v)); + add_subwindow(akey_fade_text = new AKeyFadeText(this, x, y, xS(64), v)); x += akey_fade_text->get_w(); VFrame **lok_images = mwindow->theme->get_image_set("lok"); int w1 = get_w() - x - lok_images[0]->get_w(); @@ -345,14 +345,13 @@ int AKeyPanPatch::handle_event() AMeterPatch::AMeterPatch(MWindow *mwindow, APatchGUI *patch, int x, int y) - : BC_Meter(x, y, METER_HORIZ, patch->patchbay->get_w() - 10, + : BC_Meter(x, y, METER_HORIZ, patch->patchbay->get_w() - xS(10), mwindow->edl->session->min_meter_db, mwindow->edl->session->max_meter_db, mwindow->edl->session->meter_format, 0, -1) { this->mwindow = mwindow; this->patch = patch; - set_delays(TRACKING_RATE * 10, - TRACKING_RATE); + set_delays(TRACKING_RATE * 10, TRACKING_RATE); } int AMeterPatch::button_press_event()