X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Ftempo_dialog.cc;h=cca9e6f7c5a3fc6e2602697a272e45bd6f651f94;hb=ccc5467bcaef73fdabafc5c4b01e8762798f9ac2;hp=71fd5b40b41ed4cacd00d578b08914da1eb92c56;hpb=c2da4ec8f988f6f8b9e426b03222a2c687c72edb;p=ardour.git diff --git a/gtk2_ardour/tempo_dialog.cc b/gtk2_ardour/tempo_dialog.cc index 71fd5b40b4..cca9e6f7c5 100644 --- a/gtk2_ardour/tempo_dialog.cc +++ b/gtk2_ardour/tempo_dialog.cc @@ -33,7 +33,7 @@ using namespace Gtkmm2ext; using namespace ARDOUR; using namespace PBD; -TempoDialog::TempoDialog (TempoMap& map, nframes_t frame, const string & action) +TempoDialog::TempoDialog (TempoMap& map, framepos_t frame, const string & action) : ArdourDialog (_("New Tempo")), bpm_adjustment (60.0, 1.0, 999.9, 0.1, 1.0), bpm_spinner (bpm_adjustment), @@ -42,7 +42,7 @@ TempoDialog::TempoDialog (TempoMap& map, nframes_t frame, const string & action) when_bar_label (_("bar:"), ALIGN_LEFT, ALIGN_CENTER), when_beat_label (_("beat:"), ALIGN_LEFT, ALIGN_CENTER) { - BBT_Time when; + Timecode::BBT_Time when; Tempo tempo (map.tempo_at (frame)); map.bbt_time (frame, when); @@ -62,7 +62,7 @@ TempoDialog::TempoDialog (TempoSection& section, const string & action) } void -TempoDialog::init (const BBT_Time& when, double bpm, double note_type, bool movable) +TempoDialog::init (const Timecode::BBT_Time& when, double bpm, double note_type, bool movable) { bpm_spinner.set_numeric (true); bpm_spinner.set_digits (2); @@ -189,7 +189,7 @@ TempoDialog::get_bpm () } bool -TempoDialog::get_bbt_time (BBT_Time& requested) +TempoDialog::get_bbt_time (Timecode::BBT_Time& requested) { if (sscanf (when_bar_entry.get_text().c_str(), "%" PRIu32, &requested.bars) != 1) { return false; @@ -239,12 +239,12 @@ TempoDialog::note_types_change () } -MeterDialog::MeterDialog (TempoMap& map, nframes_t frame, const string & action) +MeterDialog::MeterDialog (TempoMap& map, framepos_t frame, const string & action) : ArdourDialog ("New Meter"), ok_button (action), cancel_button (_("Cancel")) { - BBT_Time when; + Timecode::BBT_Time when; frame = map.round_to_bar(frame,0); Meter meter (map.meter_at(frame)); @@ -261,7 +261,7 @@ MeterDialog::MeterDialog (MeterSection& section, const string & action) } void -MeterDialog::init (const BBT_Time& when, double bpb, double note_type, bool movable) +MeterDialog::init (const Timecode::BBT_Time& when, double bpb, double note_type, bool movable) { snprintf (buf, sizeof (buf), "%.2f", bpb); bpb_entry.set_text (buf); @@ -447,9 +447,8 @@ MeterDialog::get_note_type () } bool -MeterDialog::get_bbt_time (BBT_Time& requested) +MeterDialog::get_bbt_time (Timecode::BBT_Time& requested) { - if (sscanf (when_bar_entry.get_text().c_str(), "%" PRIu32, &requested.bars) != 1) { return false; }