Problem XRSound configuration file question about docking sounds

jacquesmomo

Addon Developer
Addon Developer
Joined
Jun 14, 2008
Messages
811
Reaction score
860
Points
108
Location
FRANCE
Website
francophone.dansteph.com
Hi :salute:

I'd like to understand something about docking sounds with XRSound...

I was trying to customize the docking/undocking sounds for my vessel, but I only have the "undocking" sound.
I woul like to use this (in my ship's XRSound configuration file) :

[SOUND_FILES]
#--------------------------------------------------------------------------
# Sound played right when the ship attaches to a docking port.
# Sound ID = 10028
# Default = XRSound\Default\Docking.wav
#--------------------------------------------------------------------------
Docking = XRSound\Default\Docking.wav # does not work

#--------------------------------------------------------------------------
# Callout played just after the ship attaches to a docking port.
# Sound ID = 10029
# Default = XRSound\Default\Contact.wav
#--------------------------------------------------------------------------
DockingCallout = XRSound\Default\Contact.wav # does not work

#--------------------------------------------------------------------------
# Sound played right as the ship undocks.
# Sound ID = 10030
# Default = XRSound\Default\Undocking.wav
#--------------------------------------------------------------------------
Undocking = XRSound\Default\Undocking.wav # does not work

#--------------------------------------------------------------------------
# Callout played just after the 'Undocking' sound.
# Sound ID = 10031
# Default = XRSound\Default\Undocking Confirmed.wav
#--------------------------------------------------------------------------
UndockingCallout = XRSound\Default\Undocking Confirmed.wav # the only one that is played


But I realized that Orbiter/XRSound didn't use those lines, but these ones :

[SOUND_GROUPS]
#--------------------------------------------------------------------------
# Folder containing docking distance callouts, in meters. Filename baenames
# (distances) are the same as AltitudeCalloutsGroup uses.
#
# Sound ID = 11004
# Default = XRSound\Default
#--------------------------------------------------------------------------
DockingDistanceCalloutsGroup = XRSound\Default

Is it possible to have the Docking/Undocking and Docking Callout sounds? And if so, how?

And if not, why not? :unsure:
 
This behavior is normal with XRSound in some cases.

The sounds:

Docking (10028)
DockingCallout (10029)
Undocking (10030)
UndockingCallout (10031)

are only played when XRSound explicitly detects a ship docking/undocking event.

If your ship is a custom addon, several factors can prevent them from triggering:

The ship must correctly use the Orbiter docking ports (CreateDock, etc.).
XRSound must be initialized for the ship via its SDK or standard interface.
Some docking events performed by script, scenario, or custom code may not generate the expected sound.

Undocking is often detected more accurately than docking, which explains why only UndockingCallout works.

Regarding:

[SOUND_GROUPS]
DockingDistanceCalloutsGroup = XRSound\Default

This is not related to the docking sound itself.

This entry is used solely for distance announcements:

100
50
20
10
5
Contact

which are heard during the approach to the docking port.

For example:

"100 meters"
"50 meters"
"20 meters"
"10 meters"
"5 meters"
"Contact"

The Contact.wav file for the distance group is often played when the two ports make contact, which can give the impression that it's the official docking sound.

To verify if XRSound is actually loading your files, check:

Orbiter.log

or

XRSound.log

after the ship loads. You should see lines like this:

Loading sound: Docking
Loading sound: DockingCallout
Loading sound: Undocking
Loading sound: UndockingCallout

Another possibility is that your ship is inheriting the sounds from the default profile and that the custom .cfg file isn't the one actually used by XRSound.

Can you tell me:

the version of Orbiter (2010, 2016, or 2024);
the version of XRSound;
if your ship is a custom C++ addon or an existing addon;

and show the exact name of your ship's XRSound configuration file?

With this information, I can tell you precisely why Undocking Confirmed.wav is playing while Docking.wav and Contact.wav are not.

2016 2024

If you're using Orbiter 2016 and Orbiter 2024, there's a significant difference:

XRSound was originally developed for Orbiter 2016.
In Orbiter 2024, it works, but some events are more dependent on how the ship implements its docking ports and the XRSound interface.

What's puzzling me in your case is that:

Undocking Confirmed.wav plays.

Docking.wav and Contact.wav do not.

This suggests that XRSound is correctly loading your configuration file, but the "dock successful" event isn't being detected or generated for this ship. We know that XRSound explicitly monitors docking ports, and there have been issues related to ships lacking a valid port or not exposing it as expected.

For a custom C++ addon, I would check:

CreateDock(...)

and also that docking is performed using Orbiter's standard mechanism and not by:

SetDockStatus(...)

or manually repositioning the ship.

Another interesting point: in the XRSound documentation, IDs 10028 to 10031 do exist and are recognized as default sounds.

Docking // 10028
DockingCallout // 10029
Undocking // 10030
UndockingCallout // 10031
 
Back
Top