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
626174f3
Commit
626174f3
authored
Nov 22, 2013
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auhal: use own thread for notification loop
parent
2f5891bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
modules/audio_output/auhal.c
modules/audio_output/auhal.c
+13
-0
No files found.
modules/audio_output/auhal.c
View file @
626174f3
...
...
@@ -202,6 +202,19 @@ static int Open(vlc_object_t *obj)
p_aout
->
device_select
=
SwitchAudioDevice
;
p_sys
->
device_list
=
CFArrayCreate
(
kCFAllocatorDefault
,
NULL
,
0
,
NULL
);
/*
* Force an own run loop for callbacks.
*
* According to rtaudio, this is absolutely necessary since 10.6 to get correct notifications.
* It might fix issues when using the module as a library where a proper loop is not setup already.
*/
CFRunLoopRef
theRunLoop
=
NULL
;
AudioObjectPropertyAddress
property
=
{
kAudioHardwarePropertyRunLoop
,
kAudioObjectPropertyScopeGlobal
,
kAudioObjectPropertyElementMaster
};
err
=
AudioObjectSetPropertyData
(
kAudioObjectSystemObject
,
&
property
,
0
,
NULL
,
sizeof
(
CFRunLoopRef
),
&
theRunLoop
);
if
(
err
!=
noErr
)
{
msg_Err
(
p_aout
,
"failed to set the run loop property [%4.4s]"
,
(
char
*
)
&
err
);
}
/* Attach a listener so that we are notified of a change in the device setup */
AudioObjectPropertyAddress
audioDevicesAddress
=
{
kAudioHardwarePropertyDevices
,
kAudioObjectPropertyScopeGlobal
,
kAudioObjectPropertyElementMaster
};
err
=
AudioObjectAddPropertyListener
(
kAudioObjectSystemObject
,
&
audioDevicesAddress
,
DevicesListener
,
(
void
*
)
p_aout
);
...
...
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