Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
e
os
android_packages_apps_Eleven
Commits
c32971bb
Commit
c32971bb
authored
Dec 12, 2014
by
Linus Lee
Committed by
Gerrit Code Review
Dec 12, 2014
Browse files
Merge "EqualizerView: don't compute log(0)" into cm-12.0
parents
fe29ab1b
a621a144
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/com/cyanogenmod/eleven/widgets/EqualizerView.java
View file @
c32971bb
...
...
@@ -94,7 +94,7 @@ public class EqualizerView extends VisualizerView {
byte
rfk
=
data
.
bytes
[
mDivisions
*
i
];
byte
ifk
=
data
.
bytes
[
mDivisions
*
i
+
1
];
float
magnitude
=
(
rfk
*
rfk
+
ifk
*
ifk
);
int
dbValue
=
(
int
)
(
10
*
Math
.
log10
(
magnitude
));
int
dbValue
=
magnitude
>
0
?
(
int
)
(
10
*
Math
.
log10
(
magnitude
))
:
0
;
mFFTPoints
[
i
*
4
+
1
]
=
rect
.
height
();
mFFTPoints
[
i
*
4
+
3
]
=
rect
.
height
()
-
(
dbValue
*
mDbFuzzFactor
+
mDbFuzz
);
...
...
Write
Preview
Supports
Markdown
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