Skip to content

Commit

Permalink
Merge pull request #21 from brad0/oss_cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
alex19EP authored Nov 9, 2022
2 parents bfe64b5 + 1a1d189 commit 494e7cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 22 deletions.
12 changes: 1 addition & 11 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,7 @@ else
AC_CHECK_LIB(ossaudio, _oss_ioctl)
have_oss=yes
],[
AC_CHECK_HEADERS([linux/soundcard.h],[
AC_CHECK_LIB(ossaudio, _oss_ioctl)
have_oss=yes
],[
AC_CHECK_HEADERS([soundcard.h],[
AC_CHECK_LIB(ossaudio, _oss_ioctl)
have_oss=yes
],[
have_oss=no
])
])
have_oss=no
])
fi

Expand Down
14 changes: 3 additions & 11 deletions src/oss.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,17 @@
#include "audio_priv.h"

#if defined(HAVE_SYS_SOUNDCARD_H)
#include <sys/soundcard.h>
#define DEFAULT_OSS_DEVICE "/dev/dsp"
#elif defined(HAVE_LINUX_SOUNDCARD_H)
#include <linux/soundcard.h>
#define DEFAULT_OSS_DEVICE "/dev/dsp"
#elif defined(HAVE_SOUNDCARD_H)
#include <soundcard.h>
#define DEFAULT_OSS_DEVICE "/dev/dsp"
#endif

#ifdef DEFAULT_OSS_DEVICE

#include <sys/soundcard.h>
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <stdio.h>
#include <sys/ioctl.h>
#include <unistd.h>

#define DEFAULT_OSS_DEVICE "/dev/dsp"

struct oss_object
{
struct audio_object vtable;
Expand Down

0 comments on commit 494e7cd

Please sign in to comment.