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:
parent
43c85a4424
commit
e726e53da6
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue