operator MusicSequence() { if( utils::LibWide().isLogOn() ) clog << "=== Parsing SMDL ===\n"; //Set our iterator m_itread = m_itbeg;//m_src.begin(); //#FIXME: It might have been easier to just check for trk chunks and stop when none are left? We'd save a lot of iteration!! m_itEoC = DSE::FindNextChunk( m_itbeg, m_itend, DSE::eDSEChunks::eoc ); //Our end is either the eoc chunk, or the vector's end //Get the headers ParseHeader(); ParseSong(); DSE::DSE_MetaDataSMDL meta( MakeMeta() ); //Check version if( m_hdr.version == static_cast<uint16_t>(eDSEVersion::V415) ) { //Parse tracks and return return std::move( MusicSequence( ParseAllTracks(), std::move(meta) ) ); } else if( m_hdr.version == static_cast<uint16_t>(eDSEVersion::V402) ) { //Parse tracks and return return std::move( MusicSequence( ParseAllTracks(), std::move(meta) ) ); } else { #ifdef _DEBUG cerr << "SMDL_Parser::operator MusicSequence() : Unsupported DSE version!!"; assert(false); #endif throw runtime_error( "SMDL_Parser::operator MusicSequence() : Unsupported DSE version!!" ); } }
void dng_xmp_sdk::NeedMeta () { if (!HasMeta ()) { MakeMeta (); } }
void dng_xmp_sdk::Parse (dng_host &host, const char *buffer, uint32 count) { MakeMeta (); try { try { fPrivate->fMeta->ParseFromBuffer (buffer, count); } CATCH_XMP ("ParseFromBuffer", true) } catch (dng_exception &except) { ClearMeta (); if (host.IsTransientError (except.ErrorCode ())) { throw; } ThrowBadFormat (); } }