mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-23 08:07:54 -05:00
added decimal point to waveform duration
This commit is contained in:
parent
6540d4acfa
commit
607b5757fd
1 changed files with 3 additions and 3 deletions
|
@ -272,19 +272,19 @@ class ChartEditorOffsetsToolbox extends ChartEditorBaseToolbox
|
||||||
// waveformPlayer.waveform.forceUpdate = true;
|
// waveformPlayer.waveform.forceUpdate = true;
|
||||||
waveformPlayer.waveform.waveformData = playerVoice?.waveformData;
|
waveformPlayer.waveform.waveformData = playerVoice?.waveformData;
|
||||||
// Set the width and duration to render the full waveform, with the clipRect applied we only render a segment of it.
|
// Set the width and duration to render the full waveform, with the clipRect applied we only render a segment of it.
|
||||||
waveformPlayer.waveform.duration = (playerVoice?.length ?? 1000) / Constants.MS_PER_SEC;
|
waveformPlayer.waveform.duration = (playerVoice?.length ?? 1000.0) / Constants.MS_PER_SEC;
|
||||||
|
|
||||||
// Build opponent waveform.
|
// Build opponent waveform.
|
||||||
// waveformOpponent.waveform.forceUpdate = true;
|
// waveformOpponent.waveform.forceUpdate = true;
|
||||||
// note: if song only has one set of vocals (Vocals.ogg/mp3) then this is null and crashes charting editor
|
// note: if song only has one set of vocals (Vocals.ogg/mp3) then this is null and crashes charting editor
|
||||||
// so we null check
|
// so we null check
|
||||||
waveformOpponent.waveform.waveformData = opponentVoice?.waveformData;
|
waveformOpponent.waveform.waveformData = opponentVoice?.waveformData;
|
||||||
waveformOpponent.waveform.duration = (opponentVoice?.length ?? 1000) / Constants.MS_PER_SEC;
|
waveformOpponent.waveform.duration = (opponentVoice?.length ?? 1000.0) / Constants.MS_PER_SEC;
|
||||||
|
|
||||||
// Build instrumental waveform.
|
// Build instrumental waveform.
|
||||||
// waveformInstrumental.waveform.forceUpdate = true;
|
// waveformInstrumental.waveform.forceUpdate = true;
|
||||||
waveformInstrumental.waveform.waveformData = chartEditorState.audioInstTrack.waveformData;
|
waveformInstrumental.waveform.waveformData = chartEditorState.audioInstTrack.waveformData;
|
||||||
waveformInstrumental.waveform.duration = (instTrack?.length ?? 1000) / Constants.MS_PER_SEC;
|
waveformInstrumental.waveform.duration = (instTrack?.lenth ?? 1000.0) / Constants.MS_PER_SEC;
|
||||||
|
|
||||||
addOffsetsToAudioPreview();
|
addOffsetsToAudioPreview();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue