Commit 4977733c authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

OSS: fix FreeBSD 8 compilation

parent 08569199
...@@ -38,6 +38,10 @@ ...@@ -38,6 +38,10 @@
# include <sys/soundcard.h> # include <sys/soundcard.h>
#endif #endif
#ifndef SNDCTL_DSP_HALT
# define SNDCTL_DSP_HALT SNDCTL_DSP_RESET
#endif
#include <vlc_common.h> #include <vlc_common.h>
#include <vlc_plugin.h> #include <vlc_plugin.h>
#include <vlc_fs.h> #include <vlc_fs.h>
...@@ -113,12 +117,14 @@ static int Open (vlc_object_t *obj) ...@@ -113,12 +117,14 @@ static int Open (vlc_object_t *obj)
switch (fourcc) switch (fourcc)
{ {
#ifdef AFMT_FLOAT
case VLC_CODEC_F64B: case VLC_CODEC_F64B:
case VLC_CODEC_F64L: case VLC_CODEC_F64L:
case VLC_CODEC_F32B: case VLC_CODEC_F32B:
case VLC_CODEC_F32L: case VLC_CODEC_F32L:
format = AFMT_FLOAT; format = AFMT_FLOAT;
break; break;
#endif
case VLC_CODEC_S32B: case VLC_CODEC_S32B:
format = AFMT_S32_BE; format = AFMT_S32_BE;
break; break;
...@@ -140,8 +146,10 @@ static int Open (vlc_object_t *obj) ...@@ -140,8 +146,10 @@ static int Open (vlc_object_t *obj)
spdif = var_InheritBool (aout, "spdif"); spdif = var_InheritBool (aout, "spdif");
if (spdif) if (spdif)
format = AFMT_AC3; format = AFMT_AC3;
#ifdef AFMT_FLOAT
else if (HAVE_FPU) else if (HAVE_FPU)
format = AFMT_FLOAT; format = AFMT_FLOAT;
#endif
else else
format = AFMT_S16_NE; format = AFMT_S16_NE;
} }
...@@ -162,7 +170,9 @@ static int Open (vlc_object_t *obj) ...@@ -162,7 +170,9 @@ static int Open (vlc_object_t *obj)
//case AFMT_S24_LE: //case AFMT_S24_LE:
case AFMT_S32_BE: fourcc = VLC_CODEC_S32B; break; case AFMT_S32_BE: fourcc = VLC_CODEC_S32B; break;
case AFMT_S32_LE: fourcc = VLC_CODEC_S32L; break; case AFMT_S32_LE: fourcc = VLC_CODEC_S32L; break;
#ifdef AFMT_FLOAT
case AFMT_FLOAT: fourcc = VLC_CODEC_FL32; break; case AFMT_FLOAT: fourcc = VLC_CODEC_FL32; break;
#endif
case AFMT_AC3: case AFMT_AC3:
if (spdif) if (spdif)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment