From e726e53da68d3ff53a79023d5dc5cfcc020fb864 Mon Sep 17 00:00:00 2001 From: Maurus Cuelenaere Date: Mon, 16 Aug 2010 20:12:01 +0000 Subject: [PATCH] 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 --- android/src/org/rockbox/RockboxPCM.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); }