Skip to content

fix(sound): boarding complete and welcome onboard announcements playing simultaneously#10598

Open
Ditoo29 wants to merge 2 commits intoflybywiresim:masterfrom
Ditoo29:fix-10549
Open

fix(sound): boarding complete and welcome onboard announcements playing simultaneously#10598
Ditoo29 wants to merge 2 commits intoflybywiresim:masterfrom
Ditoo29:fix-10549

Conversation

@Ditoo29
Copy link
Copy Markdown
Contributor

@Ditoo29 Ditoo29 commented Mar 18, 2026

Fixes #10549

Summary of Changes

Split the welcomeonboard and boardingcompleted announcements onto separate local variables (A32NX_SOUND_BOARDING_COMPLETE and A32NX_SOUND_WELCOME_ONBOARD) so they no longer trigger simultaneously. Added a delay timer in BoardingSounds that starts when boarding completes and fires the welcome announcement after 10 seconds, ensuring a natural gap between the two announcements. Works for both standard boarding and GSX boarding.

Screenshots (if necessary)

N/A - audio only change

References

Issue #10549 - reported that after sound system adjustments, boarding complete and welcome announcements play back to back with no gap.

Additional context

The fix is contained entirely in BoardingSounds, PayloadManager and the corresponding XML sound definition.

Discord username (if different from GitHub): dito29

Testing instructions

  1. Load the A32NX
  2. Set boarding rate to Instant, Fast or Real
  3. Start boarding and wait for it to complete
  4. Verify boardingcompleted announcement plays
  5. Verify welcomeonboard announcement plays ~10 seconds later
  6. Start a second boarding session without deboarding and verify welcome plays again
  7. Repeat with GSX enabled and verify both announcements behave correctly

@github-project-automation github-project-automation bot moved this to 🟡 Code Review: Ready for Review in Quality Assurance Mar 18, 2026
@Ditoo29 Ditoo29 changed the title fix(sound): boarding complete and welcome onboard announcements play … fix(sound): boarding complete and welcome onboard announcements playing simultaneously Mar 18, 2026
@BravoMike99 BravoMike99 added Needs Code Review A32NX Related to the A32NX aircraft labels Mar 21, 2026
@Ditoo29
Copy link
Copy Markdown
Contributor Author

Ditoo29 commented Mar 30, 2026

Hey @Benjozork just bumping this in case it got forgotten. Thanks :D

@Ditoo29
Copy link
Copy Markdown
Contributor Author

Ditoo29 commented Apr 5, 2026

@BravoMike99 sorry to ping you here, not sure what other developers do code reviews. Hopefully this isn't forgotten.

Copy link
Copy Markdown
Member

@Maximilian-Reuter Maximilian-Reuter left a comment

Choose a reason for hiding this comment

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

In general I feel like the logic of playing the welcome aboard should be all contained in BoardingSounds as it doesnt depend on any external factors but elapsed time from the boarding completed sound.

Not sure personally about the best way to deal with that as currently BoardingSounds doesnt have a concept of delta time. @Gurgel100 do you have ideas ?

self.pax_boarding = false;
self.pax_deboarding = false;
self.pax_complete = false;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

in my opinion, there needs to be another entry here for pax_welcome so it is also properly stopped when the other ones are.

Copy link
Copy Markdown
Contributor Author

@Ditoo29 Ditoo29 Apr 9, 2026

Choose a reason for hiding this comment

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

The pax_ambience isn't set to false here as well. As for how I have the logic for this welcome sound to play not sure if setting this to false here would break anything. Will dig deeper.

Comment thread fbw-common/src/wasm/systems/systems/src/payload/mod.rs
@github-project-automation github-project-automation bot moved this from 🟡 Code Review: Ready for Review to 🔴 Code Review: In progress in Quality Assurance Apr 9, 2026
…simultaneously (flybywiresim#10549)

- Split welcomeonboard onto separate SOUND_WELCOME_ONBOARD local variable
- Add delay timer in BoardingSounds to trigger welcome announcement after boarding complete
@Ditoo29 Ditoo29 force-pushed the fix-10549 branch 2 times, most recently from 4b0a283 to a1a95f0 Compare April 9, 2026 22:04
Comment on lines +733 to +741
pub fn update_welcome(&mut self, delta: Duration) {
if self.welcome_timer > Duration::ZERO && !self.pax_welcome {
self.welcome_timer += delta;
if self.welcome_timer >= Self::BOARDING_COMPLETE_WELCOME_DELAY {
self.pax_welcome = true;
self.welcome_timer = Duration::ZERO;
}
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What about using DelayedTrueLogicGate which essentially implements exactly this logic?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

See this is why I wanted a Rust expert to look at this! What are the best ways to get an UpdateContext to BoardingSounds ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since this function is ultimately called in the update function one could pass the UpdateContext there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A32NX Related to the A32NX aircraft Needs Code Review

Projects

Status: 🔴 Code Review: In progress

Development

Successfully merging this pull request may close these issues.

Anouncement Boarding completed and Welcome to close together

6 participants