Skip to content

Commit 0c49654

Browse files
committed
Fix OSS audio broken when adding multiple audio devices in version 1.2.
1 parent 2424812 commit 0c49654

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

audio.c

+3-5
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,14 @@
7979
#if USE_ALSA
8080
#include <alsa/asoundlib.h>
8181
#else
82+
#include <errno.h>
8283
#ifdef __OpenBSD__
8384
#include <soundcard.h>
8485
#else
8586
#include <sys/soundcard.h>
8687
#endif
8788
#endif
8889

89-
#ifdef __FreeBSD__
90-
#include <errno.h>
91-
#endif
9290

9391
#include "direwolf.h"
9492
#include "audio.h"
@@ -686,7 +684,7 @@ static int set_alsa_params (int a, snd_pcm_t *handle, struct audio_s *pa, char *
686684
* See /usr/include/sys/soundcard.h for details.
687685
*/
688686

689-
static int set_oss_params (int a, int fd, struct audio_s *pa)
687+
static int set_oss_params (int a, int fd, struct audio_s *pa)
690688
{
691689
int err;
692690
int devcaps;
@@ -1237,7 +1235,7 @@ int audio_flush (int a)
12371235

12381236
while (len > 0) {
12391237
assert (adev[a].oss_audio_device_fd > 0);
1240-
k = write (adev[a].oss_audio_device_fd, ptr, len);
1238+
k = write (adev[a].oss_audio_device_fd, ptr, len);
12411239
#if DEBUGx
12421240
text_color_set(DW_COLOR_DEBUG);
12431241
dw_printf ("audio_flush(): write %d returns %d\n", len, k);

0 commit comments

Comments
 (0)