1
阅读时this Java中的音乐可视化示例。 我想知道作者从哪里得到变量eightBitByteArray。 有人可以解释我如何创建这个数组或它为什么代表?什么是Java中的eightBitByteArray?
for (int t = 0; t < eightBitByteArray.length;) {
for (int channel = 0; channel < numChannels; channel++) {
int low = (int) eightBitByteArray[t];
t++;
int high = (int) eightBitByteArray[t];
t++;
int sample = getSixteenBitSample(high, low);
toReturn[channel][sampleIndex] = sample;
}
sampleIndex++;
}
@FalkJäger在链接中,他说他直接使用byte []! – Danny
我的不好。代码示例让我困惑了一下。谢谢 –