aboutsummaryrefslogtreecommitdiff
path: root/audio/ossaudio.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio/ossaudio.c')
-rw-r--r--audio/ossaudio.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/audio/ossaudio.c b/audio/ossaudio.c
index d78e59019d..7d12f9e34a 100644
--- a/audio/ossaudio.c
+++ b/audio/ossaudio.c
@@ -75,11 +75,11 @@ static void GCC_FMT_ATTR (2, 3) oss_logerr (int err, const char *fmt, ...)
{
va_list ap;
+ va_start (ap, fmt);
AUD_vlog (AUDIO_CAP, fmt, ap);
+ va_end (ap);
- va_start (ap, fmt);
AUD_log (AUDIO_CAP, "Reason: %s\n", strerror (err));
- va_end (ap);
}
static void GCC_FMT_ATTR (3, 4) oss_logerr2 (
@@ -422,6 +422,8 @@ static int oss_init_out (HWVoiceOut *hw, audsettings_t *as)
audfmt_e effective_fmt;
audsettings_t obt_as;
+ oss->fd = -1;
+
req.fmt = aud_to_ossfmt (as->fmt);
req.freq = as->freq;
req.nchannels = as->nchannels;
@@ -565,6 +567,8 @@ static int oss_init_in (HWVoiceIn *hw, audsettings_t *as)
audfmt_e effective_fmt;
audsettings_t obt_as;
+ oss->fd = -1;
+
req.fmt = aud_to_ossfmt (as->fmt);
req.freq = as->freq;
req.nchannels = as->nchannels;