Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
9be218d5
Commit
9be218d5
authored
May 17, 2000
by
Renaud Dartus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ajout des fonctions de r�glage du volume (touches : +, -, m)
parent
a61212cc
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
396 additions
and
5 deletions
+396
-5
include/audio_output.h
include/audio_output.h
+11
-0
src/audio_output/audio_output.c
src/audio_output/audio_output.c
+370
-2
src/interface/interface.c
src/interface/interface.c
+15
-3
No files found.
include/audio_output.h
View file @
9be218d5
...
...
@@ -57,12 +57,19 @@
/* Default stereo mode (0 stands for mono, 1 for stereo) */
#define AOUT_DEFAULT_STEREO 1
/* #define AOUT_DEFAULT_STEREO 0 */
/* Audio output rate, in Hz */
#define AOUT_MIN_RATE 22050
/* XXX?? */
#define AOUT_DEFAULT_RATE 44100
#define AOUT_MAX_RATE 48000
/* Volume (default 100) */
#define VOL 100
#define VOLSTEP 5
#define VOLMAX 300
/* Number of audio output frames contained in an audio output fifo.
* (AOUT_FIFO_SIZE + 1) must be a power of 2, in order to optimise the
* %(AOUT_FIFO_SIZE + 1) operation with an &AOUT_FIFO_SIZE.
...
...
@@ -227,6 +234,10 @@ typedef struct aout_thread_s
* for the OSS output */
p_aout_sys_t
p_sys
;
/* there is the current volume */
int
vol
;
}
aout_thread_t
;
/* Those are from <linux/soundcard.h> but are needed because of formats
...
...
src/audio_output/audio_output.c
View file @
9be218d5
This diff is collapsed.
Click to expand it.
src/interface/interface.c
View file @
9be218d5
...
...
@@ -42,6 +42,8 @@
#include "plugins.h"
#include "input.h"
#include "audio_output.h"
#include "intf_msg.h"
#include "interface.h"
#include "intf_cmd.h"
...
...
@@ -263,6 +265,8 @@ int intf_SelectChannel( intf_thread_t * p_intf, int i_channel )
*****************************************************************************/
int
intf_ProcessKey
(
intf_thread_t
*
p_intf
,
int
i_key
)
{
static
int
i_volbackup
;
switch
(
i_key
)
{
case
'Q'
:
/* quit order */
...
...
@@ -286,14 +290,22 @@ int intf_ProcessKey( intf_thread_t *p_intf, int i_key )
intf_SelectChannel
(
p_intf
,
i_key
-
'0'
);
break
;
case
'+'
:
/* volume + */
/* XXX?? */
if
(
(
p_main
->
p_aout
!=
NULL
)
&&
(
p_main
->
p_aout
->
vol
<
VOLMAX
)
)
p_main
->
p_aout
->
vol
+=
VOLSTEP
;
break
;
case
'-'
:
/* volume - */
/* XXX?? */
if
(
(
p_main
->
p_aout
!=
NULL
)
&&
(
p_main
->
p_aout
->
vol
>
VOLSTEP
)
)
p_main
->
p_aout
->
vol
-=
VOLSTEP
;
break
;
case
'M'
:
/* toggle mute */
case
'm'
:
/* XXX?? */
if
(
(
p_main
->
p_aout
!=
NULL
)
&&
(
p_main
->
p_aout
->
vol
))
{
i_volbackup
=
p_main
->
p_aout
->
vol
;
p_main
->
p_aout
->
vol
=
0
;
}
else
if
(
(
p_main
->
p_aout
!=
NULL
)
&&
(
!
p_main
->
p_aout
->
vol
))
p_main
->
p_aout
->
vol
=
i_volbackup
;
break
;
case
'g'
:
/* gamma - */
if
(
(
p_intf
->
p_vout
!=
NULL
)
&&
(
p_intf
->
p_vout
->
f_gamma
>
-
INTF_GAMMA_LIMIT
)
)
...
...
Write
Preview
Markdown
is supported
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