当前位置: 首页>>代码示例>>C++>>正文


C++ FileIO::readLittleEndian方法代码示例

本文整理汇总了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;
}
开发者ID:PhilippeLamarche,项目名称:whistle,代码行数:14,代码来源:SoundFileRead.cpp

示例2: soundReadSample64F_L

double soundReadSample64F_L(FileIO& soundfile) {
   double sample;
   soundfile.readLittleEndian(sample);
   return sample;
}
开发者ID:PhilippeLamarche,项目名称:whistle,代码行数:5,代码来源:SoundFileRead.cpp

示例3: soundReadSample32F_L

double soundReadSample32F_L(FileIO& soundfile) {
   float sample;
   soundfile.readLittleEndian(sample);
   return (double)sample;
}
开发者ID:PhilippeLamarche,项目名称:whistle,代码行数:5,代码来源:SoundFileRead.cpp

示例4: soundReadSample32L_L

double soundReadSample32L_L(FileIO& soundfile) {
   int32_t sample;
   soundfile.readLittleEndian(sample);
   return (double)sample / (uint32_t)0x80000000;
}
开发者ID:PhilippeLamarche,项目名称:whistle,代码行数:5,代码来源:SoundFileRead.cpp

示例5: soundReadSample8M_L

double soundReadSample8M_L(FileIO& soundfile) {
   uint8_t sample;
   soundfile.readLittleEndian(sample);
   return mulaw8ToLinear16(sample) / (int32_t)0x8000;
}
开发者ID:PhilippeLamarche,项目名称:whistle,代码行数:5,代码来源:SoundFileRead.cpp

示例6: soundReadSample32L_L

double soundReadSample32L_L(FileIO& soundfile) {
   long sample;
   soundfile.readLittleEndian(sample);
   return (double)sample / (ulong)0x80000000;
}
开发者ID:zlaski,项目名称:midifile,代码行数:5,代码来源:SoundFileRead.cpp

示例7: soundReadSample16L_L

double soundReadSample16L_L(FileIO& soundfile) {
   short sample;
   soundfile.readLittleEndian(sample);
   return (double)sample / (long)0x8000;
}
开发者ID:zlaski,项目名称:midifile,代码行数:5,代码来源:SoundFileRead.cpp

示例8: soundReadSample8L_L

double soundReadSample8L_L(FileIO& soundfile) {
   char sample;
   soundfile.readLittleEndian(sample);
   return (double)sample / (long)0x80;
}
开发者ID:zlaski,项目名称:midifile,代码行数:5,代码来源:SoundFileRead.cpp

示例9: soundReadSample8M_L

double soundReadSample8M_L(FileIO& soundfile) {
   uchar sample;
   soundfile.readLittleEndian(sample);
   return mulaw8ToLinear16(sample) / (long)0x8000;
}
开发者ID:zlaski,项目名称:midifile,代码行数:5,代码来源:SoundFileRead.cpp


注:本文中的FileIO::readLittleEndian方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。