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

Scalers: Replace the unneded flushing code with silence passing #11152

Merged
merged 8 commits into from
Jun 6, 2023

Conversation

daschuer
Copy link
Member

This is a leftover form an earlier version of the engine, that is no longer needed. If this assumption is wrong the engine would have used old samples left in the buffer In. We now assert for this condition and clear the buffer if the assumption is wrong.

@github-actions github-actions bot added the skins label Dec 23, 2022
@daschuer daschuer changed the base branch from main to 2.3 December 23, 2022 09:30
@daschuer
Copy link
Member Author

This does not fix a bug, but is a foundation for another pending bug with different offsets of different sound touch versions.

@daschuer
Copy link
Member Author

Done

@daschuer daschuer requested a review from Swiftb0y April 9, 2023 10:35
@Swiftb0y
Copy link
Member

Swiftb0y commented Apr 9, 2023

I'm sorry, I currently don't have the time to dig into the code enough to confidently reason about the changes. Someone else has to take over.

@daschuer daschuer added this to the 2.3.6 milestone May 7, 2023
Copy link
Member

@ronso0 ronso0 left a comment

Choose a reason for hiding this comment

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

Note this is not a code review, I just wanted to know if this PR maybe fixes #11381 and hit some DEBUG_ASSERT while moving the loop and seeking in the track.

@ronso0
Copy link
Member

ronso0 commented May 16, 2023

I made cca2396 on top of this, which fixes #11381.

edit but unfortunately playhead offsets after loopmove still occur with tracks shorter than ~5s -- while it now works perfectly with any track longer than that.

@ronso0
Copy link
Member

ronso0 commented May 25, 2023

I made cca2396 on top of this, which fixes #11381.

I polished that commit and opened daschuer#88
Please take a look.

buffer scalers: consider getNextSamples() returning 0 after loop move
@daschuer
Copy link
Member Author

It took me a while to find time to verify your findings. It looks very good now. Thank you.
I think it is read to merge.

@ronso0 ronso0 linked an issue May 30, 2023 that may be closed by this pull request
SampleUtil::clear(
m_buffer_back,
getOutputSignal().frames2samples(iLenFramesRequired));
deinterleaveAndProcess(m_buffer_back, iLenFramesRequired);
Copy link
Member

Choose a reason for hiding this comment

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

I didn't fully understand all scaler methods: do we need a break; here?

Copy link
Member Author

Choose a reason for hiding this comment

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

No break, because we nee to continue the loop until we have received all samples.

@ronso0
Copy link
Member

ronso0 commented May 30, 2023

Adjusting a comment faa1f6c

@daschuer
Copy link
Member Author

daschuer commented Jun 1, 2023

Done

@ronso0
Copy link
Member

ronso0 commented Jun 2, 2023

Code LGTM, no regressions spotted, test pass, a bug fixed.
If no one objects I'll merge this in a few days @mixxxdj/developers

(yet I'm hesitant because this touches a sensitive part of the engine, I'm not 100% sure I overlook all consequneces tbh, also this contains a few commits by me)

@ronso0
Copy link
Member

ronso0 commented Jun 6, 2023

Alright then... Thanks @daschuer!

@ronso0 ronso0 merged commit 582e12c into mixxxdj:2.3 Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Beatjumping a Loop looses sync
3 participants