13 else if(ch.
is(
"LIST")){
16 if(std::strcmp(listId,
"DMRF")==0)
27 if(std::strcmp(listId,
"strf")==0){
28 styles.emplace_back(ch);
40void Track::Chord::implReadList(
Riff &ch) {
44 else if(ch.
is(
"crdb")){
47 if(ioSzOf>
sizeof(ioChord))
48 throw std::runtime_error(
"bad track chord");
49 ch.
read(&ioChord,ioSzOf);
56 subchord.resize(cSize);
57 for(
auto& i:subchord){
58 ch.
read(&i,
sizeof(i));
60 ch.
skip(cSzOf-
sizeof(i));
72 commands.resize(count);
74 for(uint32_t i=0;i<count;++i) {
76 input.
read(&io,std::min(sz,
sizeof(io)));
78 input.
skip(sz-
sizeof(io));
85 throw std::runtime_error(
"not a riff");
91 else if(ch.
is(
"cmnd"))
92 cmnd = std::make_shared<CommandTrack>(ch);
93 else if(ch.
is(
"LIST"))
98void Track::implReadList(
Riff& input) {
100 sttr = std::make_shared<StyleTrack>(input);
103 cord = std::make_shared<Chord>(input);
bool is(const char *idx) const
void read(std::u16string &str)
bool isListId(const char *id)
CommandTrack(Riff &chunk)
std::shared_ptr< Chord > cord
std::shared_ptr< CommandTrack > cmnd
DMUS_IO_TRACK_HEADER head
std::shared_ptr< StyleTrack > sttr