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
a90e4d11
Commit
a90e4d11
authored
Oct 31, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DirectSound: initialize volume handling early
parent
44e1cfc0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
20 deletions
+11
-20
modules/audio_output/directx.c
modules/audio_output/directx.c
+11
-20
No files found.
modules/audio_output/directx.c
View file @
a90e4d11
...
...
@@ -263,7 +263,8 @@ static int Start( audio_output_t *p_aout, audio_sample_format_t *restrict fmt )
aout_PacketInit
(
p_aout
,
&
p_aout
->
sys
->
packet
,
fmt
->
i_rate
/
20
,
fmt
);
}
p_aout
->
sys
->
volume
.
volume
=
-
1
;
/* Force volume update in thread. TODO: use session volume on Vista+ */
p_aout
->
sys
->
volume
.
volume
=
p_aout
->
sys
->
volume
.
mb
;
/* Now we need to setup our DirectSound play notification structure */
vlc_atomic_set
(
&
p_aout
->
sys
->
notif
.
abort
,
0
);
...
...
@@ -287,23 +288,6 @@ static int Start( audio_output_t *p_aout, audio_sample_format_t *restrict fmt )
p_aout
->
play
=
Play
;
p_aout
->
pause
=
aout_PacketPause
;
p_aout
->
flush
=
aout_PacketFlush
;
/* Volume */
if
(
val
.
i_int
==
AOUT_VAR_SPDIF
)
{
p_aout
->
volume_set
=
NULL
;
p_aout
->
mute_set
=
NULL
;
}
else
{
LONG
mb
=
var_InheritInteger
(
p_aout
,
"directx-volume"
);
p_aout
->
volume_set
=
VolumeSet
;
p_aout
->
mute_set
=
MuteSet
;
p_aout
->
sys
->
volume
.
mb
=
mb
;
aout_VolumeReport
(
p_aout
,
cbrtf
(
powf
(
10
.
f
,
((
float
)
mb
)
/
2000
.
f
))
);
MuteSet
(
p_aout
,
var_InheritBool
(
p_aout
,
"mute"
)
);
}
return
VLC_SUCCESS
;
error:
...
...
@@ -1173,8 +1157,15 @@ static int Open(vlc_object_t *obj)
aout
->
sys
=
sys
;
aout
->
start
=
Start
;
aout
->
stop
=
Stop
;
aout
->
volume_set
=
NULL
;
/* FIXME */
aout
->
mute_set
=
NULL
;
aout
->
volume_set
=
VolumeSet
;
aout
->
mute_set
=
MuteSet
;
/* Volume */
LONG
mb
=
var_InheritInteger
(
aout
,
"directx-volume"
);
sys
->
volume
.
mb
=
mb
;
aout_VolumeReport
(
aout
,
cbrtf
(
powf
(
10
.
f
,
((
float
)
mb
)
/
2000
.
f
)));
MuteSet
(
aout
,
var_InheritBool
(
aout
,
"mute"
));
return
VLC_SUCCESS
;
}
...
...
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