diff options
author | Chris Robinson <[email protected]> | 2014-05-15 01:14:31 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-05-15 01:14:31 -0700 |
commit | ef1b34dcd28a47d1917e78dce7870a4d4871678e (patch) | |
tree | 41b3aa48ce83948063516fbc0c83400936865919 /Alc/backends | |
parent | f0797e27f35f58bd4c2dd70d48c93200154ef1f4 (diff) |
Initialize some variables when declaring them
Diffstat (limited to 'Alc/backends')
-rw-r--r-- | Alc/backends/alsa.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Alc/backends/alsa.c b/Alc/backends/alsa.c index 4b798b42..0712a412 100644 --- a/Alc/backends/alsa.c +++ b/Alc/backends/alsa.c @@ -677,15 +677,14 @@ static ALCboolean ALCplaybackAlsa_reset(ALCplaybackAlsa *self) unsigned int periodLen, bufferLen; snd_pcm_sw_params_t *sp = NULL; snd_pcm_hw_params_t *hp = NULL; + snd_pcm_format_t format = -1; snd_pcm_access_t access; - snd_pcm_format_t format; unsigned int periods; unsigned int rate; const char *funcerr; int allowmmap; int err; - format = -1; switch(device->FmtType) { case DevFmtByte: @@ -951,7 +950,7 @@ static ALCenum ALCcaptureAlsa_open(ALCcaptureAlsa *self, const ALCchar *name) snd_pcm_uframes_t bufferSizeInFrames; snd_pcm_uframes_t periodSizeInFrames; ALboolean needring = AL_FALSE; - snd_pcm_format_t format; + snd_pcm_format_t format = -1; const char *funcerr; int err; @@ -992,7 +991,6 @@ static ALCenum ALCcaptureAlsa_open(ALCcaptureAlsa *self, const ALCchar *name) /* Free alsa's global config tree. Otherwise valgrind reports a ton of leaks. */ snd_config_update_free_global(); - format = -1; switch(device->FmtType) { case DevFmtByte: |