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:[email protected]) or report a new [issue](https://github.com/Yida-Lin/libxdf/issues). +[Email author](mailto:[email protected]) 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.
_______________________________________________ debian-med-commit mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-commit
