This works on a CygWin build, and probably works on non-Cygwin builds
as well.
2. Enable FG to start even if audio is not available. (soundmgr.cxx)
Avoids the FGSoundMgr constructor crashing; the rest of FG then runs
OK without sound.
#ifdef ENABLE_AUDIO_SUPPORT
// Start the intro music
-#if !defined(WIN32)
if ( fgGetBool("/sim/startup/intro-music") ) {
SGPath mp3file( globals->get_fg_root() );
mp3file.append( "Sounds/intro.mp3" );
SG_LOG( SG_GENERAL, SG_INFO,
"Starting intro music: " << mp3file.str() );
+#if defined( __CYGWIN__ )
+ string command = "start /m `cygpath -w " + mp3file.str() + "`";
+#elif defined( WIN32 )
+ string command = "start /m " + mp3file.str();
+#else
string command = "mpg123 " + mp3file.str() + "> /dev/null 2>&1";
+#endif
+
system ( command.c_str() );
}
-#endif // !WIN32
#endif