Browse Source

Make sure SoundData objects aren't initialized with garbage sample values

Alex Szpakowski 11 years ago
parent
commit
89e9288a85
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/modules/sound/SoundData.cpp

+ 2 - 0
src/modules/sound/SoundData.cpp

@@ -145,6 +145,8 @@ void SoundData::load(int samples, int sampleRate, int bitDepth, int channels, vo
 
 	if (newData)
 		memcpy(data, newData, size);
+	else
+		memset(data, 0, size);
 }
 
 void *SoundData::getData() const