Skip to content

Commit

Permalink
Merge pull request #1378 from xaviliz/framebuffer
Browse files Browse the repository at this point in the history
Framebuffer - Issue in PitchYINFFT when no peaks are detected.
  • Loading branch information
dbogdanov committed Sep 26, 2023
2 parents 5b378d8 + ee31729 commit 6e16631
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/algorithms/tonal/pitchyinfft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,9 @@ void PitchYinFFT::compute() {
yinMin = -_amplitudes[0];
}
else {
// TODO this should never happen, but some people reported it happening in their real time applications.
throw EssentiaException("PitchYinFFT: it appears that no peaks were found by PeakDetection. If you read this message, PLEASE, report this issue to the developers with an example of audio on which it happened.");
tau = 0.0; // it will provide zero-pitch and zero-pitch confidence.
// launch warning message for user feedbacking
E_WARNING("PitchYinFFT: it appears that no peaks were found by PeakDetection algorithm. So, pitch and confidence will be set to zero.");
}
}
else {
Expand Down

0 comments on commit 6e16631

Please sign in to comment.