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
This commit is contained in:
Maurus Cuelenaere 2010-08-16 20:12:01 +00:00
parent 43c85a4424
commit e726e53da6

View file

@ -21,6 +21,8 @@
package org.rockbox; package org.rockbox;
import java.util.Arrays;
import android.media.AudioFormat; import android.media.AudioFormat;
import android.media.AudioManager; import android.media.AudioManager;
import android.media.AudioTrack; import android.media.AudioTrack;
@ -56,7 +58,7 @@ public class RockboxPCM extends AudioTrack
buf_len = 24<<10; /* in bytes */ buf_len = 24<<10; /* in bytes */
raw_data = new byte[buf_len]; /* in shorts */ 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); l = new PCMListener(buf_len);
} }