diff options
author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2010-08-16 20:12:01 +0000 |
---|---|---|
committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2010-08-16 20:12:01 +0000 |
commit | e726e53da68d3ff53a79023d5dc5cfcc020fb864 (patch) | |
tree | 89435a8fb7c20abb3799290c5b13986d33867eb6 /android/src/org/rockbox/RockboxPCM.java | |
parent | 43c85a4424d415e8b3f200e5e6d691eb294dfaab (diff) |
Android port: use Arrays.fill() instead of a for-loop for clearing a byte array
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27831 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'android/src/org/rockbox/RockboxPCM.java')
-rw-r--r-- | android/src/org/rockbox/RockboxPCM.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/android/src/org/rockbox/RockboxPCM.java b/android/src/org/rockbox/RockboxPCM.java index 003ca7c74c..f11f37f358 100644 --- a/android/src/org/rockbox/RockboxPCM.java +++ b/android/src/org/rockbox/RockboxPCM.java @@ -21,6 +21,8 @@ package org.rockbox; +import java.util.Arrays; + import android.media.AudioFormat; import android.media.AudioManager; import android.media.AudioTrack; @@ -56,7 +58,7 @@ public class RockboxPCM extends AudioTrack buf_len = 24<<10; /* in bytes */ raw_data = new byte[buf_len]; /* in shorts */ - for(int i = 0; i < raw_data.length; i++) raw_data[i] = (byte)0; + Arrays.fill(raw_data, (byte) 0); l = new PCMListener(buf_len); } |