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

Expose AudioStreamPlayer{2D,3D}::set_playing and remove AudioStreamPlayer::{2D,3D}::_is_active #95375

Conversation

raulsntos
Copy link
Member

Alternative

Make the playing property read-only, so it has no setter and set_playing is not exposed. Users can use the already exposed play/stop methods instead. This would break compatibility in C#, and it's not technically doing the same thing as _set_playing does although I'm not familiar enough with the code to know if the differences here matter.

@Mickeon
Copy link
Contributor

Mickeon commented Aug 11, 2024

@raulsntos raulsntos force-pushed the gdextension/expose-property-accessors/AudioStreamPlayer branch 3 times, most recently from 8b40c50 to 3b4d17f Compare August 17, 2024 16:05
Copy link
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

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

Needs rebase.

@akien-mga akien-mga modified the milestones: 4.x, 4.4 Aug 30, 2024
…mPlayer::{2D,3D}::_is_active`

- The `_is_active` method seems to be unused, so it was removed.
- The `_set_playing` method is now exposed, as the setter of the `playing` property.
    - The `play` method can't be used as a setter because it takes a `float` parameter instead of a `bool` parameter.
@raulsntos raulsntos force-pushed the gdextension/expose-property-accessors/AudioStreamPlayer branch from 3b4d17f to 7fd261c Compare August 30, 2024 15:23
@akien-mga akien-mga merged commit 6cc0f55 into godotengine:master Aug 30, 2024
19 checks passed
@akien-mga
Copy link
Member

Thanks!

@raulsntos raulsntos deleted the gdextension/expose-property-accessors/AudioStreamPlayer branch August 30, 2024 23:07
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.

4 participants