Skip to content

Commit

Permalink
it has some glitch sound. trying various experiments(minimum differen…
Browse files Browse the repository at this point in the history
…ce & differential check)
  • Loading branch information
designe committed Mar 15, 2020
1 parent e49226c commit 23732a8
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -88,7 +88,7 @@ public short[] makeFrequencyWithCP(int freq) {
double val = Math.sin(x * ((double)i / mSampleRate));// - mCpLastTheta;
double cos = Math.cos(x * ((double)i / mSampleRate));// - mCpLastTheta;
if(minVal > Math.abs(Math.sin(mCpLastTheta) - val)){
if(Math.signum(cos) == Math.signum(mCpLastTheta)) {
if(Math.signum(cos) == Math.signum(Math.cos(mCpLastTheta))) {
minVal = Math.abs(Math.sin(mCpLastTheta) - val);
minValIdx = i;
}
Expand Down

0 comments on commit 23732a8

Please sign in to comment.