Skip to content

Commit

Permalink
fixed bug in lookbehind
Browse files Browse the repository at this point in the history
  • Loading branch information
cdstouter committed May 5, 2017
1 parent dc11f76 commit ef7e901
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ int main(int argc, char **argv) {
int numBlocks = 0;
// lookbehind
for (int j=1; j<=lookBehind; j++) {
int64_t pos = i - j;
int64_t pos = (int64_t)i - (int64_t)j;
if (pos < 0) break;
float dB = rmsBlocks[pos];
if (dB > minDb) {
Expand All @@ -267,7 +267,7 @@ int main(int argc, char **argv) {
}
// lookahead
for (int j=0; j<=lookAhead; j++) {
int64_t pos = i + j;
int64_t pos = (int64_t)i + (int64_t)j;
if (pos >= (int64_t)rmsBlocks.size()) break;
float dB = rmsBlocks[pos];
if (dB > minDb) {
Expand Down
2 changes: 1 addition & 1 deletion version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
#define VERSION_HPP

#define STEADYSOUND_MAJOR_VERSION 1
#define STEADYSOUND_MINOR_VERSION 2
#define STEADYSOUND_MINOR_VERSION 3

#endif

0 comments on commit ef7e901

Please sign in to comment.