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
5a96724b
Commit
5a96724b
authored
Apr 24, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
waveout: implement device_select (fixes #8491)
parent
9c381bd9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
modules/audio_output/waveout.c
modules/audio_output/waveout.c
+13
-3
No files found.
modules/audio_output/waveout.c
View file @
5a96724b
...
...
@@ -185,7 +185,7 @@ static int Start( audio_output_t *p_aout, audio_sample_format_t *restrict fmt )
fmt
->
i_format
=
var_InheritBool
(
p_aout
,
"waveout-float32"
)
?
VLC_CODEC_FL32:
VLC_CODEC_S16N
;
char
*
dev
=
var_
CreateGet
String
(
p_aout
,
"waveout-audio-device"
);
char
*
dev
=
var_
GetNonEmpty
String
(
p_aout
,
"waveout-audio-device"
);
uint32_t
devid
=
findDeviceID
(
dev
);
if
(
devid
==
WAVE_MAPPER
&&
dev
!=
NULL
&&
stricmp
(
dev
,
"wavemapper"
))
...
...
@@ -753,6 +753,14 @@ static uint32_t findDeviceID(char *psz_device_name)
return
WAVE_MAPPER
;
}
static
int
DeviceSelect
(
audio_output_t
*
aout
,
const
char
*
id
)
{
var_SetString
(
aout
,
"waveout-audio-device"
,
(
id
!=
NULL
)
?
id
:
""
);
aout_DeviceReport
(
aout
,
id
);
aout_RestartRequest
(
aout
,
AOUT_RESTART_OUTPUT
);
return
0
;
}
static
int
Open
(
vlc_object_t
*
obj
)
{
audio_output_t
*
aout
=
(
audio_output_t
*
)
obj
;
...
...
@@ -765,6 +773,7 @@ static int Open(vlc_object_t *obj)
aout
->
stop
=
Stop
;
aout
->
volume_set
=
WaveoutVolumeSet
;
aout
->
mute_set
=
WaveoutMuteSet
;
aout
->
device_select
=
DeviceSelect
;
sys
->
f_volume
=
var_InheritFloat
(
aout
,
"waveout-volume"
);
sys
->
b_mute
=
var_InheritBool
(
aout
,
"mute"
);
...
...
@@ -797,7 +806,7 @@ static int Open(vlc_object_t *obj)
free
(
names
);
free
(
ids
);
}
var_Create
(
aout
,
"waveout-audio-device"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
return
VLC_SUCCESS
;
}
...
...
@@ -806,8 +815,9 @@ static void Close(vlc_object_t *obj)
audio_output_t
*
aout
=
(
audio_output_t
*
)
obj
;
aout_sys_t
*
sys
=
aout
->
sys
;
v
lc_timer_destroy
(
sys
->
volume_poll_timer
);
v
ar_Destroy
(
aout
,
"waveout-audio-device"
);
vlc_timer_destroy
(
sys
->
volume_poll_timer
);
vlc_cond_destroy
(
&
sys
->
cond
);
vlc_mutex_destroy
(
&
sys
->
lock
);
...
...
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