[med-svn] [Git][med-team/libxdf][upstream] New upstream version 0.99+dfsg

Andreas Tille gitlab at salsa.debian.org
Thu Aug 1 13:16:16 BST 2019



Andreas Tille pushed to branch upstream at Debian Med / libxdf


Commits:
7fedceff by Andreas Tille at 2019-08-01T12:10:26Z
New upstream version 0.99+dfsg
- - - - -


2 changed files:

- README.md
- xdf.cpp


Changes:

=====================================
README.md
=====================================
@@ -84,4 +84,4 @@ SigViewer Online Repository is [here](repository/Updates.xml).
 
 ## <a name="support"></a>Support
 
-[Email author](mailto:yida.lin at outlook.com) or report a new [issue](https://github.com/Yida-Lin/libxdf/issues).
+[Email author](mailto:yl3842 at columbia.edu) or report a new [issue](https://github.com/Yida-Lin/libxdf/issues).


=====================================
xdf.cpp
=====================================
@@ -612,10 +612,7 @@ void Xdf::syncTimeStamps()
                 }
             }
 
-            if (this->streams[elem.second].clock_times[k] < elem.first.second)
-            {
-                elem.first.second += this->streams[elem.second].clock_values[k];
-            }
+            elem.first.second += this->streams[elem.second].clock_values[k]; // apply the last offset value to the timestamp; if there hasn't yet been an offset value take the first recorded one
         }
     }
 
@@ -832,14 +829,18 @@ void Xdf::findMajSR()
         }
     }
 
-    //search the srateMap to see which sample rate has the most channels
-    int index (std::distance(srateMap.begin(),
-                             std::max_element(srateMap.begin(),srateMap.end(),
-                                            [] (const std::pair<sampRate, numChannel> &largest,
-                                            const std::pair<sampRate, numChannel> &first)
-                                            { return largest.second < first.second; })));
-
-    majSR = srateMap[index].first; //the sample rate that has the most channels
+    if(srateMap.size() > 0){
+        //search the srateMap to see which sample rate has the most channels
+        int index (std::distance(srateMap.begin(),
+                                 std::max_element(srateMap.begin(),srateMap.end(),
+                                                [] (const std::pair<sampRate, numChannel> &largest,
+                                                const std::pair<sampRate, numChannel> &first)
+                                                { return largest.second < first.second; })));
+
+        majSR = srateMap[index].first; //the sample rate that has the most channels
+    } else {
+        majSR = 0; //if there are no streams with a fixed sample reate
+    }
 }
 
 void Xdf::calcTotalChannel()



View it on GitLab: https://salsa.debian.org/med-team/libxdf/commit/7fedceffeff66aced2cff5d8545ea71142d3fe18

-- 
View it on GitLab: https://salsa.debian.org/med-team/libxdf/commit/7fedceffeff66aced2cff5d8545ea71142d3fe18
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20190801/7fb68cda/attachment-0001.html>


More information about the debian-med-commit mailing list