mirror of
https://github.com/love2d/love.git
synced 2026-08-20 04:30:09 +02:00
Make sure SoundData objects aren't initialized with garbage sample values
This commit is contained in:
@@ -145,6 +145,8 @@ void SoundData::load(int samples, int sampleRate, int bitDepth, int channels, vo
|
|||||||
|
|
||||||
if (newData)
|
if (newData)
|
||||||
memcpy(data, newData, size);
|
memcpy(data, newData, size);
|
||||||
|
else
|
||||||
|
memset(data, 0, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void *SoundData::getData() const
|
void *SoundData::getData() const
|
||||||
|
|||||||
Reference in New Issue
Block a user