当解析出的pcm wav 为44100Hz 2 channel 时,可能并不是真正的pcm,而是DTS Stream, 当decoder 把DTS当成PCM去解的时候,
显而易见,会出现问题,将是一片杂音;
所以需要鉴定一下是否是DTS
以下offset 为文件起始位置
//get data chunck
lseek(fd, offset+36, SEEK_SET);
do
{
if(read(fd, chunkHeader, chunkHeaderSize) < chunkHeaderSize){
bUseAndroidPlayer = false;
lseek(fd, offset, SEEK_SET);
return false;
}
chunk_size = chunkHeader[7] << 24 | chunkHeader[6] << 16 | chunkHeader[5] << 8 | chunkHeader[4];
if (memcmp(chunkHeader, "data", 4))
lseek(fd, chunk_size, SEEK_CUR);
} while (memcmp(chunkHeader, "data", 4));
uint8_t dtsValue[4];
uint8_t dtsValueSize = 4;
uint32_t value;
read(fd, d