small fix for when sound is disabled

This commit is contained in:
ehofman
2010-02-17 07:19:02 +01:00
committed by Tim Moore
parent f529ec3018
commit 1ace645505
+2 -2
View File
@@ -275,7 +275,7 @@ SGSampleGroup::stop ()
void void
SGSampleGroup::suspend () SGSampleGroup::suspend ()
{ {
if (_pause == false) { if (_active && _pause == false) {
_pause = true; _pause = true;
sample_map_iterator sample_current = _samples.begin(); sample_map_iterator sample_current = _samples.begin();
sample_map_iterator sample_end = _samples.end(); sample_map_iterator sample_end = _samples.end();
@@ -294,7 +294,7 @@ SGSampleGroup::suspend ()
void void
SGSampleGroup::resume () SGSampleGroup::resume ()
{ {
if (_pause == true) { if (_active && _pause == true) {
sample_map_iterator sample_current = _samples.begin(); sample_map_iterator sample_current = _samples.begin();
sample_map_iterator sample_end = _samples.end(); sample_map_iterator sample_end = _samples.end();
for ( ; sample_current != sample_end; ++sample_current ) { for ( ; sample_current != sample_end; ++sample_current ) {