aboutsummaryrefslogtreecommitdiff
path: root/sword2
diff options
context:
space:
mode:
Diffstat (limited to 'sword2')
-rw-r--r--sword2/driver/d_sound.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/sword2/driver/d_sound.cpp b/sword2/driver/d_sound.cpp
index 5515dd7e81..546071ba51 100644
--- a/sword2/driver/d_sound.cpp
+++ b/sword2/driver/d_sound.cpp
@@ -511,11 +511,12 @@ Sound::~Sound() {
int Sound::readBuffer(int16 *buffer, const int numSamples) {
Common::StackLock lock(_mutex);
+ int i;
if (!_soundOn || _musicPaused)
return 0;
- for (int i = 0; i < MAXMUS; i++) {
+ for (i = 0; i < MAXMUS; i++) {
if (_music[i] && _music[i]->readyToRemove()) {
delete _music[i];
_music[i] = NULL;
@@ -536,7 +537,7 @@ int Sound::readBuffer(int16 *buffer, const int numSamples) {
if (!_mixBuffer)
return 0;
- for (int i = 0; i < MAXMUS; i++) {
+ for (i = 0; i < MAXMUS; i++) {
if (!_music[i])
continue;