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

FR: Make mission volume levels at mission start smarter #6291

Open
MjnMixael opened this issue Aug 12, 2024 · 2 comments
Open

FR: Make mission volume levels at mission start smarter #6291

MjnMixael opened this issue Aug 12, 2024 · 2 comments
Labels
enhancement A new feature or upgrade of an existing feature to add additional functionality. sound A feature or issue specific to music and sound

Comments

@MjnMixael
Copy link
Contributor

It'd be great if we could get the audio volumes to match any volume changes set via sexp at mission start. The reason is that, for example, if you want to start your mission with an and audio fade-in, you'd set the audio to 0 with a sexp on the first mission frame. However, that sexp doesn't actually run until the second frame and this causes the mission to start with an audible pop as the game plays 1 frame of audio and then cuts the volume as instructed by the sexp.

I have two ideas to address this:

1: Add to the mission post_process code that checks for the audio sexps and pre-sets the game volume to match. I'm not exactly sure if there's a good way to detect events that run on the first event-available frame, but if so, this might be the simplest approach.

2: Systemize the whole thing. Create some kind of way to mark certain sexps as pre-run sexps. Specifically add code to run these before frame 0. This could open all kinds of cans of worms.

3: Add to Mission Specs (or some other menu where it may make sense) volume sliders for the three volume controls. These sliders would be the 'default mission volumes' and would be set before the first in-mission frame. Overridable by SEXPs, of course. I'm not really in favor of adding a whole UI setup and code for this, but it's a fallback if option 1 or 2 is not really viable.

@TRBlount
Copy link
Contributor

Could you post an example? Event music is not supposed to start until 1 second after the player is in-mission, as set in event_music_set_start_delay(). This should be more than enough time for any sexps to set the initial volume.

@MjnMixael
Copy link
Contributor Author

MjnMixael commented Aug 17, 2024 via email

@wookieejedi wookieejedi added enhancement A new feature or upgrade of an existing feature to add additional functionality. sound A feature or issue specific to music and sound labels Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A new feature or upgrade of an existing feature to add additional functionality. sound A feature or issue specific to music and sound
Projects
None yet
Development

No branches or pull requests

3 participants