From 0c496541e56530802b09fd1f539e34f2aab70f15 Mon Sep 17 00:00:00 2001 From: WB2OSZ Date: Sat, 9 Jan 2016 11:17:11 -0500 Subject: [PATCH] Fix OSS audio broken when adding multiple audio devices in version 1.2. --- audio.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/audio.c b/audio.c index 543885b..d5fcdcd 100644 --- a/audio.c +++ b/audio.c @@ -79,6 +79,7 @@ #if USE_ALSA #include #else +#include #ifdef __OpenBSD__ #include #else @@ -86,9 +87,6 @@ #endif #endif -#ifdef __FreeBSD__ -#include -#endif #include "direwolf.h" #include "audio.h" @@ -686,7 +684,7 @@ static int set_alsa_params (int a, snd_pcm_t *handle, struct audio_s *pa, char * * See /usr/include/sys/soundcard.h for details. */ -static int set_oss_params (int a, int fd, struct audio_s *pa) +static int set_oss_params (int a, int fd, struct audio_s *pa) { int err; int devcaps; @@ -1237,7 +1235,7 @@ int audio_flush (int a) while (len > 0) { assert (adev[a].oss_audio_device_fd > 0); - k = write (adev[a].oss_audio_device_fd, ptr, len); + k = write (adev[a].oss_audio_device_fd, ptr, len); #if DEBUGx text_color_set(DW_COLOR_DEBUG); dw_printf ("audio_flush(): write %d returns %d\n", len, k);