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
cbc0c6f7
Commit
cbc0c6f7
authored
13 years ago
by
Alexandre Savard
Browse files
Options
Downloads
Patches
Plain Diff
#8672: Add linear to decibel conversion functions in audio layer
parent
ca08bac9
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
daemon/src/audio/audiolayer.h
+15
-1
15 additions, 1 deletion
daemon/src/audio/audiolayer.h
with
15 additions
and
1 deletion
daemon/src/audio/audiolayer.h
+
15
−
1
View file @
cbc0c6f7
...
@@ -110,6 +110,20 @@ class AudioLayer {
...
@@ -110,6 +110,20 @@ class AudioLayer {
*/
*/
static
void
applyGain
(
SFLDataFormat
*
src
,
int
samples
,
int
gain
);
static
void
applyGain
(
SFLDataFormat
*
src
,
int
samples
,
int
gain
);
/**
* Convert audio amplitude value from linear value to dB
*/
static
double
amplitudeLinearToDB
(
double
value
)
{
return
20.0
*
log10
(
value
);
}
/**
* Convert audio amplitude from dB to Linear value
*/
static
double
ampluitudeDBToLinear
(
double
value
)
{
return
pow
(
10.0
,
value
/
20.0
);
}
/**
/**
* Set capture stream gain (microphone)
* Set capture stream gain (microphone)
*/
*/
...
...
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