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

Add configurable stop mode #73

Merged
merged 4 commits into from
Aug 17, 2024
Merged

Add configurable stop mode #73

merged 4 commits into from
Aug 17, 2024

Conversation

GitGhillie
Copy link
Collaborator

@GitGhillie GitGhillie commented Mar 6, 2024

Partial solution to #72 as it would now be possible to configure a new sound with stop_mode = None. Then you could despawn the entity immediately and the sound would play until the end.

Maybe a better solution would be to create a new enum instead of the Option<StopMode>. That way we can give it a more appropriate name and avoid the necessity for users to import libfmod::StopMode. LMK

@GitGhillie
Copy link
Collaborator Author

Another, more simple solution would be to just remove self.event_instance.stop(Immediate).unwrap(); from the Drop implementation, and then leave it up to the user to call stop() or not before despawning an entity.

# Conflicts:
#	src/components/audio_source.rs
#	src/components/bundles.rs
* Refactor AudioSource to allow stop_mode configuration

* Refactor AudioSource to allow stop_mode configuration

* Update examples to new API

* Remove overcomplicated builder

* Remove StopMode defaults
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.

2 participants