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
671d44d0
Commit
671d44d0
authored
Apr 24, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DirectSound: implement device_select (fixes #8492)
parent
35e1164b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
modules/audio_output/directx.c
modules/audio_output/directx.c
+13
-2
No files found.
modules/audio_output/directx.c
View file @
671d44d0
...
...
@@ -582,17 +582,17 @@ static int InitDirectSound( audio_output_t *p_aout )
goto
error
;
}
char
*
dev
=
var_
Inherit
String
(
p_aout
,
"directx-audio-device"
);
char
*
dev
=
var_
GetNonEmpty
String
(
p_aout
,
"directx-audio-device"
);
if
(
dev
!=
NULL
)
{
LPOLESTR
lpsz
=
ToWide
(
dev
);
free
(
dev
);
if
(
SUCCEEDED
(
IIDFromString
(
lpsz
,
&
guid
)
)
)
p_guid
=
&
guid
;
else
msg_Err
(
p_aout
,
"bad device GUID: %ls"
,
lpsz
);
free
(
lpsz
);
free
(
dev
);
}
/* Create the direct sound object */
...
...
@@ -959,6 +959,14 @@ out:
return
list
.
count
;
}
static
int
DeviceSelect
(
audio_output_t
*
aout
,
const
char
*
id
)
{
var_SetString
(
aout
,
"directx-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
;
...
...
@@ -979,6 +987,7 @@ static int Open(vlc_object_t *obj)
aout
->
stop
=
Stop
;
aout
->
volume_set
=
VolumeSet
;
aout
->
mute_set
=
MuteSet
;
aout
->
device_select
=
DeviceSelect
;
/* Volume */
sys
->
volume
.
volume
=
var_InheritFloat
(
aout
,
"directx-volume"
);
...
...
@@ -1008,6 +1017,7 @@ static int Open(vlc_object_t *obj)
free
(
names
);
free
(
ids
);
}
var_Create
(
aout
,
"directx-audio-device"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
return
VLC_SUCCESS
;
}
...
...
@@ -1016,6 +1026,7 @@ static void Close(vlc_object_t *obj)
audio_output_t
*
aout
=
(
audio_output_t
*
)
obj
;
aout_sys_t
*
sys
=
aout
->
sys
;
var_Destroy
(
aout
,
"directx-audio-device"
);
CloseHandle
(
sys
->
hnotify_evt
);
FreeLibrary
(
sys
->
hdsound_dll
);
/* free DSOUND.DLL */
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