Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
c00e25b4
Commit
c00e25b4
authored
16 years ago
by
Emmanuel Milou
Browse files
Options
Downloads
Patches
Plain Diff
Clean adjust volume method in alsalayer
parent
2fa53a3d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/audio/alsalayer.cpp
+7
-8
7 additions, 8 deletions
src/audio/alsalayer.cpp
src/audio/pulselayer.cpp
+1
-12
1 addition, 12 deletions
src/audio/pulselayer.cpp
with
8 additions
and
20 deletions
src/audio/alsalayer.cpp
+
7
−
8
View file @
c00e25b4
...
...
@@ -752,17 +752,16 @@ AlsaLayer::soundCardGetIndex( std::string description )
void
*
AlsaLayer
::
adjustVolume
(
void
*
buffer
,
int
len
,
int
stream
)
{
int
vol
;
if
(
stream
==
SFL_PCM_PLAYBACK
)
vol
=
_manager
->
getSpkrVolume
();
else
vol
=
_manager
->
getMicVolume
();
int
vol
,
i
,
size
;
SFLDataFormat
*
src
=
NULL
;
(
stream
==
SFL_PCM_PLAYBACK
)
?
vol
=
_manager
->
getSpkrVolume
()
:
vol
=
_manager
->
getMicVolume
();
src
=
(
SFLDataFormat
*
)
buffer
;
SFLDataFormat
*
src
=
(
SFLDataFormat
*
)
buffer
;
if
(
vol
!=
100
)
{
int
size
=
len
/
sizeof
(
SFLDataFormat
);
int
i
;
size
=
len
/
sizeof
(
SFLDataFormat
);
for
(
i
=
0
;
i
<
size
;
i
++
){
src
[
i
]
=
src
[
i
]
*
vol
/
100
;
}
...
...
This diff is collapsed.
Click to expand it.
src/audio/pulselayer.cpp
+
1
−
12
View file @
c00e25b4
...
...
@@ -348,7 +348,7 @@ void PulseLayer::readFromMic( void )
}
if
(
data
!=
0
){
_micRingBuffer
.
Put
(
(
void
*
)
data
,
r
,
100
);
_micRingBuffer
.
Put
(
(
void
*
)
data
,
r
,
100
);
}
if
(
pa_stream_drop
(
record
->
pulseStream
()
)
<
0
)
{
...
...
@@ -373,17 +373,6 @@ static void retrieve_server_info(pa_context *c UNUSED, const pa_server_info *i,
_debug
(
"
\t\t
Default source name : %s
\n
"
,
i
->
default_source_name
);
}
/*
static void retrieve_client_list(pa_context *c, const pa_client_info *i, int eol, void *userdata)
{
_debug("end of list = %i\n", eol);
_debug("Clients Info: index : %i\n" , i->index);
_debug("\t\tClient name : %s\n" , i->name);
_debug("\t\tOwner module : %i\n" , i->owner_module);
_debug("\t\tDriver : %s\n" , i->driver);
}
*/
static
void
reduce_sink_list_cb
(
pa_context
*
c
UNUSED
,
const
pa_sink_input_info
*
i
,
int
eol
,
void
*
userdata
)
{
PulseLayer
*
pulse
=
(
PulseLayer
*
)
userdata
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment