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
11b2bb4d
Commit
11b2bb4d
authored
Jun 12, 2005
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* backport of [11404]
parent
72725d24
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
modules/audio_output/auhal.c
modules/audio_output/auhal.c
+20
-1
No files found.
modules/audio_output/auhal.c
View file @
11b2bb4d
...
...
@@ -82,6 +82,7 @@ static void Play ( aout_instance_t *);
static
int
Probe
(
aout_instance_t
*
);
static
int
DeviceDigitalMode
(
aout_instance_t
*
,
AudioDeviceID
);
int
AudioDeviceHasOutput
(
AudioDeviceID
);
static
int
DigitalInit
(
aout_instance_t
*
);
static
OSStatus
RenderCallbackAnalog
(
vlc_object_t
*
,
AudioUnitRenderActionFlags
*
,
const
AudioTimeStamp
*
,
...
...
@@ -165,6 +166,7 @@ static int Open( vlc_object_t * p_this )
return VLC_EGENERIC;
}
*/
if
(
AOUT_FMT_NON_LINEAR
(
&
p_aout
->
output
.
output
)
&&
p_sys
->
b_supports_digital
)
{
p_sys
->
b_digital
=
VLC_TRUE
;
...
...
@@ -568,7 +570,7 @@ static int Probe( aout_instance_t * p_aout )
char
psz_devuid
[
1024
];
char
psz_name
[
1024
];
CFStringRef
devUID
;
i_param_size
=
sizeof
psz_name
;
err
=
AudioDeviceGetProperty
(
p_devices
[
i
],
0
,
VLC_FALSE
,
...
...
@@ -589,6 +591,12 @@ static int Probe( aout_instance_t * p_aout )
msg_Dbg
(
p_aout
,
"DevID: %lu DevName: %s DevUID: %s"
,
p_devices
[
i
],
psz_name
,
psz_devuid
);
CFRelease
(
devUID
);
if
(
!
AudioDeviceHasOutput
(
p_aout
,
p_devices
[
i
])
)
{
msg_Dbg
(
p_aout
,
"this device is INPUT only. skipping..."
);
continue
;
}
val
.
i_int
=
(
int
)
p_devices
[
i
];
text
.
psz_string
=
psz_name
;
var_Change
(
p_aout
,
"audio-device"
,
VLC_VAR_ADDCHOICE
,
&
val
,
&
text
);
...
...
@@ -780,6 +788,17 @@ error:
return
VLC_EGENERIC
;
}
int
AudioDeviceHasOutput
(
AudioDeviceID
i_dev_id
)
{
UInt32
dataSize
;
Boolean
isWritable
;
verify_noerr
(
AudioDeviceGetPropertyInfo
(
i_dev_id
,
0
,
FALSE
,
kAudioDevicePropertyStreams
,
&
dataSize
,
&
isWritable
)
);
if
(
dataSize
==
0
)
return
FALSE
;
return
TRUE
;
}
/*****************************************************************************
* HardwareListener: Warns us of changes in the list of registered devices
...
...
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