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

Sdl audio fix #4468

Closed
wants to merge 7 commits into from
Closed

Sdl audio fix #4468

wants to merge 7 commits into from

Conversation

devnexen
Copy link
Contributor

@devnexen devnexen commented Jul 8, 2018

No description provided.

@Wallacoloo
Copy link
Member

After this patch, the left argument to qMin has type size_t, and the right is unsigned long. So this assumes size_t is the same type as unsigned long. You probably want to just cast both arguments to uint, since that's the type of the variable you're assigning this expression to.

Correct me if I'm wrong - C++ implicit conversions can be confusing.

@lukas-w @Reflexe why are m_currentBufferFramesCount and m_currentBufferFramePos typed as uint64_t? They're being used as indices into an array - one that's certainly not > 2^32 in size - so it looks to me like a machine-native int would make sense, or a size_t if you want the semantics of an index. Seems like using either of those types would simplify their use.

@devnexen
Copy link
Contributor Author

devnexen commented Jul 9, 2018

I caught up into OpenBSD so maybe my assumption was not wide enough. Maybe just changing the types to those to size_t would really fix it and we can close this PR then.

@lukas-w
Copy link
Member

lukas-w commented Jul 9, 2018

This fix is already part of #4439 (fixed by changing the type to size_t), see https://github.com/LMMS/lmms/pull/4439/files#diff-e74d39cfad524614724dbb924124ffe6. I hope you don't mind me closing this PR in favour of it. Thank you anyway @devnexen and sorry for the doubled work. There's been no objection to #4438 and #4439 and the changes are relatively small so I think I'll merge them soon.

@lukas-w lukas-w closed this Jul 9, 2018
@devnexen
Copy link
Contributor Author

devnexen commented Jul 9, 2018

No problem at all as long it s fixed thx !

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