mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Fixed some uninitialized values
This commit is contained in:
parent
3c429387f2
commit
43a21e2acc
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user