Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
35b47400
Commit
35b47400
authored
Sep 18, 2002
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ALL: More hooks for audio volume management.
* configure.in: Fixed a typo.
parent
df657969
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
128 additions
and
23 deletions
+128
-23
Makefile.old
Makefile.old
+1
-1
configure.in
configure.in
+1
-1
include/aout_internal.h
include/aout_internal.h
+16
-1
include/audio_output.h
include/audio_output.h
+6
-6
include/vlc_common.h
include/vlc_common.h
+4
-1
include/vlc_symbols.h
include/vlc_symbols.h
+14
-0
modules/audio_output/alsa.c
modules/audio_output/alsa.c
+5
-1
modules/audio_output/arts.c
modules/audio_output/arts.c
+2
-1
modules/audio_output/esd.c
modules/audio_output/esd.c
+2
-1
modules/audio_output/file.c
modules/audio_output/file.c
+2
-1
modules/audio_output/oss.c
modules/audio_output/oss.c
+5
-1
modules/audio_output/sdl.c
modules/audio_output/sdl.c
+2
-1
modules/audio_output/waveout.c
modules/audio_output/waveout.c
+2
-1
modules/gui/beos/AudioOutput.cpp
modules/gui/beos/AudioOutput.cpp
+2
-1
modules/gui/macosx/aout.m
modules/gui/macosx/aout.m
+2
-1
modules/gui/qnx/aout.c
modules/gui/qnx/aout.c
+1
-0
modules/misc/dummy/aout.c
modules/misc/dummy/aout.c
+2
-1
modules/video_output/directx/aout.c
modules/video_output/directx/aout.c
+2
-1
src/audio_output/intf.c
src/audio_output/intf.c
+50
-2
src/misc/modules_plugin.h
src/misc/modules_plugin.h
+7
-0
No files found.
Makefile.old
View file @
35b47400
...
...
@@ -22,7 +22,7 @@ INTERFACE := interface intf_eject
PLAYLIST
:=
playlist
INPUT
:=
input input_ext-plugins input_ext-dec input_ext-intf input_dec input_programs input_clock input_info
VIDEO_OUTPUT
:=
video_output video_text vout_pictures vout_subpictures
AUDIO_OUTPUT
:=
audio_output filters input mixer output
AUDIO_OUTPUT
:=
audio_output filters input mixer output
intf
STREAM_OUTPUT
:=
stream_output
MISC
:=
mtime modules threads cpu configuration netutils iso_lang messages objects extras
...
...
configure.in
View file @
35b47400
...
...
@@ -1392,7 +1392,7 @@ then
if test "x${with_qte}" = "x"
then
test_LDFLAGS="-L${QTDIR}/lib"
test_CFLAGS="-I$
(QTDIR)
/include"
test_CFLAGS="-I$
{QTDIR}
/include"
else
test_LDFLAGS="-L${with_qte}/lib"
test_CFLAGS="-I${with_qte}/include"
...
...
include/aout_internal.h
View file @
35b47400
...
...
@@ -2,7 +2,7 @@
* aout_internal.h : internal defines for audio output
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: aout_internal.h,v 1.1
7 2002/09/16 20:46:37
massiot Exp $
* $Id: aout_internal.h,v 1.1
8 2002/09/18 21:21:23
massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -210,9 +210,11 @@ struct aout_instance_t
/*****************************************************************************
* Prototypes
*****************************************************************************/
/* From input.c : */
void
aout_InputPlay
(
aout_instance_t
*
p_aout
,
aout_input_t
*
p_input
,
aout_buffer_t
*
p_buffer
);
/* From filters.c : */
int
aout_FiltersCreatePipeline
(
aout_instance_t
*
p_aout
,
aout_filter_t
**
pp_filters
,
int
*
pi_nb_filters
,
...
...
@@ -228,18 +230,21 @@ void aout_FiltersPlay( aout_instance_t * p_aout,
aout_filter_t
**
pp_filters
,
int
i_nb_filters
,
aout_buffer_t
**
pp_input_buffer
);
/* From mixer.c : */
int
aout_MixerNew
(
aout_instance_t
*
p_aout
);
void
aout_MixerDelete
(
aout_instance_t
*
p_aout
);
void
aout_MixerRun
(
aout_instance_t
*
p_aout
);
int
aout_MixerMultiplierSet
(
aout_instance_t
*
p_aout
,
float
f_multiplier
);
int
aout_MixerMultiplierGet
(
aout_instance_t
*
p_aout
,
float
*
pf_multiplier
);
/* From output.c : */
int
aout_OutputNew
(
aout_instance_t
*
p_aout
,
audio_sample_format_t
*
p_format
);
void
aout_OutputPlay
(
aout_instance_t
*
p_aout
,
aout_buffer_t
*
p_buffer
);
void
aout_OutputDelete
(
aout_instance_t
*
p_aout
);
VLC_EXPORT
(
aout_buffer_t
*
,
aout_OutputNextBuffer
,
(
aout_instance_t
*
,
mtime_t
,
vlc_bool_t
)
);
/* From audio_output.c : */
VLC_EXPORT
(
int
,
aout_FormatNbChannels
,
(
audio_sample_format_t
*
p_format
)
);
void
aout_FormatPrepare
(
audio_sample_format_t
*
p_format
);
void
aout_FifoInit
(
aout_instance_t
*
,
aout_fifo_t
*
,
u32
);
...
...
@@ -250,3 +255,13 @@ void aout_FifoMoveDates( aout_instance_t *, aout_fifo_t *, mtime_t );
VLC_EXPORT
(
aout_buffer_t
*
,
aout_FifoPop
,
(
aout_instance_t
*
p_aout
,
aout_fifo_t
*
p_fifo
)
);
void
aout_FifoDestroy
(
aout_instance_t
*
p_aout
,
aout_fifo_t
*
p_fifo
);
/* From intf.c :*/
VLC_EXPORT
(
void
,
aout_VolumeSoftInit
,
(
aout_instance_t
*
)
);
int
aout_VolumeSoftGet
(
aout_instance_t
*
,
audio_volume_t
*
);
int
aout_VolumeSoftSet
(
aout_instance_t
*
,
audio_volume_t
);
int
aout_VolumeSoftInfos
(
aout_instance_t
*
,
audio_volume_t
*
,
audio_volume_t
*
);
VLC_EXPORT
(
void
,
aout_VolumeNoneInit
,
(
aout_instance_t
*
)
);
int
aout_VolumeNoneGet
(
aout_instance_t
*
,
audio_volume_t
*
);
int
aout_VolumeNoneSet
(
aout_instance_t
*
,
audio_volume_t
);
int
aout_VolumeNoneInfos
(
aout_instance_t
*
,
audio_volume_t
*
,
audio_volume_t
*
);
include/audio_output.h
View file @
35b47400
...
...
@@ -2,7 +2,7 @@
* audio_output.h : audio output interface
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: audio_output.h,v 1.6
3 2002/09/16 20:46:37
massiot Exp $
* $Id: audio_output.h,v 1.6
4 2002/09/18 21:21:23
massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -165,11 +165,6 @@ struct audio_date_t
u32
i_remainder
;
};
/*****************************************************************************
* audio_volume_t : integer value for the audio volume
*****************************************************************************/
typedef
unsigned
int
audio_volume_t
;
/*****************************************************************************
* Prototypes
*****************************************************************************/
...
...
@@ -192,4 +187,9 @@ VLC_EXPORT( aout_input_t *, __aout_InputNew, ( vlc_object_t *, aout_instance_t *
VLC_EXPORT
(
void
,
aout_InputDelete
,
(
aout_instance_t
*
,
aout_input_t
*
)
);
/* From intf.c : */
VLC_EXPORT
(
int
,
aout_VolumeGet
,
(
aout_instance_t
*
,
audio_volume_t
*
)
);
VLC_EXPORT
(
int
,
aout_VolumeSet
,
(
aout_instance_t
*
,
audio_volume_t
)
);
VLC_EXPORT
(
int
,
aout_VolumeInfos
,
(
aout_instance_t
*
,
audio_volume_t
*
,
audio_volume_t
*
)
);
VLC_EXPORT
(
int
,
aout_VolumeUp
,
(
aout_instance_t
*
,
int
,
audio_volume_t
*
)
);
VLC_EXPORT
(
int
,
aout_VolumeDown
,
(
aout_instance_t
*
,
int
,
audio_volume_t
*
)
);
include/vlc_common.h
View file @
35b47400
...
...
@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vlc_common.h,v 1.2
6 2002/08/30 22:22:24
massiot Exp $
* $Id: vlc_common.h,v 1.2
7 2002/09/18 21:21:23
massiot Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
...
...
@@ -114,6 +114,9 @@ typedef s16 dctelem_t;
/* Video buffer types */
typedef
u8
yuv_data_t
;
/* Audio volume */
typedef
u16
audio_volume_t
;
/*****************************************************************************
* mtime_t: high precision date or time interval
*****************************************************************************
...
...
include/vlc_symbols.h
View file @
35b47400
...
...
@@ -38,6 +38,11 @@ struct module_symbols_t
int
(
*
__vlc_threads_end_inner
)
(
vlc_object_t
*
)
;
int
(
*
__vlc_threads_init_inner
)
(
vlc_object_t
*
)
;
int
(
*
aout_FormatNbChannels_inner
)
(
audio_sample_format_t
*
p_format
)
;
int
(
*
aout_VolumeDown_inner
)
(
aout_instance_t
*
,
int
,
audio_volume_t
*
)
;
int
(
*
aout_VolumeGet_inner
)
(
aout_instance_t
*
,
audio_volume_t
*
)
;
int
(
*
aout_VolumeInfos_inner
)
(
aout_instance_t
*
,
audio_volume_t
*
,
audio_volume_t
*
)
;
int
(
*
aout_VolumeSet_inner
)
(
aout_instance_t
*
,
audio_volume_t
)
;
int
(
*
aout_VolumeUp_inner
)
(
aout_instance_t
*
,
int
,
audio_volume_t
*
)
;
int
(
*
input_AccessInit_inner
)
(
input_thread_t
*
)
;
int
(
*
input_AddInfo_inner
)
(
input_info_category_t
*
,
char
*
,
char
*
,
...
)
;
int
(
*
input_ChangeArea_inner
)
(
input_thread_t
*
,
input_area_t
*
)
;
...
...
@@ -112,6 +117,8 @@ struct module_symbols_t
void
(
*
aout_DateSet_inner
)
(
audio_date_t
*
,
mtime_t
)
;
void
(
*
aout_DeleteInstance_inner
)
(
aout_instance_t
*
)
;
void
(
*
aout_InputDelete_inner
)
(
aout_instance_t
*
,
aout_input_t
*
)
;
void
(
*
aout_VolumeNoneInit_inner
)
(
aout_instance_t
*
)
;
void
(
*
aout_VolumeSoftInit_inner
)
(
aout_instance_t
*
)
;
void
(
*
config_Duplicate_inner
)
(
module_t
*
,
module_config_t
*
)
;
void
(
*
config_SetCallbacks_inner
)
(
module_config_t
*
,
module_config_t
*
)
;
void
(
*
config_UnsetCallbacks_inner
)
(
module_config_t
*
)
;
...
...
@@ -228,6 +235,13 @@ struct module_symbols_t
# define aout_FormatNbChannels p_symbols->aout_FormatNbChannels_inner
# define aout_InputDelete p_symbols->aout_InputDelete_inner
# define aout_OutputNextBuffer p_symbols->aout_OutputNextBuffer_inner
# define aout_VolumeDown p_symbols->aout_VolumeDown_inner
# define aout_VolumeGet p_symbols->aout_VolumeGet_inner
# define aout_VolumeInfos p_symbols->aout_VolumeInfos_inner
# define aout_VolumeNoneInit p_symbols->aout_VolumeNoneInit_inner
# define aout_VolumeSet p_symbols->aout_VolumeSet_inner
# define aout_VolumeSoftInit p_symbols->aout_VolumeSoftInit_inner
# define aout_VolumeUp p_symbols->aout_VolumeUp_inner
# define config_Duplicate p_symbols->config_Duplicate_inner
# define config_FindConfig p_symbols->config_FindConfig_inner
# define config_GetHomeDir p_symbols->config_GetHomeDir_inner
...
...
modules/audio_output/alsa.c
View file @
35b47400
...
...
@@ -2,7 +2,7 @@
* alsa.c : alsa plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: alsa.c,v 1.1
0 2002/08/30 23:27:06
massiot Exp $
* $Id: alsa.c,v 1.1
1 2002/09/18 21:21:23
massiot Exp $
*
* Authors: Henri Fallon <henri@videolan.org> - Original Author
* Jeffrey Baker <jwbaker@acm.org> - Port to ALSA 1.0 API
...
...
@@ -150,10 +150,14 @@ static int Open( vlc_object_t *p_this )
"iec958:AES0=0x%x,AES1=0x%x,AES2=0x%x,AES3=0x%x"
,
s
[
0
],
s
[
1
],
s
[
2
],
s
[
3
]
);
psz_device
=
psz_alsadev
;
aout_VolumeNoneInit
(
p_aout
);
}
else
{
psz_device
=
"default"
;
aout_VolumeSoftInit
(
p_aout
);
}
}
...
...
modules/audio_output/arts.c
View file @
35b47400
...
...
@@ -2,7 +2,7 @@
* arts.c : aRts module
*****************************************************************************
* Copyright (C) 2001-2002 VideoLAN
* $Id: arts.c,v 1.1
0 2002/08/30 23:27:06
massiot Exp $
* $Id: arts.c,v 1.1
1 2002/09/18 21:21:23
massiot Exp $
*
* Authors: Emmanuel Blindauer <manu@agat.net>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -97,6 +97,7 @@ static int Open( vlc_object_t *p_this )
}
p_aout
->
output
.
pf_play
=
Play
;
aout_VolumeSoftInit
(
p_aout
);
p_sys
->
stream
=
NULL
;
...
...
modules/audio_output/esd.c
View file @
35b47400
...
...
@@ -2,7 +2,7 @@
* esd.c : EsounD module
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: esd.c,v 1.1
2 2002/08/30 23:27:06
massiot Exp $
* $Id: esd.c,v 1.1
3 2002/09/18 21:21:23
massiot Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
...
...
@@ -87,6 +87,7 @@ static int Open( vlc_object_t *p_this )
p_aout
->
output
.
p_sys
=
p_sys
;
p_aout
->
output
.
pf_play
=
Play
;
aout_VolumeSoftInit
(
p_aout
);
/* Initialize some variables */
p_sys
->
esd_format
=
ESD_BITS16
|
ESD_STREAM
|
ESD_PLAY
;
...
...
modules/audio_output/file.c
View file @
35b47400
...
...
@@ -2,7 +2,7 @@
* file.c : audio output which writes the samples to a file
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: file.c,v 1.1
0 2002/08/30 23:27:06
massiot Exp $
* $Id: file.c,v 1.1
1 2002/09/18 21:21:23
massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -92,6 +92,7 @@ static int Open( vlc_object_t * p_this )
if
(
p_file
==
NULL
)
return
-
1
;
p_aout
->
output
.
pf_play
=
Play
;
aout_VolumeSoftInit
(
p_aout
);
while
(
*
ppsz_compare
!=
NULL
)
{
...
...
modules/audio_output/oss.c
View file @
35b47400
...
...
@@ -2,7 +2,7 @@
* oss.c : OSS /dev/dsp module for vlc
*****************************************************************************
* Copyright (C) 2000-2002 VideoLAN
* $Id: oss.c,v 1.2
5 2002/09/14 20:51:11 stef
Exp $
* $Id: oss.c,v 1.2
6 2002/09/18 21:21:23 massiot
Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -164,11 +164,15 @@ static int Open( vlc_object_t *p_this )
p_aout
->
output
.
i_nb_samples
=
A52_FRAME_NB
;
p_aout
->
output
.
output
.
i_bytes_per_frame
=
AOUT_SPDIF_SIZE
;
p_aout
->
output
.
output
.
i_frame_length
=
A52_FRAME_NB
;
aout_VolumeNoneInit
(
p_aout
);
}
else
{
p_aout
->
output
.
output
.
i_format
=
i_format
=
AOUT_FMT_S16_NE
;
p_aout
->
output
.
i_nb_samples
=
FRAME_SIZE
;
aout_VolumeSoftInit
(
p_aout
);
}
if
(
ioctl
(
p_sys
->
i_fd
,
SNDCTL_DSP_SETFMT
,
&
i_format
)
<
0
...
...
modules/audio_output/sdl.c
View file @
35b47400
...
...
@@ -2,7 +2,7 @@
* sdl.c : SDL audio output plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2002 VideoLAN
* $Id: sdl.c,v 1.1
1 2002/09/02 23:17:05
massiot Exp $
* $Id: sdl.c,v 1.1
2 2002/09/18 21:21:23
massiot Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -86,6 +86,7 @@ static int Open ( vlc_object_t *p_this )
p_aout
->
output
.
pf_play
=
Play
;
aout_VolumeSoftInit
(
p_aout
);
#ifndef WIN32
/* Win32 SDL implementation doesn't support SDL_INIT_EVENTTHREAD yet*/
i_flags
|=
SDL_INIT_EVENTTHREAD
;
...
...
modules/audio_output/waveout.c
View file @
35b47400
...
...
@@ -2,7 +2,7 @@
* waveout.c : Windows waveOut plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: waveout.c,v 1.
6 2002/08/30 23:27:06
massiot Exp $
* $Id: waveout.c,v 1.
7 2002/09/18 21:21:23
massiot Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -101,6 +101,7 @@ static int Open( vlc_object_t *p_this )
}
p_aout
->
output
.
pf_play
=
Play
;
aout_VolumeSoftInit
(
p_aout
);
/* calculate the frame size in bytes */
p_aout
->
output
.
p_sys
->
i_buffer_size
=
FRAME_SIZE
*
sizeof
(
s16
)
...
...
modules/gui/beos/AudioOutput.cpp
View file @
35b47400
...
...
@@ -2,7 +2,7 @@
* aout.cpp: BeOS audio output
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: AudioOutput.cpp,v 1.
7 2002/08/30 23:27:06
massiot Exp $
* $Id: AudioOutput.cpp,v 1.
8 2002/09/18 21:21:23
massiot Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -110,6 +110,7 @@ int E_(OpenAudio) ( vlc_object_t * p_this )
}
p_aout
->
output
.
pf_play
=
Play
;
aout_VolumeSoftInit
(
p_aout
);
return
0
;
}
...
...
modules/gui/macosx/aout.m
View file @
35b47400
...
...
@@ -2,7 +2,7 @@
* aout.m: CoreAudio output plugin
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: aout.m,v 1.
9 2002/09/02 23:17:05
massiot Exp $
* $Id: aout.m,v 1.
10 2002/09/18 21:21:24
massiot Exp $
*
* Authors: Colin Delacroix
<colin
@
zoy
.
org
>
* Jon Lech Johansen
<jon-vl
@
nanocrew
.
net
>
...
...
@@ -99,6 +99,7 @@ int E_(OpenAudio)( vlc_object_t * p_this )
}
p_aout->output.pf_play = Play;
aout_VolumeSoftInit( p_aout );
/* Get a description of the data format used by the device */
i_param_size = sizeof( p_sys->stream_format );
...
...
modules/gui/qnx/aout.c
View file @
35b47400
...
...
@@ -106,6 +106,7 @@ int E_(OpenAudio)( vlc_object_t *p_this )
p_aout
->
output
.
p_sys
->
p_silent_buffer
=
malloc
(
DEFAULT_FRAME_SIZE
*
4
);
p_aout
->
output
.
pf_play
=
Play
;
aout_VolumeSoftInit
(
p_aout
);
memset
(
&
pi
,
0
,
sizeof
(
pi
)
);
memset
(
&
pp
,
0
,
sizeof
(
pp
)
);
...
...
modules/misc/dummy/aout.c
View file @
35b47400
...
...
@@ -2,7 +2,7 @@
* aout_dummy.c : dummy audio output plugin
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: aout.c,v 1.
8 2002/08/30 23:27:06
massiot Exp $
* $Id: aout.c,v 1.
9 2002/09/18 21:21:24
massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -48,6 +48,7 @@ int E_(OpenAudio) ( vlc_object_t * p_this )
aout_instance_t
*
p_aout
=
(
aout_instance_t
*
)
p_this
;
p_aout
->
output
.
pf_play
=
Play
;
aout_VolumeSoftInit
(
p_aout
);
if
(
p_aout
->
output
.
output
.
i_format
==
AOUT_FMT_SPDIF
)
{
...
...
modules/video_output/directx/aout.c
View file @
35b47400
...
...
@@ -2,7 +2,7 @@
* aout.c: Windows DirectX audio output method
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: aout.c,v 1.
9 2002/08/30 23:27:06
massiot Exp $
* $Id: aout.c,v 1.
10 2002/09/18 21:21:24
massiot Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -129,6 +129,7 @@ int E_(OpenAudio) ( vlc_object_t *p_this )
vlc_mutex_init
(
p_aout
,
&
p_aout
->
output
.
p_sys
->
buffer_lock
);
p_aout
->
output
.
pf_play
=
Play
;
aout_VolumeSoftInit
(
p_aout
);
/* Initialise DirectSound */
if
(
DirectxInitDSound
(
p_aout
)
)
...
...
src/audio_output/intf.c
View file @
35b47400
...
...
@@ -2,7 +2,7 @@
* intf.c : audio output API towards the interface modules
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: intf.c,v 1.
1 2002/09/16 20:46:38
massiot Exp $
* $Id: intf.c,v 1.
2 2002/09/18 21:21:24
massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -217,7 +217,21 @@ int aout_VolumeDown( aout_instance_t * p_aout, int i_nb_steps,
/* Meant to be called by the output plug-in's Open(). */
void
aout_VolumeSoftInit
(
aout_instance_t
*
p_aout
)
{
p_aout
->
output
.
i_volume
=
AOUT_VOLUME_DEFAULT
;
int
i_volume
;
i_volume
=
config_GetInt
(
p_aout
,
"volume"
);
if
(
i_volume
==
-
1
)
{
p_aout
->
output
.
i_volume
=
AOUT_VOLUME_DEFAULT
;
}
else
{
p_aout
->
output
.
i_volume
=
i_volume
;
}
p_aout
->
output
.
pf_volume_infos
=
aout_VolumeSoftInfos
;
p_aout
->
output
.
pf_volume_get
=
aout_VolumeSoftGet
;
p_aout
->
output
.
pf_volume_set
=
aout_VolumeSoftSet
;
}
/* Placeholder for pf_volume_infos(). */
...
...
@@ -246,3 +260,37 @@ int aout_VolumeSoftSet( aout_instance_t * p_aout,
return
0
;
}
/*
* The next functions are not supposed to be called by the interface, but
* are placeholders for unsupported scaling.
*/
/* Meant to be called by the output plug-in's Open(). */
void
aout_VolumeNoneInit
(
aout_instance_t
*
p_aout
)
{
p_aout
->
output
.
pf_volume_infos
=
aout_VolumeNoneInfos
;
p_aout
->
output
.
pf_volume_get
=
aout_VolumeNoneGet
;
p_aout
->
output
.
pf_volume_set
=
aout_VolumeNoneSet
;
}
/* Placeholder for pf_volume_infos(). */
int
aout_VolumeNoneInfos
(
aout_instance_t
*
p_aout
,
audio_volume_t
*
pi_low_soft
,
audio_volume_t
*
pi_high_soft
)
{
return
-
1
;
}
/* Placeholder for pf_volume_get(). */
int
aout_VolumeNoneGet
(
aout_instance_t
*
p_aout
,
audio_volume_t
*
pi_volume
)
{
return
-
1
;
}
/* Placeholder for pf_volume_set(). */
int
aout_VolumeNoneSet
(
aout_instance_t
*
p_aout
,
audio_volume_t
i_volume
)
{
return
-
1
;
}
src/misc/modules_plugin.h
View file @
35b47400
...
...
@@ -182,6 +182,8 @@ static const char * module_error( char *psz_buffer )
(p_symbols)->aout_OutputNextBuffer_inner = aout_OutputNextBuffer; \
(p_symbols)->aout_FormatNbChannels_inner = aout_FormatNbChannels; \
(p_symbols)->aout_FifoPop_inner = aout_FifoPop; \
(p_symbols)->aout_VolumeSoftInit_inner = aout_VolumeSoftInit; \
(p_symbols)->aout_VolumeNoneInit_inner = aout_VolumeNoneInit; \
(p_symbols)->__aout_NewInstance_inner = __aout_NewInstance; \
(p_symbols)->aout_DeleteInstance_inner = aout_DeleteInstance; \
(p_symbols)->aout_BufferNew_inner = aout_BufferNew; \
...
...
@@ -194,6 +196,11 @@ static const char * module_error( char *psz_buffer )
(p_symbols)->aout_DateIncrement_inner = aout_DateIncrement; \
(p_symbols)->__aout_InputNew_inner = __aout_InputNew; \
(p_symbols)->aout_InputDelete_inner = aout_InputDelete; \
(p_symbols)->aout_VolumeGet_inner = aout_VolumeGet; \
(p_symbols)->aout_VolumeSet_inner = aout_VolumeSet; \
(p_symbols)->aout_VolumeInfos_inner = aout_VolumeInfos; \
(p_symbols)->aout_VolumeUp_inner = aout_VolumeUp; \
(p_symbols)->aout_VolumeDown_inner = aout_VolumeDown; \
(p_symbols)->__config_GetInt_inner = __config_GetInt; \
(p_symbols)->__config_PutInt_inner = __config_PutInt; \
(p_symbols)->__config_GetFloat_inner = __config_GetFloat; \
...
...
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