예제 #1
0
void ChanneledJsonDecompressor::readChannels(folly::io::Cursor& cursor) {
  uint32_t length;
  try {
    for (int i = 0; i < NUM_OF_CHANNELS; ++i) {
      length = cursor.readBE<uint32_t>();
      channels_.push_back(ChannelState(cursor.readFixedString(length)));
    }
  } catch (std::logic_error& ex) {
    // something wrong has happened - probably malformed file
    Logger::Warning("Malformed input file");
    throw;
  }
}
예제 #2
0
파일: asc_supp.cpp 프로젝트: fgroen/zxtune
 virtual void Reset()
 {
   std::fill(PlayerState.begin(), PlayerState.end(), ChannelState());
 }