Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
0c3c36fd
Commit
0c3c36fd
authored
Oct 31, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aout: implement changing of software gain while not playing
This concerns ALSA, AudioQueue, JACK and KAI.
parent
b1c459e9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
9 deletions
+16
-9
modules/audio_output/alsa.c
modules/audio_output/alsa.c
+1
-0
modules/audio_output/audioqueue.c
modules/audio_output/audioqueue.c
+1
-0
modules/audio_output/jack.c
modules/audio_output/jack.c
+1
-1
modules/audio_output/kai.c
modules/audio_output/kai.c
+2
-2
modules/audio_output/volume.h
modules/audio_output/volume.h
+11
-6
No files found.
modules/audio_output/alsa.c
View file @
0c3c36fd
...
...
@@ -531,6 +531,7 @@ static int Start (audio_output_t *aout, audio_sample_format_t *restrict fmt)
var_AddCallback
(
aout
,
"audio-device"
,
DeviceChanged
,
NULL
);
free
(
device
);
aout_SoftVolumeStart
(
aout
);
return
0
;
error:
...
...
modules/audio_output/audioqueue.c
View file @
0c3c36fd
...
...
@@ -126,6 +126,7 @@ static int Start( audio_output_t *aout, audio_sample_format_t *restrict fmt )
p_aout
->
play
=
aout_PacketPlay
;
p_aout
->
pause
=
aout_PacketPause
;
p_aout
->
flush
=
aout_PacketFlush
;
aout_SoftVolumeStart
(
p_aout
);
msg_Dbg
(
p_aout
,
"Starting AudioQueue (status = %i)"
,
status
);
status
=
AudioQueueStart
(
p_sys
->
audioQueue
,
NULL
);
...
...
modules/audio_output/jack.c
View file @
0c3c36fd
...
...
@@ -137,7 +137,7 @@ static int Start( audio_output_t *p_aout, audio_sample_format_t *restrict fmt )
p_aout
->
flush
=
aout_PacketFlush
;
aout_PacketInit
(
p_aout
,
&
p_sys
->
packet
,
jack_get_buffer_size
(
p_sys
->
p_jack_client
),
fmt
);
aout_SoftVolume
Ini
t
(
p_aout
);
aout_SoftVolume
Star
t
(
p_aout
);
p_sys
->
i_channels
=
aout_FormatNbChannels
(
fmt
);
...
...
modules/audio_output/kai.c
View file @
0c3c36fd
...
...
@@ -204,10 +204,10 @@ static int Start ( audio_output_t *p_aout, audio_sample_format_t *fmt )
p_aout
->
play
=
Play
;
p_aout
->
pause
=
aout_PacketPause
;
p_aout
->
flush
=
aout_PacketFlush
;
aout_SoftVolumeStart
(
p_aout
);
aout_PacketInit
(
p_aout
,
&
p_sys
->
packet
,
ks_obtained
.
ulBufferSize
/
i_bytes_per_frame
);
aout_SoftVolumeInit
(
p_aout
);
if
(
var_Type
(
p_aout
,
"audio-device"
)
==
0
)
{
...
...
@@ -343,8 +343,8 @@ static int Open (vlc_object_t *obj)
{
audio_output_t
*
aout
=
(
audio_output_t
*
)
obj
;
/* FIXME: set volume/mute here */
aout
->
start
=
Start
;
aout
->
stop
=
Stop
;
aout_SoftVolumeInit
(
p_aout
);
return
VLC_SUCCESS
;
}
modules/audio_output/volume.h
View file @
0c3c36fd
...
...
@@ -71,12 +71,6 @@ static void aout_SoftVolumeInit(audio_output_t *aout)
float
gain
=
var_InheritFloat
(
aout
,
MODULE_STRING
"-gain"
);
bool
mute
=
var_InheritBool
(
aout
,
"mute"
);
if
(
aout_GainRequest
(
aout
,
mute
?
0
.
f
:
gain
))
{
mute
=
false
;
gain
=
1
.
f
;
}
aout
->
volume_set
=
aout_SoftVolumeSet
;
aout
->
mute_set
=
aout_SoftMuteSet
;
sys
->
soft_gain
=
gain
;
...
...
@@ -85,3 +79,14 @@ static void aout_SoftVolumeInit(audio_output_t *aout)
aout_MuteReport
(
aout
,
mute
);
aout_VolumeReport
(
aout
,
cbrtf
(
gain
));
}
static
void
aout_SoftVolumeStart
(
audio_output_t
*
aout
)
{
aout_sys_t
*
sys
=
aout
->
sys
;
if
(
aout_GainRequest
(
aout
,
sys
->
soft_mute
?
0
.
f
:
sys
->
soft_gain
))
{
aout_MuteReport
(
aout
,
false
);
aout_VolumeReport
(
aout
,
1
.
f
);
}
}
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