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
94dca036
Commit
94dca036
authored
Apr 22, 2013
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auhal: do proper deinitialization when device changes
parent
d892a6b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
modules/audio_output/auhal.c
modules/audio_output/auhal.c
+7
-4
No files found.
modules/audio_output/auhal.c
View file @
94dca036
...
...
@@ -79,6 +79,7 @@ struct aout_sys_t
{
AudioObjectID
i_default_dev
;
/* DeviceID of defaultOutputDevice */
AudioObjectID
i_selected_dev
;
/* DeviceID of the selected device */
AudioObjectID
i_new_selected_dev
;
/* DeviceID of device which will be selected on start */
bool
b_selected_dev_is_digital
;
AudioDeviceIOProcID
i_procID
;
/* DeviceID of current device */
bool
b_digital
;
/* Are we running in digital mode? */
...
...
@@ -255,6 +256,8 @@ static int Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
p_sys
->
b_changed_mixing
=
false
;
p_sys
->
i_bytes_per_sample
=
0
;
p_sys
->
i_selected_dev
=
p_sys
->
i_new_selected_dev
;
aout_FormatPrint
(
p_aout
,
"VLC is looking for:"
,
fmt
);
msg_Dbg
(
p_aout
,
"attempting to use device %i"
,
p_sys
->
i_selected_dev
);
...
...
@@ -1071,17 +1074,17 @@ static int SwitchAudioDevice(audio_output_t *p_aout, const char *name)
struct
aout_sys_t
*
p_sys
=
p_aout
->
sys
;
if
(
name
)
p_sys
->
i_selected_dev
=
atoi
(
name
);
p_sys
->
i_
new_
selected_dev
=
atoi
(
name
);
else
p_sys
->
i_selected_dev
=
0
;
p_sys
->
i_
new_
selected_dev
=
0
;
bool
b_supports_digital
=
(
p_sys
->
i_selected_dev
&
AOUT_VAR_SPDIF_FLAG
);
bool
b_supports_digital
=
(
p_sys
->
i_
new_
selected_dev
&
AOUT_VAR_SPDIF_FLAG
);
if
(
b_supports_digital
)
p_sys
->
b_selected_dev_is_digital
=
true
;
else
p_sys
->
b_selected_dev_is_digital
=
false
;
p_sys
->
i_
selected_dev
=
p_sys
->
i
_selected_dev
&
~
AOUT_VAR_SPDIF_FLAG
;
p_sys
->
i_
new_selected_dev
=
p_sys
->
i_new
_selected_dev
&
~
AOUT_VAR_SPDIF_FLAG
;
aout_DeviceReport
(
p_aout
,
name
);
aout_RestartRequest
(
p_aout
,
AOUT_RESTART_OUTPUT
);
...
...
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