]> git.mxchange.org Git - flightgear.git/blobdiff - src/Sound/soundmgr.cxx
Modified FGSubsystem::update() to take an int parameter for delta time
[flightgear.git] / src / Sound / soundmgr.cxx
index 7a70607bdf29d495cf3c3ecc301d477a223a71ab..a1caaf6ffb6356b6444b1accf586cd5af34ca384 100644 (file)
@@ -64,6 +64,8 @@ FGSimpleSound::~FGSimpleSound() {
 // constructor
 FGSoundMgr::FGSoundMgr() {
     audio_sched = new slScheduler( 8000 );
+    audio_sched -> setMaxConcurrent ( 6 ); 
+
     audio_mixer = new smMixer;
 
     SG_LOG( SG_GENERAL, SG_INFO,
@@ -73,6 +75,7 @@ FGSoundMgr::FGSoundMgr() {
 }
 
 // destructor
+
 FGSoundMgr::~FGSoundMgr() {
     sound_map_iterator current = sounds.begin();
     sound_map_iterator end = sounds.end();
@@ -88,11 +91,11 @@ FGSoundMgr::~FGSoundMgr() {
 
 
 // initialize the sound manager
-bool FGSoundMgr::init() {
+void FGSoundMgr::init() {
     last.stamp();
     safety = FG_MAX_SOUND_SAFETY;
 
-    audio_mixer -> setMasterVolume ( 80 ) ;  /* 80% of max volume. */
+    // audio_mixer -> setMasterVolume ( 80 ) ;  /* 80% of max volume. */
     audio_sched -> setSafetyMargin ( FG_SOUND_SAFETY_MULT * safety ) ;
 
     sound_map_iterator current = sounds.begin();
@@ -104,16 +107,21 @@ bool FGSoundMgr::init() {
     }
     sounds.clear();
 
-    if ( audio_sched->not_working() ) {
-       return false;
-    } else {
-       return true;
-    }
+}
+
+void FGSoundMgr::bind ()
+{
+  // no properties yet
+}
+
+void FGSoundMgr::unbind ()
+{
+  // no properties yet
 }
 
 
 // run the audio scheduler
-bool FGSoundMgr::update() {
+void FGSoundMgr::update(int dt) {
     SGTimeStamp current;
     current.stamp();
 
@@ -131,12 +139,8 @@ bool FGSoundMgr::update() {
     // cout << "safety = " << safety << endl;
     audio_sched -> setSafetyMargin ( FG_SOUND_SAFETY_MULT * safety ) ;
 
-    if ( !audio_sched->not_working() ) {
+    if ( !audio_sched->not_working() )
        audio_sched -> update();
-       return true;
-    } else {
-       return false;
-    }
 }