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
63992423
Commit
63992423
authored
Jan 14, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hotkeys: use aout_DeviceGet() and aout_DevicesList()
parent
d7dd7e50
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
15 deletions
+22
-15
modules/control/hotkeys.c
modules/control/hotkeys.c
+22
-15
No files found.
modules/control/hotkeys.c
View file @
63992423
...
...
@@ -319,27 +319,34 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
if
(
p_aout
==
NULL
)
break
;
char
*
dev
=
var_GetNonEmptyString
(
p_aout
,
"device"
);
const
char
*
devstr
=
(
dev
!=
NULL
)
?
dev
:
""
;
char
**
ids
,
**
names
;
int
n
=
aout_DevicesList
(
p_aout
,
&
ids
,
&
names
);
if
(
n
==
-
1
)
break
;
vlc_value_t
ids
,
names
;
var_Change
(
p_aout
,
"device"
,
VLC_VAR_GETCHOICES
,
&
ids
,
&
names
)
;
char
*
dev
=
aout_DeviceGet
(
p_aout
)
;
const
char
*
devstr
=
(
dev
!=
NULL
)
?
dev
:
""
;
int
i
=
0
;
for
(
i
=
0
;
i
<
ids
.
p_list
->
i_count
;
i
++
)
if
(
!
strcmp
(
devstr
,
ids
.
p_list
->
p_values
[
i
].
psz_string
)
)
break
;
int
idx
=
0
;
for
(
int
i
=
0
;
i
<
n
;
i
++
)
{
if
(
!
strcmp
(
devstr
,
ids
[
i
])
)
idx
=
(
i
+
1
)
%
n
;
}
free
(
dev
);
i
++
;
if
(
i
>=
ids
.
p_list
->
i_count
)
i
=
0
;
if
(
!
aout_DeviceSet
(
p_aout
,
ids
.
p_list
->
p_values
[
i
].
psz_string
)
)
if
(
!
aout_DeviceSet
(
p_aout
,
ids
[
idx
]
)
)
DisplayMessage
(
p_vout
,
SPU_DEFAULT_CHANNEL
,
_
(
"Audio Device: %s"
),
names
.
p_list
->
p_values
[
i
].
psz_string
);
var_FreeList
(
&
ids
,
&
names
);
_
(
"Audio Device: %s"
),
names
[
idx
]
);
vlc_object_release
(
p_aout
);
for
(
int
i
=
0
;
i
<
n
;
i
++
)
{
free
(
ids
[
i
]
);
free
(
names
[
i
]
);
}
free
(
ids
);
free
(
names
);
break
;
}
...
...
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