22 using Streaming::operator >>;
26 ifstream &file(*(_readerpointerpair.second._filestream));
31 if (header.nbrBits != 16)
32 throw runtime_error(
"LMAParser():run: The lma file seems to contain 8-bit wavefroms '"
33 +
toString(header.nbrBits) +
"'. Currently this is not supported.");
36 toString(header.nbrChannels) +
"' channels:");
38 for (int16_t i(0) ; i < header.nbrChannels ;++i)
41 ((header.usedChannelBitmask & (0x1<<i))?
"":
"not") +
" recorded!");
42 if (header.usedChannelBitmask & (0x1<<i))
49 const streampos eventStartPos(file.tellg());
51 savePos(eventStartPos,evtHead.id);
53 for (int16_t i=0; i<header.nbrChannels;++i)
55 if (header.usedChannelBitmask & (0x1<<i))
57 int16_t nbrPulses(Streaming::retrieve<int16_t>(file));
58 for (int16_t i(0); i < nbrPulses; ++i)
62 const size_t dataSize(pulsHead.length * 2);
63 file.seekg(dataSize,ios_base::cur);
contains the layout of the lma file headers.
void runthis()
parse the lma file
static void add(Level level, const std::string &line)
add a string to the log
std::string toString(const Type &t)
convert any type to a string
contains class to parse a lma file
contains a logger for cass