ソースを参照

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

Alex Szpakowski 11 年 前
コミット
89e9288a85
1 ファイル変更2 行追加0 行削除
  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