diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2017-09-18 12:39:17 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2017-09-18 12:39:17 -0400 |
commit | 30b087ab3d28f1585987fa3f6ae006562ae192e3 (patch) | |
tree | 620ae0250b5d77f90a18f8c2b83be61e4fe7b0b5 /tools/omf/omftool.cc | |
parent | cb956e3e480716a3efd280a5287bdd7bee1cedc5 (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/omf/omftool.cc')
-rw-r--r-- | tools/omf/omftool.cc | 18 |
1 files changed, 9 insertions, 9 deletions
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); |