#include <Objects/matlib.hxx>
#include <GUI/gui.h>
+#include <Sound/soundmgr.hxx>
#include "globals.hxx"
#include "fgfs.hxx"
static bool fdm_data_logging = false; // FIXME: temporary
+static bool frozen = false; // FIXME: temporary
+
\f
////////////////////////////////////////////////////////////////////////
}
+/**
+ * Return the current frozen state.
+ */
+static bool
+getFreeze ()
+{
+ return frozen;
+}
+
+
+/**
+ * Set the current frozen state.
+ */
+static void
+setFreeze (bool f)
+{
+ frozen = f;
+ // Stop sound on a pause
+ if (f)
+ globals->get_soundmgr()->pause();
+ else
+ globals->get_soundmgr()->resume();
+}
+
+
/**
* Return the current aircraft directory (UIUC) as a string.
*/
// Simulation
fgTie("/sim/logging/priority", getLoggingPriority, setLoggingPriority);
fgTie("/sim/logging/classes", getLoggingClasses, setLoggingClasses);
- // fgTie("/sim/freeze", getFreeze, setFreeze);
+ fgTie("/sim/freeze/master", getFreeze, setFreeze);
fgTie("/sim/aircraft-dir", getAircraftDir, setAircraftDir);
fgTie("/sim/time/elapsed-ms", getElapsedTime_ms);
}
+void
+FGSoundMgr::pause ()
+{
+ audio_sched->pauseSample(0, 0);
+}
+
+
+void
+FGSoundMgr::resume ()
+{
+ audio_sched->resumeSample(0, 0);
+}
+
+
// add a sound effect, return true if successful
bool FGSoundMgr::add( FGSimpleSound *sound, const string& refname ) {