11 #include "../Audacity.h"
15 #include <wx/wxcrtvararg.h>
20 #include "../DirManager.h"
21 #include "../FileFormats.h"
22 #include "../xml/XMLTagHandler.h"
31 :
PCMAliasBlockFile{ std::move(fileName), std::move(aliasedFileName), aliasStart, aliasLen,
32 aliasChannel, 0.0, 0.0, 0.0 }
43 &mSummaryInfo, noRMS, FALSE,
57 auto newBlockFile = make_blockfile<LegacyAliasBlockFile>
59 mAliasStart, mLen, mAliasChannel,
60 mSummaryInfo.totalSummaryBytes, mSummaryInfo.fields < 3);
68 xmlFile.
StartTag(wxT(
"legacyblockfile"));
71 xmlFile.
WriteAttr(wxT(
"name"), mFileName.GetFullName());
72 xmlFile.
WriteAttr(wxT(
"aliaspath"), mAliasedFileName.GetFullPath());
74 mAliasStart.as_long_long() );
76 xmlFile.
WriteAttr(wxT(
"aliaschannel"), mAliasChannel);
77 xmlFile.
WriteAttr(wxT(
"summarylen"), mSummaryInfo.totalSummaryBytes);
78 if (mSummaryInfo.fields < 3)
81 xmlFile.
EndTag(wxT(
"legacyblockfile"));
91 int aliasStart=0, aliasLen=0, aliasChannel=0;
99 const wxChar *attr = *attrs++;
100 const wxChar *value = *attrs++;
104 const wxString strValue = value;
109 summaryFileName.Assign(projDir, strValue, wxT(
""));
110 else if ( !wxStricmp(attr, wxT(
"aliaspath")) )
113 aliasFileName.Assign(strValue);
116 aliasFileName.Assign(projDir, strValue);
121 aliasFileName.Assign(strValue);
123 else if ( !wxStricmp(attr, wxT(
"aliasstart")) )
126 strValue.ToLongLong(&nnValue) && (nnValue >= 0))
127 aliasStart = nnValue;
131 if (!wxStricmp(attr, wxT(
"aliaslen")) && (nValue >= 0))
134 aliasChannel = nValue;
135 else if (!wxStricmp(attr, wxT(
"summarylen")) && (nValue > 0))
137 else if (!wxStricmp(attr, wxT(
"norms")))
138 noRMS = (nValue != 0);
142 return make_blockfile<LegacyAliasBlockFile>
143 (std::move(summaryFileName), std::move(aliasFileName),
144 aliasStart, aliasLen, aliasChannel, summaryLen, noRMS);
152 static const auto sFactory = []( DirManager &dm,
const wxChar **attrs ){
160 if (!wxStricmp(attrs[i], wxT(
"alias"))) {
161 if (wxAtoi(attrs[i+1])==1)
171 dm.GetProjectDataDir(), attrs);
174 dm.GetLoadingBlockLength(),
175 dm.GetLoadingFormat());