summaryrefslogtreecommitdiff
path: root/audio/ossaudio.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-11-20 16:24:34 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-11-20 16:24:34 +0000
commit571ec3d68ddfa230f1c60eba1f7e24f5a3ffb03b (patch)
tree6a3bcb5875f8a501dd51ad3459d54546287d078d /audio/ossaudio.c
parent5e941d4b51dd0888f4003e838c7e7499aa9e8a62 (diff)
audio merge (malc)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1636 c046a42c-6fe2-441c-8c8c-71466251a162
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;