Mercurial > hg > multitrack-audio-matcher
diff src/AudioEventMatcher.cpp @ 22:24c413f0f2c5
rescue mechanism added
author | Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk> |
---|---|
date | Sun, 12 Feb 2012 22:25:14 +0000 |
parents | 604add81822f |
children | bc113cd60a2f |
line wrap: on
line diff
--- a/src/AudioEventMatcher.cpp Sun Feb 12 01:07:45 2012 +0000 +++ b/src/AudioEventMatcher.cpp Sun Feb 12 22:25:14 2012 +0000 @@ -149,7 +149,7 @@ void AudioEventMatcher::setSpeedRatioDistribution(const double& speedRatio){ bayesianStruct.relativeSpeedPosterior.zero(); bayesianStruct.relativeSpeedPosterior.addToIndex(bayesianStruct.relativeSpeedPosterior.getRealTermsAsIndex(speedRatio), 1); - bayesianStruct.relativeSpeedPosterior.addGaussianShapeFromRealTime(1, 0.06, 0.5); + bayesianStruct.relativeSpeedPosterior.addGaussianShapeFromRealTime(1, 0.06, 0.8); } void AudioEventMatcher::stopPlaying(){ @@ -157,6 +157,13 @@ temporal.printEventTimes(); } +void AudioEventMatcher::rescue(){ + bayesianStruct.posterior.zero(); + bayesianStruct.posterior.addConstant(1); + bayesianStruct.prior.zero(); + bayesianStruct.prior.addConstant(1); +} + void AudioEventMatcher::updatePosition(){ if (startedPlaying){