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

Toggling mute without hitching in UE5.3 #63

Open
mxbi opened this issue Feb 2, 2024 · 3 comments
Open

Toggling mute without hitching in UE5.3 #63

mxbi opened this issue Feb 2, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@mxbi
Copy link

mxbi commented Feb 2, 2024

Hi! Thank you for such an awesome plugin.

I want to implement push-to-talk functionality and so want to frequently mute and unmute a recording.
I initially used Start Capture and Stop Capture, but that caused hitching as described in https://github.com/gtreshchev/RuntimeSpeechRecognizer/wiki/6.-Minimizing-freezes#capturable-sound-wave.

Following that, I tried using Toggle Mute to improve performance, but the hitching persists. Looking at the source, it looks like for UE5.3, this is aliased back to Start/Stop Capture:

https://github.com/gtreshchev/RuntimeAudioImporter/blob/main/Source/RuntimeAudioImporter/Private/Sound/CapturableSoundWave.cpp#L172-L184

Is there any recommended way to do this for UE5.3+?

@gtreshchev gtreshchev added the bug Something isn't working label Feb 2, 2024
@gtreshchev
Copy link
Owner

Hi, thanks for the feedback :)

The ToggleMute function used to work in earlier engine versions, but starting from version 5.3, it no longer functions correctly and leads to crashes, especially on Windows (I assume this issue may occur on other platforms as well). To avoid crashes and make sure it always works correctly, I modified it to essentially be implemented as the StartCapture<->EndCapture starting from version 5.3.

For now, I'm not sure if it's possible to solve this in-place, so unfortunately it's on hold for now.

@q2a3z
Copy link

q2a3z commented Jul 5, 2024

@gtreshchev Sorry my amatuer response before.
I rellay appriceate your project, it easy to use and reliablity. Thank you so much.
But the ToggleMute in 5.3 is rellay annoying me.
I finally found the bug, and contrubite the code to EpicTeam.
If you had be the member of EpicGame , you can see it.
https://github.com/EpicGames/UnrealEngine/pull/12092
Briefly, they forgot to set the CaptureThread to nullptr when the thread stop.
When you call StartStream again will cause the check been Error.

So this issus only effect on Windows.
#70
If you have time you can check by yourself.
Thanks your wonderful pluing again.

@gtreshchev
Copy link
Owner

@gtreshchev Sorry my amatuer response before. I rellay appriceate your project, it easy to use and reliablity. Thank you so much. But the ToggleMute in 5.3 is rellay annoying me. I finally found the bug, and contrubite the code to EpicTeam. If you had be the member of EpicGame , you can see it. EpicGames/UnrealEngine#12092 Briefly, they forgot to set the CaptureThread to nullptr when the thread stop. When you call StartStream again will cause the check been Error.

So this issus only effect on Windows. #70 If you have time you can check by yourself. Thanks your wonderful pluing again.

Thank you! Hopefully Epic Games will review it before UE 5.5 release. Most PRs and bugs are reviewed for 1st party support and companies with UDN subscriptions, and the company is on break right now, so no one will look at that PR until a couple of weeks from now at the earliest, as Dannthr mentioned in Unreal Slackers (Source). We can just hope that the PR will be reviewed and merged soon :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants