diff options
author | Owen Williams <owilliams@mixxx.org> | 2015-03-29 14:52:21 -0400 |
---|---|---|
committer | Owen Williams <owilliams@mixxx.org> | 2015-03-29 14:52:21 -0400 |
commit | 657dfcd7eeef492296a1978cac1078b15cc32b17 (patch) | |
tree | 415afd69492eeb240c93e17cd91d3aa19198bac6 /src/vinylcontrol/vinylcontrolxwax.cpp | |
parent | f1167eb5470e0d41e9334f49d344449f6d68ff33 (diff) |
Fix vinyl control report not updating the angle
Diffstat (limited to 'src/vinylcontrol/vinylcontrolxwax.cpp')
-rw-r--r-- | src/vinylcontrol/vinylcontrolxwax.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/vinylcontrol/vinylcontrolxwax.cpp b/src/vinylcontrol/vinylcontrolxwax.cpp index 4d1bd0dc2f..046d9c0845 100644 --- a/src/vinylcontrol/vinylcontrolxwax.cpp +++ b/src/vinylcontrol/vinylcontrolxwax.cpp @@ -835,13 +835,13 @@ void VinylControlXwax::establishQuality(bool quality_sample) { } float VinylControlXwax::getAngle() { - double when; - float pos = timecoder_get_position(&timecoder, &when); + float pos = timecoder_get_position(&timecoder, NULL); - if (pos == -1) + if (pos == -1) { return -1.0; + } float rps = timecoder_revs_per_sec(&timecoder); - //invert angle to make vinyl spin direction correct - return 360 - ((int)(when * 360.0 * rps) % 360); + // Invert angle to make vinyl spin direction correct. + return 360 - (static_cast<int>(pos / 1000.0 * 360.0 * rps) % 360); } |