Fixed some uninitialized values

This commit is contained in:
Emmanuel Atse 2013-07-18 04:11:35 +02:00
parent 3c429387f2
commit 43a21e2acc

View File

@ -97,6 +97,7 @@ bool SoundFile::openRead(const std::string& filename)
// Open the sound file
SF_INFO fileInfo;
fileInfo.format = 0;
m_file = sf_open(filename.c_str(), SFM_READ, &fileInfo);
if (!m_file)
{
@ -132,6 +133,7 @@ bool SoundFile::openRead(const void* data, std::size_t sizeInBytes)
// Open the sound file
SF_INFO fileInfo;
fileInfo.format = 0;
m_file = sf_open_virtual(&io, SFM_READ, &fileInfo, &m_memory);
if (!m_file)
{
@ -169,6 +171,7 @@ bool SoundFile::openRead(InputStream& stream)
// Open the sound file
SF_INFO fileInfo;
fileInfo.format = 0;
m_file = sf_open_virtual(&io, SFM_READ, &fileInfo, &m_stream);
if (!m_file)
{