summaryrefslogtreecommitdiff
path: root/tools
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 /tools
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 'tools')
-rw-r--r--tools/bb/bb.cc4
-rw-r--r--tools/omf/omftool.cc18
-rw-r--r--tools/omf/omftool.h2
-rw-r--r--tools/sftest.cc4
4 files changed, 14 insertions, 14 deletions
diff --git a/tools/bb/bb.cc b/tools/bb/bb.cc
index 472edb19c5..cfeca9a7af 100644
--- a/tools/bb/bb.cc
+++ b/tools/bb/bb.cc
@@ -178,13 +178,13 @@ BeatBox::process (int nsamples)
clear_pending = false;
}
- framepos_t last_output_time = 0;
+ samplepos_t last_output_time = 0;
for (Events::iterator ee = _current_events.begin(); ee != _current_events.end(); ++ee) {
Event* e = (*ee);
if (e->size && (e->time >= process_start && e->time < process_end)) {
- framepos_t sample_offset_in_buffer = superclock_to_samples (offset + e->time - process_start, _sample_rate);
+ samplepos_t sample_offset_in_buffer = superclock_to_samples (offset + e->time - process_start, _sample_rate);
if ((buffer = jack_midi_event_reserve (out_buf, sample_offset_in_buffer, e->size)) != 0) {
memcpy (buffer, e->buf, e->size);
outbound_tracker.track (e->buf);
diff --git a/tools/omf/omftool.cc b/tools/omf/omftool.cc
index 68fc6bd83c..fc207fb6ce 100644
--- a/tools/omf/omftool.cc
+++ b/tools/omf/omftool.cc
@@ -68,7 +68,7 @@ OMF::OMF ()
session_name = "omfsession";
base_dir = ".";
sample_rate = 0;
- frame_rate = 0;
+ sample_rate = 0;
version = 3000;
db = 0;
file = 0;
@@ -675,15 +675,15 @@ OMF::create_xml ()
fread(&num, 4, 1, file);
num = e32(num);
INFO ("Rate = %d / %d\n", num, denom);
- if (frame_rate == 0) {
- frame_rate = (double) num / (double) denom;
+ if (sample_rate == 0) {
+ sample_rate = (double) num / (double) denom;
}
if (sample_rate == 0) {
sample_rate = denom;
}
} else {
INFO ("OMF file is missing frame rate information for track %d\n", i);
- frame_rate = 0.04; // 25FPS
+ sample_rate = 0.04; // 25FPS
if (sample_rate == 0) {
sample_rate = 44100;
}
@@ -706,7 +706,7 @@ OMF::create_xml ()
char **len;
int lenCount;
double length = 0.0;
- int lenFrames = 0;
+ int lenSamples = 0;
region = 0;
@@ -728,8 +728,8 @@ OMF::create_xml ()
continue;
}
- lenFrames = atoi(len[1]);
- length = lenFrames * frame_rate;
+ lenSamples = atoi(len[1]);
+ length = lenSamples * sample_rate;
if (!strcmp(type[1], "TRAN")) {
@@ -837,7 +837,7 @@ OMF::create_xml ()
region->add_property ("position", sbuf);
snprintf (sbuf, sizeof (sbuf), "%" PRId64, llrintf (length * sample_rate));
region->add_property ("length", sbuf);
- snprintf (sbuf, sizeof (sbuf), "%" PRId64, llrintf (start * frame_rate * sample_rate));
+ snprintf (sbuf, sizeof (sbuf), "%" PRId64, llrintf (start * sample_rate * sample_rate));
region->add_property ("start", sbuf);
set_region_sources (region, sinfo);
@@ -913,7 +913,7 @@ OMF::create_xml ()
region->add_property ("position", sbuf);
snprintf (sbuf, sizeof (sbuf), "%" PRId64, llrintf (length * sample_rate));
region->add_property ("length", sbuf);
- snprintf (sbuf, sizeof (sbuf), "%" PRId64, llrintf (start * frame_rate * sample_rate));
+ snprintf (sbuf, sizeof (sbuf), "%" PRId64, llrintf (start * sample_rate * sample_rate));
region->add_property ("start", sbuf);
set_region_sources (region, sinfo);
diff --git a/tools/omf/omftool.h b/tools/omf/omftool.h
index 9f16aec94f..f33bb5cb77 100644
--- a/tools/omf/omftool.h
+++ b/tools/omf/omftool.h
@@ -43,7 +43,7 @@ private:
std::string session_name;
std::vector<std::string> audiofile_path_vector;
int sample_rate; /* audio samples per second */
- double frame_rate; /* time per video frame */
+ double sample_rate; /* time per video frame */
XMLNode* session;
XMLNode* sources;
XMLNode* routes;
diff --git a/tools/sftest.cc b/tools/sftest.cc
index 0823277c60..aa9412cfa0 100644
--- a/tools/sftest.cc
+++ b/tools/sftest.cc
@@ -252,7 +252,7 @@ main (int argc, char* argv[])
cout << " all used " << (direct ? "without" : "with") << " OS buffer cache";
#endif
cout << endl;
- cout << "Format is " << suffix << ' ' << channels << " channel" << (channels > 1 ? "s" : "") << " written in chunks of " << block_size << " frames, synced ? " << (with_sync ? "yes" : "no") << endl;
+ cout << "Format is " << suffix << ' ' << channels << " channel" << (channels > 1 ? "s" : "") << " written in chunks of " << block_size << " samples, synced ? " << (with_sync ? "yes" : "no") << endl;
}
data = new float[block_size*channels];
@@ -286,7 +286,7 @@ main (int argc, char* argv[])
min_bandwidth = min (min_bandwidth, bandwidth);
if (!quiet) {
- cout << "BW @ " << written << " frames (" << ds.str() << " minutes) = " << (bandwidth/1048576.0) << " MB/sec " << bandwidth / data_rate << " x faster than necessary " << endl;
+ cout << "BW @ " << written << " samples (" << ds.str() << " minutes) = " << (bandwidth/1048576.0) << " MB/sec " << bandwidth / data_rate << " x faster than necessary " << endl;
}
}