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

FIX(positional-audio): Fix Source Engine plugin not working on Windows #6245

Conversation

davidebeatrici
Copy link
Member

@davidebeatrici davidebeatrici commented Oct 22, 2023

The bug was introduced in #4536.

It was only reported last year and because of a side effect: consistent lag for the entire application.
That's something that should be dealt with independently.

@davidebeatrici davidebeatrici linked an issue Oct 22, 2023 that may be closed by this pull request
@davidebeatrici davidebeatrici force-pushed the positional-audio-plugin-source-engine-windows-fix branch from 8482bbd to 555de98 Compare October 22, 2023 23:03
Copy link
Member

@Krzmbrzl Krzmbrzl left a comment

Choose a reason for hiding this comment

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

Lol - that's an easy fix ^^

Copy link
Member

@Hartmnt Hartmnt left a comment

Choose a reason for hiding this comment

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

Is there any reason in particular why you chose to zero initialize the bool in the windows case instead of constexpr bool isWin32 = false? Just curious

@Krzmbrzl
Copy link
Member

Right.... An explicit initialization to false might be better.

@davidebeatrici
Copy link
Member Author

Is there any reason in particular why you chose to zero initialize the bool in the windows case instead of constexpr bool isWin32 = false? Just curious

The lack of constexpr is due to the codebase sticking to C++11 at the time.

Right.... An explicit initialization to false might be better.

You mean in the Linux case? I didn't do that to emphasize that we rely on the value that is set later, through HostLinux::isWine().

@Hartmnt
Copy link
Member

Hartmnt commented Oct 23, 2023

You mean in the Linux case? I didn't do that to emphasize that we rely on the value that is set later, through HostLinux::isWine().

ah that makes total sense

@Krzmbrzl
Copy link
Member

You mean in the Linux case? I didn't do that to emphasize that we rely on the value that is set later, through HostLinux::isWine().

Not sure this really emphasizes something. Generally, uninitialized variables are only a source of bugs - now or in the future. I think for bool we should be save, but explicit initialization shouldn't hurt either way...

@davidebeatrici
Copy link
Member Author

Consider that global variables are always initialized to zero though.

@Krzmbrzl
Copy link
Member

Yeah, but the initialization rules in C++ are finicky and thus I think it's better to always be explicit.

The bug was introduced in 13cbf72.

It was only reported last year and because of a side effect: consistent lag for the entire application.
That's something that should be dealt with independently.
@davidebeatrici davidebeatrici force-pushed the positional-audio-plugin-source-engine-windows-fix branch from 555de98 to c912a41 Compare October 23, 2023 20:51
@davidebeatrici
Copy link
Member Author

Done.

@Krzmbrzl
Copy link
Member

Feel free to merge

@davidebeatrici davidebeatrici merged commit 1adbe6d into mumble-voip:master Oct 24, 2023
@davidebeatrici davidebeatrici deleted the positional-audio-plugin-source-engine-windows-fix branch October 24, 2023 17:35
@Krzmbrzl
Copy link
Member

💚 All backports created successfully

Status Branch Result
1.5.x

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

davidebeatrici added a commit that referenced this pull request Oct 25, 2023
…Source Engine plugin not working on Windows" to 1.5.x
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.

Mumble lags uncontrollably when playing L4D2
3 participants