本文整理汇总了C++中FileIO::readLittleEndian方法的典型用法代码示例。如果您正苦于以下问题:C++ FileIO::readLittleEndian方法的具体用法?C++ FileIO::readLittleEndian怎么用?C++ FileIO::readLittleEndian使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileIO
的用法示例。
在下文中一共展示了FileIO::readLittleEndian方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: soundReadSample24L_L
double soundReadSample24L_L(FileIO& soundfile) {
unsigned char temp[3];
int32_t sample;
soundfile.readLittleEndian(temp[2]);
soundfile.readLittleEndian(temp[1]);
soundfile.readLittleEndian(temp[0]);
sample = temp[0];
sample = (sample << 8) | temp[1];
sample = (sample << 8) | temp[2];
if (temp[0] & 0x80) {
sample = sample | 0xff000000;
}
return (double)sample / (int32_t)0x800000;
}
示例2: soundReadSample64F_L
double soundReadSample64F_L(FileIO& soundfile) {
double sample;
soundfile.readLittleEndian(sample);
return sample;
}
示例3: soundReadSample32F_L
double soundReadSample32F_L(FileIO& soundfile) {
float sample;
soundfile.readLittleEndian(sample);
return (double)sample;
}
示例4: soundReadSample32L_L
double soundReadSample32L_L(FileIO& soundfile) {
int32_t sample;
soundfile.readLittleEndian(sample);
return (double)sample / (uint32_t)0x80000000;
}
示例5: soundReadSample8M_L
double soundReadSample8M_L(FileIO& soundfile) {
uint8_t sample;
soundfile.readLittleEndian(sample);
return mulaw8ToLinear16(sample) / (int32_t)0x8000;
}
示例6: soundReadSample32L_L
double soundReadSample32L_L(FileIO& soundfile) {
long sample;
soundfile.readLittleEndian(sample);
return (double)sample / (ulong)0x80000000;
}
示例7: soundReadSample16L_L
double soundReadSample16L_L(FileIO& soundfile) {
short sample;
soundfile.readLittleEndian(sample);
return (double)sample / (long)0x8000;
}
示例8: soundReadSample8L_L
double soundReadSample8L_L(FileIO& soundfile) {
char sample;
soundfile.readLittleEndian(sample);
return (double)sample / (long)0x80;
}
示例9: soundReadSample8M_L
double soundReadSample8M_L(FileIO& soundfile) {
uchar sample;
soundfile.readLittleEndian(sample);
return mulaw8ToLinear16(sample) / (long)0x8000;
}