diff options
author | Chris Robinson <[email protected]> | 2014-05-15 01:11:38 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-05-15 01:11:38 -0700 |
commit | f0797e27f35f58bd4c2dd70d48c93200154ef1f4 (patch) | |
tree | eb3db5535c7cdc61d627c47dfd53639783b493f3 /OpenAL32/alBuffer.c | |
parent | 16d3316f70419bf3589117169d2a789d5ad68160 (diff) |
Initialize newformat to AL_NONE instead of a valid format
Diffstat (limited to 'OpenAL32/alBuffer.c')
-rw-r--r-- | OpenAL32/alBuffer.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c index 12d57d61..c7cfc760 100644 --- a/OpenAL32/alBuffer.c +++ b/OpenAL32/alBuffer.c @@ -158,9 +158,9 @@ AL_API ALvoid AL_APIENTRY alBufferData(ALuint buffer, ALenum format, const ALvoi enum UserFmtType srctype; ALCdevice *device; ALCcontext *context; - ALuint framesize; - ALenum newformat; ALbuffer *albuf; + ALenum newformat = AL_NONE; + ALuint framesize; ALsizei align; ALenum err; @@ -204,7 +204,6 @@ AL_API ALvoid AL_APIENTRY alBufferData(ALuint buffer, ALenum format, const ALvoi if((size%framesize) != 0) SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done); - newformat = AL_FORMAT_MONO_FLOAT32; switch(srcchannels) { case UserFmtMono: newformat = AL_FORMAT_MONO_FLOAT32; break; @@ -227,7 +226,6 @@ AL_API ALvoid AL_APIENTRY alBufferData(ALuint buffer, ALenum format, const ALvoi if((size%framesize) != 0) SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done); - newformat = AL_FORMAT_MONO16; switch(srcchannels) { case UserFmtMono: newformat = AL_FORMAT_MONO16; break; @@ -250,7 +248,6 @@ AL_API ALvoid AL_APIENTRY alBufferData(ALuint buffer, ALenum format, const ALvoi if((size%framesize) != 0) SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done); - newformat = AL_FORMAT_MONO16; switch(srcchannels) { case UserFmtMono: newformat = AL_FORMAT_MONO16; break; @@ -273,7 +270,6 @@ AL_API ALvoid AL_APIENTRY alBufferData(ALuint buffer, ALenum format, const ALvoi if((size%framesize) != 0) SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done); - newformat = AL_FORMAT_MONO16; switch(srcchannels) { case UserFmtMono: newformat = AL_FORMAT_MONO16; break; |