mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-30 11:26:53 -05:00
Merge branch 'rewrite/master' into bugfix/weekend-1-fixes
This commit is contained in:
commit
5c2504da2a
3 changed files with 9 additions and 4 deletions
|
@ -213,7 +213,7 @@
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- Run a script before and after building. -->
|
<!-- Run a script before and after building. -->
|
||||||
<postbuild haxe="source/Prebuild.hx"/> -->
|
<prebuild haxe="source/Prebuild.hx"/> -->
|
||||||
<postbuild haxe="source/Postbuild.hx"/> -->
|
<postbuild haxe="source/Postbuild.hx"/> -->
|
||||||
|
|
||||||
<!-- Enable this on platforms which do not support dropping files onto the window. -->
|
<!-- Enable this on platforms which do not support dropping files onto the window. -->
|
||||||
|
|
|
@ -290,7 +290,7 @@ class ChartEditorFreeplayToolbox extends ChartEditorBaseToolbox
|
||||||
// waveformMusic.waveform.forceUpdate = true;
|
// waveformMusic.waveform.forceUpdate = true;
|
||||||
var perfStart = haxe.Timer.stamp();
|
var perfStart = haxe.Timer.stamp();
|
||||||
var waveformData1 = playerVoice.waveformData;
|
var waveformData1 = playerVoice.waveformData;
|
||||||
var waveformData2 = opponentVoice.waveformData;
|
var waveformData2 = opponentVoice?.waveformData ?? playerVoice.waveformData; // this null check is for songs that only have 1 vocals file!
|
||||||
var waveformData3 = chartEditorState.audioInstTrack.waveformData;
|
var waveformData3 = chartEditorState.audioInstTrack.waveformData;
|
||||||
var waveformData = waveformData1.merge(waveformData2).merge(waveformData3);
|
var waveformData = waveformData1.merge(waveformData2).merge(waveformData3);
|
||||||
trace('Waveform data merging took: ${haxe.Timer.stamp() - perfStart} seconds');
|
trace('Waveform data merging took: ${haxe.Timer.stamp() - perfStart} seconds');
|
||||||
|
|
|
@ -276,8 +276,13 @@ class ChartEditorOffsetsToolbox extends ChartEditorBaseToolbox
|
||||||
|
|
||||||
// Build opponent waveform.
|
// Build opponent waveform.
|
||||||
// waveformOpponent.waveform.forceUpdate = true;
|
// waveformOpponent.waveform.forceUpdate = true;
|
||||||
waveformOpponent.waveform.waveformData = opponentVoice.waveformData;
|
// note: if song only has one set of vocals (Vocals.ogg/mp3) then this is null and crashes charting editor
|
||||||
waveformOpponent.waveform.duration = opponentVoice.length / Constants.MS_PER_SEC;
|
// so we null check
|
||||||
|
if (opponentVoice != null)
|
||||||
|
{
|
||||||
|
waveformOpponent.waveform.waveformData = opponentVoice.waveformData;
|
||||||
|
waveformOpponent.waveform.duration = opponentVoice.length / Constants.MS_PER_SEC;
|
||||||
|
}
|
||||||
|
|
||||||
// Build instrumental waveform.
|
// Build instrumental waveform.
|
||||||
// waveformInstrumental.waveform.forceUpdate = true;
|
// waveformInstrumental.waveform.forceUpdate = true;
|
||||||
|
|
Loading…
Reference in a new issue