Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
dbaac983
Commit
dbaac983
authored
Jun 28, 2004
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* take hog mode if during AC3 playback
jlj could you please verify this ?
parent
4c40a909
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
0 deletions
+64
-0
modules/audio_output/coreaudio.c
modules/audio_output/coreaudio.c
+64
-0
No files found.
modules/audio_output/coreaudio.c
View file @
dbaac983
...
...
@@ -158,6 +158,7 @@ struct aout_sys_t
UInt32
i_stream_index
;
AudioStreamBasicDescription
stream_format
;
UInt32
b_dev_alive
;
pid_t
i_hog_pid
;
vlc_bool_t
b_revert_sfmt
;
AudioStreamBasicDescription
sfmt_revert
;
...
...
@@ -361,6 +362,56 @@ static int Open( vlc_object_t * p_this )
msg_Dbg
(
p_aout
,
"device bufframe size set to: [%ld]"
,
p_sys
->
i_bufframe_size
);
if
(
err
!=
noErr
)
{
msg_Err
(
p_aout
,
"failed to set bufframe size (%ld): [%4.4s]"
,
p_sys
->
i_bufframe_size
,
(
char
*
)
&
err
);
FreeDevice
(
p_aout
);
FreeHardwareInfo
(
p_aout
);
vlc_mutex_destroy
(
&
p_sys
->
lock
);
free
(
(
void
*
)
p_sys
);
return
(
VLC_EGENERIC
);
}
i_param_size
=
sizeof
(
p_sys
->
i_hog_pid
);
err
=
AudioDeviceGetProperty
(
p_sys
->
devid
,
0
,
FALSE
,
kAudioDevicePropertyHogMode
,
&
i_param_size
,
&
p_sys
->
i_hog_pid
);
if
(
!
err
)
{
msg_Dbg
(
p_aout
,
"Current status of hog mode: pid=%d vlc pid=%d
\n
"
,
(
int
)
p_sys
->
i_hog_pid
,
(
int
)
getpid
()
);
if
(
p_sys
->
i_hog_pid
!=
getpid
()
)
{
p_sys
->
i_hog_pid
=
getpid
()
;
err
=
AudioDeviceSetProperty
(
p_sys
->
devid
,
0
,
0
,
FALSE
,
kAudioDevicePropertyHogMode
,
sizeof
(
i_param_size
),
&
p_sys
->
i_hog_pid
);
if
(
!
err
)
{
msg_Dbg
(
p_aout
,
"Successfully set hog mode - new pid=%d!
\n
"
,
(
int
)
p_sys
->
i_hog_pid
);
err
=
AudioDeviceGetProperty
(
p_sys
->
devid
,
0
,
FALSE
,
kAudioDevicePropertyHogMode
,
&
i_param_size
,
&
p_sys
->
i_hog_pid
);
if
(
!
err
)
{
msg_Dbg
(
p_aout
,
"Checking new status of hog mode: pid=%d vlc pid=%d
\n
"
,
(
int
)
p_sys
->
i_hog_pid
,
(
int
)
getpid
()
);
}
}
}
}
if
(
err
!=
noErr
)
{
msg_Err
(
p_aout
,
"failed to set hogmode: : [%4.4s]"
,
(
char
*
)
&
err
);
FreeDevice
(
p_aout
);
FreeHardwareInfo
(
p_aout
);
vlc_mutex_destroy
(
&
p_sys
->
lock
);
free
(
(
void
*
)
p_sys
);
return
(
VLC_EGENERIC
);
}
}
switch
(
p_sys
->
stream_format
.
mFormatID
)
...
...
@@ -1323,6 +1374,19 @@ static void FreeDevice( aout_instance_t * p_aout )
(
char
*
)
&
err
);
}
}
if
(
(
int
)
p_sys
->
i_hog_pid
!=
-
1
)
{
p_sys
->
i_hog_pid
=
(
pid_t
)
-
1
;
err
=
AudioDeviceSetProperty
(
p_sys
->
devid
,
0
,
0
,
FALSE
,
kAudioDevicePropertyHogMode
,
sizeof
(
p_sys
->
i_hog_pid
),
&
p_sys
->
i_hog_pid
);
if
(
err
!=
noErr
)
{
msg_Err
(
p_aout
,
"Releasing hog mode failed: [%4.4s]"
,
(
char
*
)
&
err
);
}
}
}
err
=
AudioDeviceRemovePropertyListener
(
p_sys
->
devid
,
0
,
FALSE
,
...
...
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