Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
38518ced
Commit
38518ced
authored
Nov 09, 2003
by
Simon Latapie
Browse files
* http.c: removed a completely useless check (now you can change volume
value without playing anything)
parent
fe2d6895
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/control/http.c
View file @
38518ced
...
...
@@ -2,7 +2,7 @@
* http.c : http mini-server ;)
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: http.c,v 1.3
0
2003/11/09 0
3:41
:5
0
garf Exp $
* $Id: http.c,v 1.3
1
2003/11/09 0
5:22
:5
6
garf Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Laurent Aimar <fenrir@via.ecp.fr>
...
...
@@ -1696,51 +1696,47 @@ static void MacroDo( httpd_file_callback_args_t *p_args,
audio_volume_t
i_volume
;
int
i_value
;
if
(
p_sys
->
p_input
)
{
uri_extract_value
(
p_request
,
"value"
,
vol
,
8
);
aout_VolumeGet
(
p_intf
,
&
i_volume
);
uri_decode_url_encoded
(
vol
);
uri_extract_value
(
p_request
,
"value"
,
vol
,
8
);
aout_VolumeGet
(
p_intf
,
&
i_volume
);
uri_decode_url_encoded
(
vol
);
if
(
vol
[
0
]
==
'+'
)
if
(
vol
[
0
]
==
'+'
)
{
i_value
=
atoi
(
vol
+
1
);
if
(
(
i_volume
+
i_value
)
>
AOUT_VOLUME_MAX
)
{
i_value
=
atoi
(
vol
+
1
);
if
(
(
i_volume
+
i_value
)
>
AOUT_VOLUME_MAX
)
{
aout_VolumeSet
(
p_intf
,
AOUT_VOLUME_MAX
);
msg_Dbg
(
p_intf
,
"requested volume set: max"
);
}
else
{
aout_VolumeSet
(
p_intf
,
(
i_volume
+
i_value
)
);
msg_Dbg
(
p_intf
,
"requested volume set: +%i"
,
(
i_volume
+
i_value
)
);
}
aout_VolumeSet
(
p_intf
,
AOUT_VOLUME_MAX
);
msg_Dbg
(
p_intf
,
"requested volume set: max"
);
}
else
if
(
vol
[
0
]
==
'-'
)
{
i_value
=
atoi
(
vol
+
1
);
if
(
(
i_volume
-
i_value
)
<
AOUT_VOLUME_MIN
)
{
aout_VolumeSet
(
p_intf
,
AOUT_VOLUME_MIN
);
msg_Dbg
(
p_intf
,
"requested volume set: min"
);
}
else
{
aout_VolumeSet
(
p_intf
,
(
i_volume
-
i_value
)
);
msg_Dbg
(
p_intf
,
"requested volume set: -%i"
,
(
i_volume
-
i_value
)
);
}
aout_VolumeSet
(
p_intf
,
(
i_volume
+
i_value
)
);
msg_Dbg
(
p_intf
,
"requested volume set: +%i"
,
(
i_volume
+
i_value
)
);
}
}
else
if
(
vol
[
0
]
==
'-'
)
{
i_value
=
atoi
(
vol
+
1
);
if
(
(
i_volume
-
i_value
)
<
AOUT_VOLUME_MIN
)
{
aout_VolumeSet
(
p_intf
,
AOUT_VOLUME_MIN
);
msg_Dbg
(
p_intf
,
"requested volume set: min"
);
}
else
{
i_value
=
atoi
(
vol
);
if
(
(
i_value
<=
AOUT_VOLUME_MAX
)
&&
(
i_value
>=
AOUT_VOLUME_MIN
)
)
{
aout_VolumeSet
(
p_intf
,
atoi
(
vol
)
);
msg_Dbg
(
p_intf
,
"requested volume set: %i"
,
atoi
(
vol
)
);
}
aout_VolumeSet
(
p_intf
,
(
i_volume
-
i_value
)
);
msg_Dbg
(
p_intf
,
"requested volume set: -%i"
,
(
i_volume
-
i_value
)
);
}
}
else
{
i_value
=
atoi
(
vol
);
if
(
(
i_value
<=
AOUT_VOLUME_MAX
)
&&
(
i_value
>=
AOUT_VOLUME_MIN
)
)
{
aout_VolumeSet
(
p_intf
,
atoi
(
vol
)
);
msg_Dbg
(
p_intf
,
"requested volume set: %i"
,
atoi
(
vol
)
);
}
}
break
;
}
/* playlist management */
case
MVLC_ADD
:
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment