summaryrefslogtreecommitdiff
path: root/session_utils
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2017-09-18 12:39:17 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2017-09-18 12:39:17 -0400
commit30b087ab3d28f1585987fa3f6ae006562ae192e3 (patch)
tree620ae0250b5d77f90a18f8c2b83be61e4fe7b0b5 /session_utils
parentcb956e3e480716a3efd280a5287bdd7bee1cedc5 (diff)
globally change all use of "frame" to refer to audio into "sample".
Generated by tools/f2s. Some hand-editing will be required in a few places to fix up comments related to timecode and video in order to keep the legible
Diffstat (limited to 'session_utils')
-rw-r--r--session_utils/export.cc14
-rw-r--r--session_utils/fix_bbtppq.cc12
2 files changed, 13 insertions, 13 deletions
diff --git a/session_utils/export.cc b/session_utils/export.cc
index eae41fced8..5b89434cb6 100644
--- a/session_utils/export.cc
+++ b/session_utils/export.cc
@@ -90,13 +90,13 @@ static int export_session (Session *session,
" <Start>"
" <Trim enabled=\"false\"/>"
" <Add enabled=\"false\">"
-" <Duration format=\"Timecode\" hours=\"0\" minutes=\"0\" seconds=\"0\" frames=\"0\"/>"
+" <Duration format=\"Timecode\" hours=\"0\" minutes=\"0\" seconds=\"0\" samples=\"0\"/>"
" </Add>"
" </Start>"
" <End>"
" <Trim enabled=\"false\"/>"
" <Add enabled=\"false\">"
-" <Duration format=\"Timecode\" hours=\"0\" minutes=\"0\" seconds=\"0\" frames=\"0\"/>"
+" <Duration format=\"Timecode\" hours=\"0\" minutes=\"0\" seconds=\"0\" samples=\"0\"/>"
" </Add>"
" </End>"
" </Silence>"
@@ -107,9 +107,9 @@ static int export_session (Session *session,
boost::shared_ptr<ExportFormatSpecification> fmp = session->get_export_handler()->add_format(*tree.root());
/* set up range */
- framepos_t start, end;
- start = session->current_start_frame();
- end = session->current_end_frame();
+ samplepos_t start, end;
+ start = session->current_start_sample();
+ end = session->current_end_sample();
tsp->set_range (start, end);
tsp->set_range_id ("session");
@@ -172,7 +172,7 @@ static int export_session (Session *session,
printf ("* Normalizing %.1f%% \r", 100. * progress); fflush (stdout);
break;
case ExportStatus::Exporting:
- progress = ((float) status->processed_frames_current_timespan) / status->total_frames_current_timespan;
+ progress = ((float) status->processed_samples_current_timespan) / status->total_samples_current_timespan;
printf ("* Exporting Audio %.1f%% \r", 100. * progress); fflush (stdout);
break;
default:
@@ -310,7 +310,7 @@ int main (int argc, char* argv[])
s = SessionUtils::load_session (argv[optind], argv[optind+1]);
if (settings._samplerate == 0) {
- settings._samplerate = s->nominal_frame_rate ();
+ settings._samplerate = s->nominal_sample_rate ();
}
export_session (s, outfile, settings);
diff --git a/session_utils/fix_bbtppq.cc b/session_utils/fix_bbtppq.cc
index a5842ac700..443c1317c1 100644
--- a/session_utils/fix_bbtppq.cc
+++ b/session_utils/fix_bbtppq.cc
@@ -119,7 +119,7 @@ ensure_per_region_source (Session* session, boost::shared_ptr<MidiRegion> region
} else {
newsrc = boost::dynamic_pointer_cast<MidiSource>(
SourceFactory::createWritable(DataType::MIDI, *session,
- newsrc_path, false, session->frame_rate()));
+ newsrc_path, false, session->sample_rate()));
if (!newsrc) {
cout << UTILNAME << ":" << endl
@@ -174,7 +174,7 @@ ensure_per_source_source (Session* session, boost::shared_ptr<MidiRegion> region
newsrc = boost::dynamic_pointer_cast<MidiSource>(
SourceFactory::createWritable(DataType::MIDI, *session,
- newsrc_path, false, session->frame_rate()));
+ newsrc_path, false, session->sample_rate()));
if (!newsrc) {
cout << UTILNAME << ":" << endl
<<" An error occurred creating writeable source " << newsrc_path << " exiting." << endl;
@@ -211,8 +211,8 @@ reset_start (Session* session, boost::shared_ptr<MidiRegion> region)
/* force a change to start and start_beats */
PositionLockStyle old_pls = region->position_lock_style();
region->set_position_lock_style (AudioTime);
- region->set_start (tmap.frame_at_quarter_note (region->quarter_note()) - tmap.frame_at_quarter_note (region->quarter_note() - new_start_qn) + 1);
- region->set_start (tmap.frame_at_quarter_note (region->quarter_note()) - tmap.frame_at_quarter_note (region->quarter_note() - new_start_qn));
+ region->set_start (tmap.sample_at_quarter_note (region->quarter_note()) - tmap.sample_at_quarter_note (region->quarter_note() - new_start_qn) + 1);
+ region->set_start (tmap.sample_at_quarter_note (region->quarter_note()) - tmap.sample_at_quarter_note (region->quarter_note() - new_start_qn));
region->set_position_lock_style (old_pls);
}
@@ -228,8 +228,8 @@ reset_length (Session* session, boost::shared_ptr<MidiRegion> region)
/* force a change to length and length_beats */
PositionLockStyle old_pls = region->position_lock_style();
region->set_position_lock_style (AudioTime);
- region->set_length (tmap.frame_at_quarter_note (region->quarter_note() + new_length_qn) + 1 - region->position(), 0);
- region->set_length (tmap.frame_at_quarter_note (region->quarter_note() + new_length_qn)- region->position(), 0);
+ region->set_length (tmap.sample_at_quarter_note (region->quarter_note() + new_length_qn) + 1 - region->position(), 0);
+ region->set_length (tmap.sample_at_quarter_note (region->quarter_note() + new_length_qn)- region->position(), 0);
region->set_position_lock_style (old_pls);
}