mirror of
https://github.com/mpv-player/mpv
synced 2024-12-29 10:32:15 +00:00
dont mess up v4l volumes
patch by Oswald Buddenhagen <ossi@kde.org> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11987 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
0949f9a230
commit
1723559859
@ -60,7 +60,7 @@ char **tv_param_channels = NULL;
|
||||
int tv_param_audio_id = 0;
|
||||
#if defined(HAVE_TV_V4L) || defined(HAVE_TV_V4L2)
|
||||
int tv_param_amode = -1;
|
||||
int tv_param_volume = 60000;
|
||||
int tv_param_volume = -1;
|
||||
int tv_param_bass = -1;
|
||||
int tv_param_treble = -1;
|
||||
int tv_param_balance = -1;
|
||||
|
@ -332,7 +332,6 @@ static void init_v4l_audio(priv_t *priv)
|
||||
}
|
||||
|
||||
/* mute all channels */
|
||||
priv->audio[i].volume = 0;
|
||||
priv->audio[i].flags |= VIDEO_AUDIO_MUTE;
|
||||
reqmode = -1;
|
||||
if (tv_param_amode >= 0) {
|
||||
@ -696,7 +695,6 @@ static int uninit(priv_t *priv)
|
||||
mp_msg(MSGT_TV, MSGL_V, "done\n");
|
||||
|
||||
if (priv->capability.audios) {
|
||||
priv->audio[priv->audio_id].volume = 0;
|
||||
priv->audio[priv->audio_id].flags |= VIDEO_AUDIO_MUTE;
|
||||
ioctl(priv->video_fd, VIDIOCSAUDIO, &priv->audio[priv->audio_id]);
|
||||
}
|
||||
@ -1128,7 +1126,6 @@ static int control(priv_t *priv, int cmd, void *arg)
|
||||
unsigned long freq = (unsigned long)*(void **)arg;
|
||||
|
||||
if (priv->capability.audios) {
|
||||
priv->audio[priv->audio_id].volume = 0;
|
||||
priv->audio[priv->audio_id].flags |= VIDEO_AUDIO_MUTE;
|
||||
ioctl(priv->video_fd, VIDIOCSAUDIO, &priv->audio[priv->audio_id]);
|
||||
}
|
||||
@ -1147,7 +1144,6 @@ static int control(priv_t *priv, int cmd, void *arg)
|
||||
usleep(100000); // wait to supress noise during switching
|
||||
|
||||
if (priv->capability.audios) {
|
||||
priv->audio[priv->audio_id].volume = tv_param_volume;
|
||||
priv->audio[priv->audio_id].flags &= ~VIDEO_AUDIO_MUTE;
|
||||
ioctl(priv->video_fd, VIDIOCSAUDIO, &priv->audio[priv->audio_id]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user