summaryrefslogtreecommitdiffstats
path: root/mpeglib/lib/util/audio
diff options
context:
space:
mode:
authorOBATA Akio <obache@wizdas.com>2020-05-31 17:54:31 +0900
committerOBATA Akio <obache@wizdas.com>2020-05-31 17:54:31 +0900
commit6dfc5bfda892be55a40a7f3d79c2e27396106f68 (patch)
treefe0152eba5bf0e33eec16c24e353f2471ab8ad86 /mpeglib/lib/util/audio
parentff3f2006ce72b2edabc534188a4ad006e89b4f84 (diff)
downloadtdemultimedia-6dfc5bfda892be55a40a7f3d79c2e27396106f68.tar.gz
tdemultimedia-6dfc5bfda892be55a40a7f3d79c2e27396106f68.zip
mpeglib: change to use SunOS API audioIO backend for NetBSD
On NetBSD, SunOS compatible native API should be used instead of OSS audio emulator layer. Signed-off-by: OBATA Akio <obache@wizdas.com>
Diffstat (limited to 'mpeglib/lib/util/audio')
-rw-r--r--mpeglib/lib/util/audio/audioIO.cpp2
-rw-r--r--mpeglib/lib/util/audio/audioIO_SunOS.cpp8
2 files changed, 9 insertions, 1 deletions
diff --git a/mpeglib/lib/util/audio/audioIO.cpp b/mpeglib/lib/util/audio/audioIO.cpp
index f2a1f7cb..ec84aa21 100644
--- a/mpeglib/lib/util/audio/audioIO.cpp
+++ b/mpeglib/lib/util/audio/audioIO.cpp
@@ -28,6 +28,8 @@
#ifdef OS_BSD
#ifdef __OpenBSD__
#include "audioIO_sndio.cpp"
+#elif defined(__NetBSD__)
+ #include "audioIO_SunOS.cpp"
#else
#include "audioIO_Linux.cpp"
#endif
diff --git a/mpeglib/lib/util/audio/audioIO_SunOS.cpp b/mpeglib/lib/util/audio/audioIO_SunOS.cpp
index 4e9958a1..afbb28e3 100644
--- a/mpeglib/lib/util/audio/audioIO_SunOS.cpp
+++ b/mpeglib/lib/util/audio/audioIO_SunOS.cpp
@@ -8,13 +8,19 @@
*/
#include <sys/types.h>
+#ifdef OS_SunOS
#include <sys/stropts.h>
+#else
+#include <sys/ioctl.h>
+#endif
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/audioio.h>
+#ifdef OS_BSD
+#define uchar_t u_char
+#endif
#include "audioIO.h"
-#include <iostream.h>
/* declare these static to effectively isolate the audio device */