diff rdf/generator/template-generator.cpp @ 168:006a775133b1

* Re-do the way the v2 structure (with durations) is returned. I bungled backward compatibility -- I failed to spot the contiguous array returned from process()... duh. Also bump library versions.
author cannam
date Thu, 24 Jul 2008 16:50:11 +0000
parents 64709b340651
children 27cfae2a4155
line wrap: on
line diff
--- a/rdf/generator/template-generator.cpp	Thu Jul 17 08:52:26 2008 +0000
+++ b/rdf/generator/template-generator.cpp	Thu Jul 24 16:50:11 2008 +0000
@@ -186,11 +186,17 @@
     //TrackLevelOutput
 
 
-    //SparseOutput: variable sample rate. Events are not evenly spaced so we need to record the time associated with the event as it its not ensured that we have an event after the next one (but there is not time to set the duration, it has to be calculated as the different between 2 different events). The timestamp must be read.
+    // SparseOutput: variable sample rate. Events are not evenly
+    // spaced so we need to record the time associated with the event
+    // as it its not ensured that we have an event after the next one
+    // (but there is not time to set the duration, it has to be
+    // calculated as the different between 2 different events). The
+    // timestamp must be read.
 
     string res;
 
-    if (o.sampleType == Plugin::OutputDescriptor::VariableSampleRate)
+    if (o.sampleType == Plugin::OutputDescriptor::VariableSampleRate ||
+        !o.hasFixedBinCount)
     {
 
         res=\