Adding XRsound to a new vessel

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,708
Reaction score
2,683
Points
203
Location
Dallas, TX
So I am trying to get sound to play.

I made a cfg for the vessel and am trying to hard code this in.
this is contents of the XRSound-EAGLE3UACSPASS
# Door [animation_1] OpenCloseSoundID = 12002 MovingSoundID = 12003 PlaybackType = BothViewClose Opening = XRSound\MOONBASEALPHA\doorclose.wav IsDoor = 1
in the scenario:
Eagle3PassengerUACS:EAGLE3UACSPASS

But nothing in the XRsound log showing that vessel.

So hard coding.

Get me this:
Severity Code Description Project Path File Line Suppression State
Error LNK2001 unresolved external symbol "public: static class XRSound * __cdecl XRSound::CreateInstance(class VESSEL *)" (?CreateInstance@XRSound@@SAPAV1@PAVVESSEL@@@Z) Eagle3PassUACS D:\Orbiter2016\Orbitersdk\samples\EagleUACSpass D:\Orbiter2016\Orbitersdk\samples\EagleUACSpass\EAGLE3UACSPASS.obj 1


If I add the Xrsound libarys I get another error:
Severity Code Description Project Path File Line Suppression State
Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in attref.obj Eagle3PassUACS D:\Orbiter2016\Orbitersdk\samples\EagleUACSpass D:\Orbiter2016\Orbitersdk\samples\EagleUACSpass\XRSound.lib(XRSound.obj) 1
 

Attachments

  • xrsoundcode.jpg
    xrsoundcode.jpg
    69.3 KB · Views: 3

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,708
Reaction score
2,683
Points
203
Location
Dallas, TX
This is the XRSOUND log:
01.27.2024 21:51:06.743 - Parsing config file 'XRSound\XRSound.cfg'
01.27.2024 21:51:06.743 - Successfully parsed configuration file 'XRSound\XRSound.cfg'
01.27.2024 21:51:16.280 - Parsing config file 'XRSound\XRSound.cfg'
01.27.2024 21:51:16.280 - Successfully parsed configuration file 'XRSound\XRSound.cfg'
01.27.2024 21:51:21.076 - XRSound 2.00 (Build Date: Jul 3 2020) terminating.

And the scn:
BEGIN_DESC Current scenario state Contains the latest simulation state. END_DESC BEGIN_ENVIRONMENT System Sol Date MJD 51981.6028507557 Context SpaceX Help CurrentState_img END_ENVIRONMENT BEGIN_FOCUS Ship Eagle3PassengerUACS END_FOCUS BEGIN_CAMERA TARGET Eagle3PassengerUACS MODE Extern POS 4.000000 0.000000 0.000000 TRACKMODE TargetRelative FOV 60.00 END_CAMERA BEGIN_HUD TYPE Surface END_HUD BEGIN_MFD Left TYPE Surface SPDMODE 1 END_MFD BEGIN_MFD Right TYPE Launch NAV 0 END_MFD BEGIN_SHIPS Eagle3PassengerUACS:EAGLE3UACSPASS DOOR0 0 0.0000 DOOR1 0 0.0000 DOOR2 0 0.0000 DOOR3 0 0.0000 STATUS Landed Earth POS -80.6753180 28.5222530 HEADING 66.56 ALT 0.749 AROT 46.120 -60.997 17.075 AFCMODE 7 NAVFREQ 0 0 XPDR 468 END END_SHIPS BEGIN_Attachment Manager END
 

Attachments

  • XRSound-EAGLE3UACSPASS.txt
    5.2 KB · Views: 2

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,708
Reaction score
2,683
Points
203
Location
Dallas, TX
Not sure what is going on. I added logging on the config. I hear sounds from other vessels. But with this vessel no sounds at all
@dbeachy1
 

dbeachy1

O-F Administrator
Administrator
Orbiter Contributor
Addon Developer
Donator
Beta Tester
Joined
Jan 14, 2008
Messages
9,217
Reaction score
1,563
Points
203
Location
VA
Website
alteaaerospace.com
Preferred Pronouns
he/him
As a first step, please follow the steps detailed on page 8 of the XRSound User Manual -- it details exactly how to do this. It's important that you follow all the steps exactly, including enabling trace logging in XRSound during development and testing.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,708
Reaction score
2,683
Points
203
Location
Dallas, TX
So I followed the changes in the xrsound.cfg.
but when I run the scenario and do some animation. no sounds.
But the log shows no sound vessels.
01.29.2024 18:17:26.465 - Parsing config file 'XRSound\XRSound.cfg' 01.29.2024 18:17:26.466 - Successfully parsed configuration file 'XRSound\XRSound.cfg' 01.29.2024 18:17:40.033 - Parsing config file 'XRSound\XRSound.cfg' 01.29.2024 18:17:40.033 - Successfully parsed configuration file 'XRSound\XRSound.cfg' 01.29.2024 18:18:10.951 - XRSound 2.00 (Build Date: Jul 3 2020) terminating. 01.29.2024 18:20:17.978 - Parsing config file 'XRSound\XRSound.cfg' 01.29.2024 18:20:17.978 - Successfully parsed configuration file 'XRSound\XRSound.cfg' 01.29.2024 18:20:37.848 - XRSound 2.00 (Build Date: Jul 3 2020) terminating.
I created a UACS guy and hear sounds.
01.29.2024 18:26:56.779 - XRSound 2.00 (Build Date: Jul 3 2020) initialized using sound driver DirectSound8; irrKlang version = 1.6.0. XRSound UpdateInterval = 0.050 (20.0 updates per second) 01.29.2024 18:26:56.779 - [AstronautSPACE1999-FC1][class UACS\Astronauts\SPACE1999-FC] Using configuration file(s): XRSound\XRSound.cfg (no override found [XRSound\XRSound-UACS_Astronauts_SPACE1999-FC.cfg]) 01.29.2024 18:26:56.779 - Parsing config file 'XRSound\XRSound.cfg' 01.29.2024 18:26:56.779 - Successfully parsed configuration file 'XRSound\XRSound.cfg' 01.29.2024 18:26:56.780 - [AstronautSPACE1999-FC1][39.043] XRSoundEngine::LoadWav success
BEGIN_SHIPS Eagle3PassengerUACS:EAGLE3UACSPASS DOOR0 2 0.7430 DOOR1 0 0.0000 DOOR2 0 0.0000 DOOR3 0 0.0000 STATUS Landed Earth POS -80.6753180 28.5222530 HEADING 66.56 ALT 0.749 AROT 46.120 -60.997 17.075 AFCMODE 7 NAVFREQ 0 0 XPDR 468 END
 

Attachments

  • soundlog1.jpg
    soundlog1.jpg
    142.3 KB · Views: 0
  • soundlog2.jpg
    soundlog2.jpg
    25.8 KB · Views: 0

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,708
Reaction score
2,683
Points
203
Location
Dallas, TX
No clue why this vessel does not have sound. Nothing in the sound log.
I just copied the xrsound-deltaglider.cfg file and renamed it:
XRsound_Eagle3PassengerUACS.cfg

but don't hear any sounds.
I ran a delta glider scn and heard the noises. And add the eagle pass and no noises. and nothing in the log????
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,708
Reaction score
2,683
Points
203
Location
Dallas, TX
Should the cfg be the vessel name or Vessel class?

The reason I ask. Is I added this: Eagle3:EAGLE3UACS and even though no cfg I heard sounds?
log:
02.02.2024 05:12:29.629 - [Eagle3][50.046] >> LogVesselAnimations: [EAGLE3UACS][animation ID = 15, state = Closed]
02.02.2024 05:12:29.681 - [Eagle3][50.098] >> LogVesselAnimations: [EAGLE3UACS][animation ID = 15, state = Opening]
02.02.2024 05:12:29.732 - [Eagle3][50.150] >> LogVesselAnimations: [EAGLE3UACS][animation ID = 15, state = Moving]

But still no sounds for the Eaglepassenger
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,708
Reaction score
2,683
Points
203
Location
Dallas, TX
So confused. It the scenario is an EAgle3 and the passenger module.
I get sound on the Eagle but not the Passenger module.
But I open the door on the Passenger module NOT the eagle.
But the log looks like I am doing animation on the Eagle?
02.02.2024 16:59:24.849 - XRSoundDLL::GetXRSoundEngineInstance: creating new XRSoundEngine instance for vessel 'Eagle3' [class name 'EAGLE3UACS'], bInvokedByClientVessel = 0, dwThrusterCount = 32, bShouldHaveDefaultSounds = 1 02.02.2024 16:59:25.475 - [Eagle3][0.066] >> LogVesselAnimations: [EAGLE3UACS][animation ID = 15, state = Opening] 02.02.2024 16:59:25.475 - [Eagle3][0.066] XRSoundEngine::LoadWav success: [soundID = 11003, playbackType = Radio (5), filename = 'XRSound\Default\6.wav'] 02.02.2024 16:59:25.522 - [Eagle3][0.066] XRSoundEngine::PlayWav playing sound [soundID = 11003, playbackType = Radio (5), bLoop = 0, volume = 1.00, bPaused = 0, bEnabled = 1, filename = 'XRSound\Default\6.wav'] 02.02.2024 16:59:25.528 - [Eagle3][0.119] >> LogVesselAnimations: [EAGLE3UACS][animation ID = 15, state = Moving] 02.02.2024 16:59:49.429 - [Eagle3][24.020] >> LogVesselAnimations: [EAGLE3UACS][animation ID = 15, state = Closed] 02.02.2024 16:59:49.480 - [Eagle3][24.071] >> LogVesselAnimations: [EAGLE3UACS][animation ID = 15, state = Opening] 02.02.2024 16:59:49.531 - [Eagle3][24.123] >> LogVesselAnimations: [EAGLE3UACS][animation ID = 15, state = Moving] 02.02.2024 16:59:53.342 - XRSoundEngine::FreeResources: freeing XRSound engine resources for vessel 'Eagle3' 02.02.2024 16:59:53.342 - XRSound 2.00 (Build Date: Jul 3 2020) terminating.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,708
Reaction score
2,683
Points
203
Location
Dallas, TX
So confusing. I have no idea why some vessels have sound and some don't.
I loaded the MoonBase Alpha and no sounds but the UACS guys do. No mention of the MBA in the XRsound log. The 2 UACS guys are mentioned though
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,708
Reaction score
2,683
Points
203
Location
Dallas, TX
Now trying to hard code sound in. Follow the manual.
But I get this:
Severity Code Description Project Path File Line Suppression State
Error LNK2001 unresolved external symbol "public: static class XRSound * __cdecl XRSound::CreateInstance(class VESSEL *)" (?CreateInstance@XRSound@@SAPAV1@PAVVESSEL@@@Z) Eagle3PassUACS D:\Orbiter2016\Orbitersdk\samples\EagleUACSpass D:\Orbiter2016\Orbitersdk\samples\EagleUACSpass\EAGLE3UACSPASS.obj 1

void EAGLEPASSMODULE::clbkPostCreation(void) { //sound m_pXRSound = XRSound::CreateInstance(this); // create sound engine instance for this vessel //RequestLoad3DWaveMono(MOONBASEALPHA2ID, DOORCLOSE, "Sound\\Vessel\\MOONBASEALPHA\\doorclose.wav", BOTHVIEW_FADED_FAR, &_V(0, 0, 2)); m_pXRSound->LoadWav(DOORCLOSE, "XRSound\\MOONBASEALPHA\\doorclose.wav", XRSound::PlaybackType::BothViewFar);

and in the H:
#include "XRSound.h" ... XRSound* m_pXRSound;
 

dbeachy1

O-F Administrator
Administrator
Orbiter Contributor
Addon Developer
Donator
Beta Tester
Joined
Jan 14, 2008
Messages
9,217
Reaction score
1,563
Points
203
Location
VA
Website
alteaaerospace.com
Preferred Pronouns
he/him
Two points about this: first, regarding the configuration files approach, something is different between your vessel's XRSound configuration setup and what is detailed in the XRSound User Manual. Please follow all the steps in manual exactly, and compare your vessel's configuration setup to the default DeltaGlider's configuration setup to see what is different. Second, regarding the C++ linker error, that is a standard error when the linker settings in the vessel project are incorrect, so the linker can't find the XRSound library to link with. I recommend a good linker tutorial like this video -- once you understand what C++ linking does, you will know to solve errors like this and not have to guess about it. :)
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,708
Reaction score
2,683
Points
203
Location
Dallas, TX
Thanks. What I did on the cfg is took a delta glider one and renamed it to match the class.
 

dbeachy1

O-F Administrator
Administrator
Orbiter Contributor
Addon Developer
Donator
Beta Tester
Joined
Jan 14, 2008
Messages
9,217
Reaction score
1,563
Points
203
Location
VA
Website
alteaaerospace.com
Preferred Pronouns
he/him
That won't work because the animation IDs are vessel-specific. This is why it's vital to follow all the steps detailed in the XRSound User Manual exactly, including reading the trace logging for your vessel and updating its XRSound configuration file to match. You can't just copy the sound configuration file for the DeltaGlider and use it for another vessel. It's vital to understand what the config settings do and what the trace logging means first, and the XRSound User Manual details that.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,708
Reaction score
2,683
Points
203
Location
Dallas, TX
Ok. I will re look. I saw in the log the animation. So could one just remove any info regarding the animations. And watch the log and get the animation info
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,708
Reaction score
2,683
Points
203
Location
Dallas, TX
So I removed any of the cfg I made. And made changes to the log.

(If the file does not exist yet, copy an existing vessel’s cfg file as a template and then delete any existing settings in it before defining new ones.)

I hear no sounds until the astronaut is created.
02.05.2024 17:29:12.417 - Parsing config file 'XRSound\XRSound.cfg' 02.05.2024 17:29:12.417 - Successfully parsed configuration file 'XRSound\XRSound.cfg' 02.05.2024 17:29:32.361 - Parsing config file 'XRSound\XRSound.cfg' 02.05.2024 17:29:32.361 - Successfully parsed configuration file 'XRSound\XRSound.cfg' 02.05.2024 17:30:00.955 - ---------------------------------------------------------------------------- 02.05.2024 17:30:00.955 - XRSound 2.00 (Build Date: Jul 3 2020) initialized using sound driver DirectSound8; irrKlang version = 1.6.0. XRSound UpdateInterval = 0.050 (20.0 updates per second) 02.05.2024 17:30:00.955 - [AstronautSPACE19991][class UACS\Astronauts\SPACE1999] Using configuration file(s): XRSound\XRSound.cfg (no override found [XRSound\XRSound-UACS_Astronauts_SPACE1999.cfg]) 02.05.2024 17:30:00.955 - Parsing config file 'XRSound\XRSound.cfg' 02.05.2024 17:30:00.955 - Successfully parsed configuration file 'XRSound\XRSound.cfg' 02.05.2024 17:30:00.956 - [AstronautSPACE19991][27.946] XRSoundEngine::LoadWav success: [soundID = 10009, playbackType = InternalOnly (1), filename = 'XRSound\Default\SwitchOn1.wav'] 02.05.2024 17:30:00.956 - [AstronautSPACE19991][27.946] XRSoundEngine::LoadWav success: [soundID = 10010, playbackType = InternalOnly (1), filename = 'XRSound\Default\SwitchOff1.wav'] 02.05.2024 17:30:00.956 - [AstronautSPACE19991][27.946] XRSoundEngine::LoadWav success: [soundID = 10000, playbackType = InternalOnly (1), filename = 'XRSound\Default\Air Conditioning.wav'] 02.05.2024 17:30:00.956 - [AstronautSPACE19991][27.946] XRSoundEngine::LoadWav success: [soundID = 10001, playbackType = Wind (6), filename = 'XRSound\Default\Landed Wind.wav'] 02.05.2024 17:30:00.956 - [AstronautSPACE19991][27.946] XRSoundEngine::LoadWav success: [soundID = 10002, playbackType = Radio (5), filename = 'XRSound\Default\Welcome Aboard All Systems Nominal.wav'] 02.05.2024 17:30:00.956 - [AstronautSPACE19991][27.946] XRSoundEngine::AddDefaultSound INFO: default sound ID 10014 disabled via config file. 02.05.2024 17:30:00.956 - [AstronautSPACE19991][27.946] XRSoundEngine::LoadWav success: [soundID = 10032, playbackType = BothViewClose (4), filename = 'XRSound\Default\Wheelbrakes Noise.wav']

and scn:
BEGIN_SHIPS Eagle3PassengerUACS:EAGLE3UACSPASS DOOR0 1 1.0000 DOOR1 0 0.0000 DOOR2 0 0.0000 DOOR3 0 0.0000 STATUS Landed Earth POS -80.6753180 28.5222530 HEADING 66.56 ALT 0.749 AROT 46.120 -60.997 17.075 AFCMODE 7 NAVFREQ 0 0 XPDR 468 END AstronautJohnG1:UACS\Astronauts\SPACE1999 STATUS Landed Earth POS -80.6753017 28.5222200 HEADING 66.56 ALT 1.181 AROT 46.121 -60.995 17.074 RCSMODE 0 AFCMODE 7 PRPLEVEL 0:1.000000 1:0.999863 NAVFREQ 0 0 NAME JohnG ROLE Pilot MASS 70.000000 ALIVE 1 SUIT_ON 1 HUD_MODE 0 HEADLIGHT 0 END END_SHIPS

in the log the guy is mentioned as:
AstronautSPACE19991
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,708
Reaction score
2,683
Points
203
Location
Dallas, TX
I removed XRsound and made the changes to the log.
BUt the astronaut I get sound but the Eagle passenger module is not even mentioned in the log:
XRSound 2.00 (Build Date: Jul 3 2020) initialized using sound driver DirectSound8; irrKlang version = 1.6.0. XRSound UpdateInterval = 0.050 (20.0 updates per second)
02.05.2024 19:42:32.242 - [AstronautJohnG1][class UACS\Astronauts\SPACE1999] Using configuration file(s): XRSound\XRSound.cfg (no override found [XRSound\XRSound-UACS_Astronauts_SPACE1999.cfg])
02.05.2024 19:42:32.243 - Parsing config file 'XRSound\XRSound.cfg'
02.05.2024 19:42:32.243 - Successfully parsed configuration file 'XRSound\XRSound.cfg'
02.05.2024 19:42:32.243 - [AstronautJohnG1][0.010] XRSoundEngine::LoadWav success: [soundID = 10009, playbackType = InternalOnly (1), filename = 'XRSound\Default\SwitchOn1.wav']
02.05.2024 19:42:32.243 - [AstronautJohnG1][0.010] XRSoundEngine::LoadWav success: [soundID = 10010, playbackType = InternalOnly (1), filename = 'XRSound\Default\SwitchOff1.wav']
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,708
Reaction score
2,683
Points
203
Location
Dallas, TX
So I can't XRsound added into a vessel and can't get orbitersound5.0 into a vessel.
 
Top