Initialize some enums to dummy values

This commit is contained in:
Chris Robinson 2016-08-31 04:56:10 -07:00
parent f791b8c517
commit ccf90df072

View File

@ -139,8 +139,8 @@ AL_API ALboolean AL_APIENTRY alIsBuffer(ALuint buffer)
AL_API ALvoid AL_APIENTRY alBufferData(ALuint buffer, ALenum format, const ALvoid *data, ALsizei size, ALsizei freq) AL_API ALvoid AL_APIENTRY alBufferData(ALuint buffer, ALenum format, const ALvoid *data, ALsizei size, ALsizei freq)
{ {
enum UserFmtChannels srcchannels; enum UserFmtChannels srcchannels = UserFmtMono;
enum UserFmtType srctype; enum UserFmtType srctype = UserFmtByte;
ALCdevice *device; ALCdevice *device;
ALCcontext *context; ALCcontext *context;
ALbuffer *albuf; ALbuffer *albuf;
@ -288,8 +288,8 @@ done:
AL_API ALvoid AL_APIENTRY alBufferSubDataSOFT(ALuint buffer, ALenum format, const ALvoid *data, ALsizei offset, ALsizei length) AL_API ALvoid AL_APIENTRY alBufferSubDataSOFT(ALuint buffer, ALenum format, const ALvoid *data, ALsizei offset, ALsizei length)
{ {
enum UserFmtChannels srcchannels; enum UserFmtChannels srcchannels = UserFmtMono;
enum UserFmtType srctype; enum UserFmtType srctype = UserFmtByte;
ALCdevice *device; ALCdevice *device;
ALCcontext *context; ALCcontext *context;
ALbuffer *albuf; ALbuffer *albuf;
@ -981,13 +981,14 @@ done:
*/ */
ALenum LoadData(ALbuffer *ALBuf, ALuint freq, ALenum NewFormat, ALsizei frames, enum UserFmtChannels SrcChannels, enum UserFmtType SrcType, const ALvoid *data, ALsizei align, ALboolean storesrc) ALenum LoadData(ALbuffer *ALBuf, ALuint freq, ALenum NewFormat, ALsizei frames, enum UserFmtChannels SrcChannels, enum UserFmtType SrcType, const ALvoid *data, ALsizei align, ALboolean storesrc)
{ {
enum FmtChannels DstChannels = FmtMono;
enum FmtType DstType = FmtByte;
ALuint NewChannels, NewBytes; ALuint NewChannels, NewBytes;
enum FmtChannels DstChannels;
enum FmtType DstType;
ALuint64 newsize; ALuint64 newsize;
if(DecomposeFormat(NewFormat, &DstChannels, &DstType) == AL_FALSE || if(DecomposeFormat(NewFormat, &DstChannels, &DstType) == AL_FALSE)
(long)SrcChannels != (long)DstChannels) return AL_INVALID_ENUM;
if((long)SrcChannels != (long)DstChannels)
return AL_INVALID_ENUM; return AL_INVALID_ENUM;
NewChannels = ChannelsFromFmt(DstChannels); NewChannels = ChannelsFromFmt(DstChannels);