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
10605093
Commit
10605093
authored
Apr 14, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ALSA: adapt to hotplug event
parent
51406fae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
modules/audio_output/alsa.c
modules/audio_output/alsa.c
+16
-6
No files found.
modules/audio_output/alsa.c
View file @
10605093
...
...
@@ -740,11 +740,6 @@ static int EnumDevices(vlc_object_t *obj, char const *varname,
return
n
;
}
static
int
DevicesEnum
(
audio_output_t
*
aout
,
char
***
idp
,
char
***
namep
)
{
return
EnumDevices
(
VLC_OBJECT
(
aout
),
NULL
,
idp
,
namep
);
}
static
int
DeviceSelect
(
audio_output_t
*
aout
,
const
char
*
id
)
{
aout_sys_t
*
sys
=
aout
->
sys
;
...
...
@@ -775,9 +770,24 @@ static int Open(vlc_object_t *obj)
aout
->
start
=
Start
;
aout
->
stop
=
Stop
;
aout_SoftVolumeInit
(
aout
);
aout
->
device_enum
=
DevicesEnum
;
aout
->
device_select
=
DeviceSelect
;
aout_DeviceReport
(
aout
,
sys
->
device
);
/* ALSA does not support hot-plug events so list devices at startup */
char
**
ids
,
**
names
;
int
count
=
EnumDevices
(
VLC_OBJECT
(
aout
),
NULL
,
&
ids
,
&
names
);
if
(
count
>=
0
)
{
for
(
int
i
=
0
;
i
<
count
;
i
++
)
{
aout_HotplugReport
(
aout
,
ids
[
i
],
names
[
i
]);
free
(
names
[
i
]);
free
(
ids
[
i
]);
}
free
(
names
);
free
(
ids
);
}
return
VLC_SUCCESS
;
error:
free
(
sys
);
...
...
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