AuFileFormat(final AudioFileFormat.Type type, final long byteLength,
final AudioFormat format, final long frameLength) {
super(type, byteLength, format, frameLength);
AudioFormat.Encoding encoding = format.getEncoding();
auType = -1;
if (AudioFormat.Encoding.ALAW.equals(encoding)) {
if (format.getSampleSizeInBits() == 8) {
auType = AU_ALAW_8;
}
} else if (AudioFormat.Encoding.ULAW.equals(encoding)) {
if (format.getSampleSizeInBits() == 8) {
auType = AU_ULAW_8;
}
} else if (AudioFormat.Encoding.PCM_SIGNED.equals(encoding)) {
if (format.getSampleSizeInBits() == 8) {
auType = AU_LINEAR_8;
} else if (format.getSampleSizeInBits() == 16) {
auType = AU_LINEAR_16;
} else if (format.getSampleSizeInBits() == 24) {
auType = AU_LINEAR_24;
} else if (format.getSampleSizeInBits() == 32) {
auType = AU_LINEAR_32;
}
} else if (AudioFormat.Encoding.PCM_FLOAT.equals(encoding)) {
if (format.getSampleSizeInBits() == 32) {
auType = AU_FLOAT;
}
}
}
AuFileFormat.java 文件源码
java
阅读 14
收藏 0
点赞 0
评论 0
项目:openjdk-jdk10
作者:
评论列表
文章目录