mirror of https://github.com/wb2osz/direwolf.git
Fix OSS audio broken when adding multiple audio devices in version 1.2.
This commit is contained in:
parent
2424812883
commit
0c496541e5
8
audio.c
8
audio.c
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue