comparison rdf/RDFFeatureWriter.cpp @ 1050:5ad98be7f635 cxx11

Merge
author Chris Cannam
date Tue, 10 Mar 2015 20:03:08 +0000
parents 26cf6d5251ec
children c8e291700c0e
comparison
equal deleted inserted replaced
1049:10055a284716 1050:5ad98be7f635
683 // the sample rate, window length and hop size from the 683 // the sample rate, window length and hop size from the
684 // transform 684 // transform
685 685
686 stream << "\n:feature_timeline_" << featureNumber << " a tl:DiscreteTimeLine .\n\n"; 686 stream << "\n:feature_timeline_" << featureNumber << " a tl:DiscreteTimeLine .\n\n";
687 687
688 float sampleRate; 688 sv_samplerate_t sampleRate;
689 int stepSize, blockSize; 689 int stepSize, blockSize;
690 690
691 // If the output is FixedSampleRate, we need to draw the 691 // If the output is FixedSampleRate, we need to draw the
692 // sample rate and step size from the output descriptor; 692 // sample rate and step size from the output descriptor;
693 // otherwise they come from the transform 693 // otherwise they come from the transform
750 750
751 RealTime startrt = transform.getStartTime(); 751 RealTime startrt = transform.getStartTime();
752 RealTime durationrt = transform.getDuration(); 752 RealTime durationrt = transform.getDuration();
753 753
754 sv_frame_t start = RealTime::realTime2Frame 754 sv_frame_t start = RealTime::realTime2Frame
755 (startrt, int(lrintf(sampleRate))) / stepSize; 755 (startrt, sampleRate) / stepSize;
756 sv_frame_t duration = RealTime::realTime2Frame 756 sv_frame_t duration = RealTime::realTime2Frame
757 (durationrt, int(lrintf(sampleRate))) / stepSize; 757 (durationrt, sampleRate) / stepSize;
758 758
759 if (start != 0) { 759 if (start != 0) {
760 stream << "\n tl:start \"" << start << "\"^^xsd:int ;"; 760 stream << "\n tl:start \"" << start << "\"^^xsd:int ;";
761 } 761 }
762 if (duration != 0) { 762 if (duration != 0) {