Commit 43623d35 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

oss: attempt to fix the build

(cherry picked from commit 2d681f4c38745132a18fc7ba8163df5aab96346b)
parent f2138876
...@@ -51,7 +51,6 @@ ...@@ -51,7 +51,6 @@
#if !defined (__FreeBSD__) && !defined (__FreeBSD_kernel__) #if !defined (__FreeBSD__) && !defined (__FreeBSD_kernel__)
# define USE_SOFTVOL # define USE_SOFTVOL
# include "volume.h"
#endif #endif
#define A52_FRAME_NB 1536 #define A52_FRAME_NB 1536
...@@ -61,12 +60,20 @@ struct aout_sys_t ...@@ -61,12 +60,20 @@ struct aout_sys_t
int fd; int fd;
audio_sample_format_t format; audio_sample_format_t format;
bool starting; bool starting;
#ifndef USE_SOFTVOL
bool mute; bool mute;
uint8_t level; uint8_t level;
#else
bool soft_mute;
float soft_gain;
#endif
char *device; char *device;
}; };
#ifdef USE_SOFTVOL
# include "volume.h"
#endif
static int Open (vlc_object_t *); static int Open (vlc_object_t *);
static void Close (vlc_object_t *); static void Close (vlc_object_t *);
...@@ -354,6 +361,7 @@ static void Stop (audio_output_t *aout) ...@@ -354,6 +361,7 @@ static void Stop (audio_output_t *aout)
sys->fd = -1; sys->fd = -1;
} }
#ifndef USE_SOFTVOL
static int VolumeSet (audio_output_t *aout, float vol) static int VolumeSet (audio_output_t *aout, float vol)
{ {
aout_sys_t *sys = aout->sys; aout_sys_t *sys = aout->sys;
...@@ -395,6 +403,7 @@ static int MuteSet (audio_output_t *aout, bool mute) ...@@ -395,6 +403,7 @@ static int MuteSet (audio_output_t *aout, bool mute)
aout_MuteReport (aout, mute); aout_MuteReport (aout, mute);
return 0; return 0;
} }
#endif
static int DevicesEnum (audio_output_t *aout) static int DevicesEnum (audio_output_t *aout)
{ {
...@@ -467,9 +476,10 @@ static int Open (vlc_object_t *obj) ...@@ -467,9 +476,10 @@ static int Open (vlc_object_t *obj)
return VLC_ENOMEM; return VLC_ENOMEM;
sys->fd = -1; sys->fd = -1;
#ifndef USE_SOFTVOL
sys->level = 100; sys->level = 100;
sys->mute = false; sys->mute = false;
#endif
sys->device = var_InheritString (aout, "oss-audio-device"); sys->device = var_InheritString (aout, "oss-audio-device");
aout->sys = sys; aout->sys = sys;
......
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