summaryrefslogtreecommitdiffstats
path: root/dec_audio.c
diff options
context:
space:
mode:
authorarpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-06-05 18:40:44 +0000
committerarpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-06-05 18:40:44 +0000
commit5c50d3e7dd839be03468e5058ce7d5eb60dfe1d8 (patch)
tree5c630dd1bec808dfe785e27b47615982d84040ad /dec_audio.c
parent49ea21d07367275022349403cb4a60f8316e5634 (diff)
downloadmpv-5c50d3e7dd839be03468e5058ce7d5eb60dfe1d8.tar.bz2
mpv-5c50d3e7dd839be03468e5058ce7d5eb60dfe1d8.tar.xz
applied solaris8/netbsd/other fixes patch by Jürgen Keil <jk@tools.de>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1039 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'dec_audio.c')
-rw-r--r--dec_audio.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/dec_audio.c b/dec_audio.c
index d13b68fb30..0d6baa6480 100644
--- a/dec_audio.c
+++ b/dec_audio.c
@@ -2,19 +2,21 @@
#include <stdio.h>
#include <stdlib.h>
-#ifdef __sun
+#include "config.h"
+
+#ifdef USE_OSS_AUDIO
+#include <sys/soundcard.h>
+#endif
+#ifdef USE_SUN_AUDIO
+#include <sys/types.h>
#include <sys/audioio.h>
#define AFMT_MU_LAW AUDIO_ENCODING_ULAW
#define AFMT_A_LAW AUDIO_ENCODING_ALAW
#define AFMT_S16_LE AUDIO_ENCODING_LINEAR
#define AFMT_IMA_ADPCM AUDIO_ENCODING_DVI
#define AFMT_U8 AUDIO_ENCODING_LINEAR8
-#else
-#include <sys/soundcard.h>
#endif
-#include "config.h"
-
extern int verbose; // defined in mplayer.c
#ifdef USE_FAKE_MONO
@@ -40,6 +42,7 @@ int fakemono=0;
#include "loader/DirectShow/DS_AudioDec.h"
+
static sh_audio_t* ac3_audio_sh=NULL;
// AC3 decoder buffer callback:
@@ -169,8 +172,10 @@ case 2: {
switch(sh_audio->format){ // hardware formats:
case 0x6: sh_audio->sample_format=AFMT_A_LAW;break;
case 0x7: sh_audio->sample_format=AFMT_MU_LAW;break;
+#if !defined(__NetBSD__)
case 0x11: sh_audio->sample_format=AFMT_IMA_ADPCM;break;
-#ifndef __sun
+#endif
+#if !defined(__sun) && !defined(__NetBSD__)
case 0x50: sh_audio->sample_format=AFMT_MPEG;break;
#endif
// case 0x2000: sh_audio->sample_format=AFMT_AC3;