|
@@ -689,9 +689,14 @@ export const formatXML = (xml: string, xmlUrl?: string): string => {
|
|
|
state.originAudioPlayRate = speeds[0] / state.originSpeed
|
|
|
}
|
|
|
console.log('是否是变速的曲子:',hasVaryingSpeed,speeds)
|
|
|
- const hasCommon = xmlParse.querySelectorAll('part-name')?.[0]?.textContent === 'common';
|
|
|
- const currentTrackIndex = hasCommon ? state.partIndex + 1 : state.partIndex;
|
|
|
- const repeats: any = Array.from(xmlParse.querySelectorAll('part')?.[currentTrackIndex]?.querySelectorAll('repeat')) || [];
|
|
|
+ let repeats: any = [];
|
|
|
+ if (state.partIndex === 999) {
|
|
|
+ repeats = Array.from(xmlParse.querySelectorAll('repeat')) || [];
|
|
|
+ } else {
|
|
|
+ const hasCommon = xmlParse.querySelectorAll('part-name')?.[0]?.textContent === 'common';
|
|
|
+ const currentTrackIndex = hasCommon ? state.partIndex + 1 : state.partIndex;
|
|
|
+ repeats = Array.from(xmlParse.querySelectorAll('part')?.[currentTrackIndex]?.querySelectorAll('repeat')) || [];
|
|
|
+ }
|
|
|
compatibleXmlPitchVoice(xmlParse);
|
|
|
// 获取作词、作曲家
|
|
|
getComposer(xmlParse);
|