Fix OSS audio broken when adding multiple audio devices in version 1.2.

This commit is contained in:
WB2OSZ 2016-01-09 11:17:11 -05:00
parent 2424812883
commit 0c496541e5
1 changed files with 3 additions and 5 deletions

View File

@ -79,6 +79,7 @@
#if USE_ALSA #if USE_ALSA
#include <alsa/asoundlib.h> #include <alsa/asoundlib.h>
#else #else
#include <errno.h>
#ifdef __OpenBSD__ #ifdef __OpenBSD__
#include <soundcard.h> #include <soundcard.h>
#else #else
@ -86,9 +87,6 @@
#endif #endif
#endif #endif
#ifdef __FreeBSD__
#include <errno.h>
#endif
#include "direwolf.h" #include "direwolf.h"
#include "audio.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. * 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 err;
int devcaps; int devcaps;
@ -1237,7 +1235,7 @@ int audio_flush (int a)
while (len > 0) { while (len > 0) {
assert (adev[a].oss_audio_device_fd > 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 #if DEBUGx
text_color_set(DW_COLOR_DEBUG); text_color_set(DW_COLOR_DEBUG);
dw_printf ("audio_flush(): write %d returns %d\n", len, k); dw_printf ("audio_flush(): write %d returns %d\n", len, k);