Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop Waveforms: Lp1740403 #1547

Merged
merged 8 commits into from
Mar 17, 2018
Merged

Stop Waveforms: Lp1740403 #1547

merged 8 commits into from
Mar 17, 2018

Conversation

daschuer
Copy link
Member

This PR is the "easy" part from #1446

Fixing the endless moving waveforms https://bugs.launchpad.net/mixxx/+bug/1740403

@@ -7,6 +7,13 @@
#include "util/math.h"
#include "waveform/vsyncthread.h"

namespace {
constexpr int kMaxOffsetRange = 2; // The offset is limited to two callback sizes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not obvious what unit of measurement applies here and why this constant is multiplied by 1000 at the two places where it is actually used.

@uklotzde
Copy link
Contributor

Good idea to separate unrelated issues, much easier to review.

Just one finding that should be fixed before we are ready to merge.

@daschuer
Copy link
Member Author

Thank you for pushing me to better code. I had thought about it as well, but I was to lazy ;-)
... Done

paintText(tr("Finalizing .."), &painter);
} else if (!m_trackLoaded) {
// This happens if the track samples are not loaded, but we have
// a cashed track
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

€€€ :)
cashed -> cached


private:
ControlValueAtomic<VisualPlayPositionData> m_data;
ControlProxy* m_audioBufferSize;
double m_dAudioBufferSize; // Audio buffer size in ms
double m_dAudioBufferUs; // Audio buffer size in µs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Us" is very confusing, used here as both a suffix and a prefix. Legacy code, I know. The code would be easier to read if we consequently explicitly append "Millis" and "Micros" as a suffix for all durations that are used here. With this convention even the trivial constant kMicrosPerMilli would be obsolete, because then the factor 1000 is obvious and even more concise.

Labelling a duration as "size" is misleading too, but let's just keep it consistent ;)

@daschuer
Copy link
Member Author

Done.

@uklotzde
Copy link
Contributor

This small change has improved the readability a lot 👍 And it also prevents mistakes and misunderstandings in the future.

@uklotzde
Copy link
Contributor

LGTM

@uklotzde uklotzde merged commit 4b66ca9 into mixxxdj:2.1 Mar 17, 2018
@daschuer daschuer deleted the lp1740403 branch September 26, 2021 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants