Problem OrbiterSound 4.0 PlayVesselWave fails, depending on whether an MFD has been up or not

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,164
Reaction score
658
Points
113
Hi,

I've come to a problem that is very strange (at least to me ;) ):

I have an MFD which calls
Code:
orbiterSoundId = ConnectToOrbiterSoundDLL(vessel->GetHandle());
in its constructor.

After some button pressing etc. a 'Play' method does basically something like this:
Code:
if (!IsPlaying(orbiterSoundId, wavNumber))
{
  RequestLoadVesselWave(orbiterSoundId, wavNumber,
    "Sound\\ComMFD\\icao\\ping.wav", INTERNAL_ONLY);
  PlayVesselWave(orbiterSoundId, wavNumber);
}
Everything works perfectly if the MFD is up on startup.
But when I start with no MFD up and select it at runtime [PWR],[SEL],..
PlayVesselWave() returns 0 (zero) a.k.a. FAIL

All return values of any other OrbiterSound calls are the same.

The OrbiterSound_Log.txt also does not reveal any further infos:

Working (MFD up on start):
Code:
********************************************************
OrbiterSound 4.0 (3D) Build Nov 20 2012 01:00
********************************************************

Orbiter version: 100830
Advanced OrbiterSound settings: (Edit: 'Sound/cfg/Editable_Advanced_Configuration.cfg')
-------------------------------
Primary buffer            22050hz 16bits  (default 22050/16)
DopplerFactor            1.00        (default 1.00)
VaccumAttenuationFactor        1.00        (default 1.00)
SoundDistanceFactor        1.00        (default 1.00)
MaxSoundProcessPerSecond    60        (default 60)
MaxAnimCheckPerFrame        10        (default 10)
PlayWhenOrbiterInBackground    false        (default false)
WriteInLogAllLoadedSound    false        (default false)
-------------------------------

Orbiter directory:  C:\Program Files (x86)\Orbiter\OrbiterSound40\
Listing planets winds and bases sounds:
  6 planet wind sound found
  4 bases sound found
Passed initModule - Ok
[COLOR="Lime"]Vessel STS-101 requested an ID, returned= 0 OK[/COLOR] 
Attempting RenderViewport initialisation...
Attempting GetStartValue initialisation...
Passed GetStartValue - Ok
Initialising directsound...
   Sound hardware capabilities: Driver is not certified.
   Maximum hardware mixing buffers: 1.
   Maximum hardware 3D buffers: 0. 
   Speaker configuration: stereo with wide (arc of 20 deg.) geometry  
   Attempt to create Primary buffer: 22050hz 16bits 3d: yes 
   3D primary buffer initialised OK
directsound initialised - OK
Passed RenderViewport - Ok
Attempting Mp3 initialisation...
M3U list found attempting loading it.
MP3 found in playlist =  1
Mp3 initialised - Ok
Focus changed attempting to load vessel wave
Info: Sound config found for class: Atlantis. 20 parameters set.
Focus changed load vessel wave - OK
Attempting to close viewport...
Attempting to kill DirectSound...
-------------------------------
Wav files Statistics:
---------------------
Nbr of wav loaded during simulation: 50
Nbr of wav re-used from memory: 0 (not loaded from disk so not counted in wav loaded)
Max nbr of wav in memory in same time: 45
Nbr of wav failed to load: 0
Nbr of wav not unloaded at exit: 0
------------------------------- 
DirectSound killed - OK
Passed CloseRenderViewport - Ok
Exited to Orbiter Launchpad - OK

Passed ExitModule - Ok
Not working (MFD instantiated at runtime):
Code:
********************************************************
OrbiterSound 4.0 (3D) Build Nov 20 2012 01:00
********************************************************

Orbiter version: 100830
Advanced OrbiterSound settings: (Edit: 'Sound/cfg/Editable_Advanced_Configuration.cfg')
-------------------------------
Primary buffer            22050hz 16bits  (default 22050/16)
DopplerFactor            1.00        (default 1.00)
VaccumAttenuationFactor        1.00        (default 1.00)
SoundDistanceFactor        1.00        (default 1.00)
MaxSoundProcessPerSecond    60        (default 60)
MaxAnimCheckPerFrame        10        (default 10)
PlayWhenOrbiterInBackground    false        (default false)
WriteInLogAllLoadedSound    false        (default false)
-------------------------------

Orbiter directory:  C:\Program Files (x86)\Orbiter\OrbiterSound40\
Listing planets winds and bases sounds:
  6 planet wind sound found
  4 bases sound found
Passed initModule - Ok
Attempting RenderViewport initialisation...
Attempting GetStartValue initialisation...
Passed GetStartValue - Ok
Initialising directsound...
   Sound hardware capabilities: Driver is not certified.
   Maximum hardware mixing buffers: 1.
   Maximum hardware 3D buffers: 0. 
   Speaker configuration: stereo with wide (arc of 20 deg.) geometry  
   Attempt to create Primary buffer: 22050hz 16bits 3d: yes 
   3D primary buffer initialised OK
directsound initialised - OK
Passed RenderViewport - Ok
Attempting Mp3 initialisation...
M3U list found attempting loading it.
MP3 found in playlist =  1
Mp3 initialised - Ok
Focus changed attempting to load vessel wave
Info: Sound config found for class: Atlantis. 20 parameters set.
Focus changed load vessel wave - OK
[COLOR="Lime"]Vessel STS-101 requested an ID, returned= 0 OK[/COLOR] 
Attempting to close viewport...
Attempting to kill DirectSound...
-------------------------------
Wav files Statistics:
---------------------
Nbr of wav loaded during simulation: 50
Nbr of wav re-used from memory: 0 (not loaded from disk so not counted in wav loaded)
Max nbr of wav in memory in same time: 45
Nbr of wav failed to load: 0
Nbr of wav not unloaded at exit: 0
------------------------------- 
DirectSound killed - OK
Passed CloseRenderViewport - Ok
Exited to Orbiter Launchpad - OK

Passed ExitModule - Ok
Can anyone giving me some hints?

I have also tried to call ConnectToOrbiterSoundDLL at some other times (InitModule, 1st opcPostStep, ...) but nothing changed that behaviour.
Also using PlayVesselRadioExclusiveWave instead of PlayVesselWave made no difference.
 
Last edited:
Back
Top