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
93a0d5ab
Commit
93a0d5ab
authored
Mar 05, 2012
by
Jon Stacey
Committed by
Felix Paul Kühne
Mar 05, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coreaudio_lag_fix.patch
Signed-off-by:
Felix Paul Kühne
<
fkuehne@videolan.org
>
parent
a3dce49a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
1 deletion
+27
-1
modules/audio_output/auhal.c
modules/audio_output/auhal.c
+27
-1
No files found.
modules/audio_output/auhal.c
View file @
93a0d5ab
...
@@ -119,6 +119,8 @@ static OSStatus StreamListener ( AudioObjectID, UInt32, const AudioObje
...
@@ -119,6 +119,8 @@ static OSStatus StreamListener ( AudioObjectID, UInt32, const AudioObje
static
int
AudioDeviceCallback
(
vlc_object_t
*
,
const
char
*
,
static
int
AudioDeviceCallback
(
vlc_object_t
*
,
const
char
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
VolumeSet
(
audio_output_t
*
,
float
,
bool
);
/*****************************************************************************
/*****************************************************************************
* Module descriptor
* Module descriptor
...
@@ -557,7 +559,7 @@ static int OpenAnalog( audio_output_t *p_aout )
...
@@ -557,7 +559,7 @@ static int OpenAnalog( audio_output_t *p_aout )
/* Do the last VLC aout setups */
/* Do the last VLC aout setups */
aout_FormatPrepare
(
&
p_aout
->
format
);
aout_FormatPrepare
(
&
p_aout
->
format
);
aout_PacketInit
(
p_aout
,
&
p_sys
->
packet
,
FRAMESIZE
);
aout_PacketInit
(
p_aout
,
&
p_sys
->
packet
,
FRAMESIZE
);
aout_Volume
SoftInit
(
p_aout
);
aout_Volume
HardInit
(
p_aout
,
VolumeSet
);
/* set the IOproc callback */
/* set the IOproc callback */
input
.
inputProc
=
(
AURenderCallback
)
RenderCallbackAnalog
;
input
.
inputProc
=
(
AURenderCallback
)
RenderCallbackAnalog
;
...
@@ -1448,3 +1450,27 @@ static int AudioDeviceCallback( vlc_object_t *p_this, const char *psz_variable,
...
@@ -1448,3 +1450,27 @@ static int AudioDeviceCallback( vlc_object_t *p_this, const char *psz_variable,
return
aout_ChannelsRestart
(
p_this
,
psz_variable
,
old_val
,
new_val
,
param
);
return
aout_ChannelsRestart
(
p_this
,
psz_variable
,
old_val
,
new_val
,
param
);
}
}
/*****************************************************************************
* VolumeSet: Implements pf_volume_set(). Update the CoreAudio AU volume immediately.
*****************************************************************************/
static
int
VolumeSet
(
audio_output_t
*
p_aout
,
float
volume
,
bool
mute
)
{
struct
aout_sys_t
*
p_sys
=
p_aout
->
sys
;
OSStatus
ostatus
;
if
(
mute
)
volume
=
0
.
0
;
else
volume
=
volume
*
volume
*
volume
;
// cubic mapping from output.c
/* Set volume for output unit */
ostatus
=
AudioUnitSetParameter
(
p_sys
->
au_unit
,
kHALOutputParam_Volume
,
kAudioUnitScope_Global
,
0
,
volume
,
0
);
return
ostatus
;
}
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