Skip to content

Commit

Permalink
Recorder: Remove not needed & 0xff
Browse files Browse the repository at this point in the history
The byte is already bounded to <= 0xff per definition.

Change-Id: Id68fd6f931b215d83d10a136310d2d5e37f85be3
  • Loading branch information
luca020400 committed Oct 4, 2023
1 parent 4d384f8 commit f119808
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ private void recordingThreadImpl() {
if (status != 0) {
if (mTrackAmplitude.get()) {
for (int i = 0; i < status; i = i + 2) {
int value = Math.abs(data[i] & 0xff | data[i + 1] << 8);
int value = Math.abs(data[i] | data[i + 1] << 8);
if (mMaxAmplitude < value) {
mMaxAmplitude = value;
}
Expand Down

0 comments on commit f119808

Please sign in to comment.