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 AudioStreamMicrophone crash on scene-reload #97032

Merged
merged 1 commit into from
Sep 18, 2024
Merged

Fix AudioStreamMicrophone crash on scene-reload #97032

merged 1 commit into from
Sep 18, 2024

Conversation

lalitshankarchowdhury
Copy link
Contributor

Fix #96995: AudioStreamPlayer crashing when stream set to Microphone and autoplay is set to on.

@lalitshankarchowdhury lalitshankarchowdhury requested a review from a team as a code owner September 15, 2024 06:52
@Chaosus Chaosus added this to the 4.4 milestone Sep 15, 2024
@AThousandShips AThousandShips changed the title Fix #96995: AudioStreamMicrophone crash on scene-reload Fix AudioStreamMicrophone crash on scene-reload Sep 15, 2024
@AThousandShips AThousandShips added the cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release label Sep 15, 2024
@AThousandShips AThousandShips requested a review from a team September 15, 2024 07:51
Comment on lines +110 to +118
#define SAFE_RELEASE(memory) \
if ((memory) != nullptr) { \
(memory)->Release(); \
(memory) = nullptr; \
}

Copy link
Member

Choose a reason for hiding this comment

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

Are you sure this is the proper way to fix the error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This works because .Reset() is failing when ComPtr is NULL.

@AThousandShips

This comment was marked as resolved.

@akien-mga akien-mga merged commit 21134e1 into godotengine:master Sep 18, 2024
20 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release crash platform:windows topic:audio topic:porting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AudioStreamMicrophone crash on scene-reload
6 participants