]> git.mxchange.org Git - simgear.git/commitdiff
small fix for when sound is disabled
authorehofman <ehofman>
Tue, 16 Feb 2010 10:04:53 +0000 (10:04 +0000)
committerTim Moore <timoore33@gmail.com>
Wed, 17 Feb 2010 06:19:02 +0000 (07:19 +0100)
simgear/sound/sample_group.cxx

index 1da290593793eefd597196a2ce05e45ed6fce245..e2a2b2c73188894f89daeca7316ebd5946ff5910 100644 (file)
@@ -275,7 +275,7 @@ SGSampleGroup::stop ()
 void
 SGSampleGroup::suspend ()
 {
-    if (_pause == false) {
+    if (_active && _pause == false) {
         _pause = true;
         sample_map_iterator sample_current = _samples.begin();
         sample_map_iterator sample_end = _samples.end();
@@ -294,7 +294,7 @@ SGSampleGroup::suspend ()
 void
 SGSampleGroup::resume ()
 {
-    if (_pause == true) {
+    if (_active && _pause == true) {
         sample_map_iterator sample_current = _samples.begin();
         sample_map_iterator sample_end = _samples.end();
         for ( ; sample_current != sample_end; ++sample_current ) {