Meadville Space Center
Welcome, Guest. Please login or register.
August 17, 2019, 04:00:08 PM

Login with username, password and session length
Search:     Advanced search
Welcome to the new Meadville Space Center forums!
25068 Posts in 2094 Topics by 2266 Members
Latest Member: twa517
* Home Help Search Login Register
+  Meadville Space Center
|-+  Project Apollo - NASSP
| |-+  Project Apollo - NASSP Development
| | |-+  Sounds (Moderators: movieman, lassombra)
| | | |-+  Concerning OrbiterSound 4.0
« previous next »
Pages: [1] Print
Author Topic: Concerning OrbiterSound 4.0  (Read 4686 times)
eddievhfan1984
Hero Member
*****
Posts: 737



View Profile
« on: March 09, 2013, 03:58:34 AM »

Since updating my version of OrbiterSound, I've found that changing the references in the VS Solution files don't result in a compilable solution. This may be due to 4.0 embracing a 3D sound engine; will require further investigation. I'll take a look at the manual and keep y'all updated. Happy

EDIT: Here's the fix.

Under the Project Apollo source code folder, go to src_sys/soundlibrary.cpp. In the file, you'll find the OrbiterSound function calls (like StartVesselWave3). Delete the numbers at the end of the function calls—those are SDK version numbers which have now been deprecated in 4.0. Coupled with the change in include lines and linker options, that should do the trick. This will make the project as it currently stands 4.0 compatible. However, if we want to take advantage of the new 3D sound engine, we may have to do some recoding. Who knows?

NEW EDIT: The SoundOptionOnOff function now takes three arguments, not two. From the 4.0 SDK header file:
Quote
///////////////////////////////////////////////
// SoundOptionOnOff
// -----------------
// With this function you can put ON/OFF every sound
// in OrbiterSound the same way SOUNDCONFIG.EXE does
// but in a temporary manner and only for your ship.
// (start soundconfig.exe to test the sound related to each option so you have an idea what it does)
//
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// !!!! YOU CAN DO THAT NOW BY CONFIGURATION FILE WHICH IS MAYBE MORE PRACTICALL   !!!!
// !!!! YOU CAN ALSO SET DEFAUT SOUND 3D POSITION IN CONFIGURATION FILES         !!!!
// !!!! SEE Sound/_CustomVesselSounds FOLDER                              !!!!
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//
// PARAMETERS:
// -----------
// MyID   : The number returned by ConnectToOrbiterSoundDLL
// Option : Keyword as defined below:
//
// PLAYCOUNTDOWNWHENTAKEOFF         // The countdown of Apollo 11 when you take-off
// PLAYWHENATTITUDEMODECHANGE      // Play "rotation" "linear" sound when you change mode
// PLAYGPWS                     // The GPWS sound
// PLAYMAINTHRUST               // Main thrust sound
// PLAYHOVERTHRUST               // The hover thrust sound
// PLAYATTITUDETHRUST            // The attitude thrust sound
// PLAYDOCKINGSOUND               // The docking sound and radio
// PLAYRADARBIP                  // The radar bip when near another vessel
// PLAYWINDAIRSPEED               // The wind airspeed when atmosphere
// PLAYDOCKLANDCLEARANCE         // The landing clearance
// PLAYLANDINGANDGROUNDSOUND      // Rolling, landing, speedbrake, crash sound
// PLAYCABINAIRCONDITIONING         // Play the air conditionning sound
// PLAYCABINRANDOMAMBIANCE         // Play the random pump and rumble sound
// PLAYWINDAMBIANCEWHENLANDED      // Play the wind sound when landed
// PLAYRADIOATC                  // Play the atc radio sound
// DISPLAYTIMER                  // Display the timer text when you take-off
// DISABLEAUTOPILOTWHENTIMEWARP      // The auto-disable of pilot if you time warp
// ALLOWRADIOBLACKOUT            // Allow the radio blackout when reentry
// MUTEORBITERSOUND               // Mute all the orbiter sound
// PLAYRETROTHRUST               // --- NEW OrbiterSound 4.0
// PLAYUSERTHRUST               // --- NEW OrbiterSound 4.0
// PLAYWINDCOCKPITOPEN            // --- NEW OrbiterSound 4.0 if TRUE play planet wind and base sound even in internal view.
// PLAYREENTRYAIRSPEED            // --- NEW OrbiterSound 4.0 the reentry sound, see demo scenario "reentry sound"
//
// Status:   TRUE if you want to allow the sound
//         FALSE if you want to disable it (sound stops immediately when you call it)
//
// RETURN
// ------
//  FALSE if the connection to orbitersound's dll failed
//  or the keyword used is false
//
// EXAMPLES OF CALLING:
// --------------------
//  SoundOptionOnOff(MyID,PLAYMAINTHRUST,FALSE)   // Disable the main thrust sound in orbitersound
//  SoundOptionOnOff(MyID,PLAYGPWS,TRUE)      // Enable the GPWS sound in OrbiterSound
///////////////////////////////////////////////////////////////////////
BOOL SoundOptionOnOff(int MyID,int Option, BOOL Status=TRUE);
Quote
///////////////////////////////////////////////////
// ConnectToOrbiterSoundDLL
// -------------------------
// This must be called previous to any other OrbiterSound call
// You must call this in your "clbkPostCreation" (new version of "ovcPostCreation" which is now obsolete)
// You must keep in your class the ID it returns and provide it to all other functions.
//
// PARAMETER:
// ----------
// Obj    : The Vessel handle using this : MySoundID=ConnectToOrbiterSoundDLL(GetHandle());
// return : An ID that you must keep and provide to others function (or -1 if it fails to connect).
///////////////////////////////////////////////////
int ConnectToOrbiterSoundDLL(OBJHANDLE Obj);

I suppose this allows for independent sound routing between each vehicle. Anyhoo, IDK if that's the job for me. But I would like to commit the edited references I have so far to CVS, for others to play with. Would that be OK?
« Last Edit: March 14, 2014, 03:23:04 PM by eddievhfan1984 » Logged
rcflyinghokie
Hero Member
*****
Posts: 580


View Profile Email
« Reply #1 on: March 12, 2013, 12:02:16 PM »

Forgive my naivety in asking this, but would this fix be able to run in both the 3.5 and 4.0 versions of orbitersound?  Or would an uninstall of 3.5 and install of 4.0 be required.
Logged
eddievhfan1984
Hero Member
*****
Posts: 737



View Profile
« Reply #2 on: March 12, 2013, 06:01:35 PM »

This is just for compiling the source code from the beginning. If you already have the compiled binaries from an earlier version, it'll work in either 3.5 or 4.0. But if we want to build with 4.0's features in mind, that might take some coding.
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!