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
8a1ace9e
Commit
8a1ace9e
authored
Dec 16, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AudioQueue: implement volume support just because we can
parent
10a5990d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
modules/audio_output/audioqueue.c
modules/audio_output/audioqueue.c
+23
-0
No files found.
modules/audio_output/audioqueue.c
View file @
8a1ace9e
...
...
@@ -47,6 +47,7 @@ struct aout_sys_t
{
AudioQueueRef
audioQueue
;
bool
b_stopped
;
float
f_volume
;
};
/*****************************************************************************
...
...
@@ -207,6 +208,24 @@ static int TimeGet (audio_output_t *p_aout, mtime_t *restrict delay)
return
-
1
;
}
/*****************************************************************************
* Module management
*****************************************************************************/
static
int
VolumeSet
(
audio_output_t
*
p_aout
,
float
volume
)
{
struct
aout_sys_t
*
p_sys
=
p_aout
->
sys
;
OSStatus
ostatus
;
aout_VolumeReport
(
p_aout
,
volume
);
p_sys
->
f_volume
=
volume
;
/* Set volume for output unit */
ostatus
=
AudioQueueSetParameter
(
p_sys
->
audioQueue
,
kAudioQueueParam_Volume
,
volume
*
volume
*
volume
);
return
ostatus
;
}
/*****************************************************************************
* Module management
*****************************************************************************/
...
...
@@ -222,6 +241,10 @@ static int Open(vlc_object_t *obj)
aout
->
sys
=
sys
;
aout
->
start
=
Start
;
aout
->
stop
=
Stop
;
aout
->
volume_set
=
VolumeSet
;
/* reset volume */
aout_VolumeReport
(
aout
,
1
.
0
);
return
VLC_SUCCESS
;
}
...
...
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