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

Improve sound event to allow for long sounds #2082

Open
Jowan-Spooner opened this issue Feb 9, 2024 · 1 comment
Open

Improve sound event to allow for long sounds #2082

Jowan-Spooner opened this issue Feb 9, 2024 · 1 comment
Labels
Enhance ⚡ Improve a feature's workflow. Feature✨
Milestone

Comments

@Jowan-Spooner
Copy link
Collaborator

The sound event is currently designed with short sounds in mind and this especially means:

  • There is no way of stopping sounds, not even stopping all sounds (stopping individual sounds would imply we can identify them somehow)
  • Sounds are not saved. If you have a long sound then it will NOT play after loading a save from a moment where the sound was still playing.
@Jowan-Spooner Jowan-Spooner added Feature✨ Enhance ⚡ Improve a feature's workflow. labels Feb 9, 2024
@Jowan-Spooner Jowan-Spooner added this to the Version 2.X milestone Feb 9, 2024
@Invertex
Copy link
Contributor

Invertex commented May 5, 2024

Perhaps a good solution would be to implement a string "reference name" field to the sound event, if set, the sound is stored in a Dictionary using that as the key (and if one with the same key already exists, replace it in the Dictionary and stop the old one to prevent conflicts, though might be good to warn users of duplicate keys in a Timeline).

When the sound finishes on its own it could remove itself from the Dictionary.

This way a StopSound [key] node could be used to stop playing an existing played sound. And the Dictionary could be stored in the save and processed on load to start playing any existing sounds in it.


Or alternatively, just use the sound file path as the key, avoiding any typing mistakes. User could click a checkbox for "Track playing sound", and then have a Stop Sound node that also has an audio file path input and stop stop any audio playing that file path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhance ⚡ Improve a feature's workflow. Feature✨
Projects
None yet
Development

No branches or pull requests

2 participants