Istfg why didnt we fix this months ago
This commit is contained in:
@@ -607,20 +607,29 @@ class Charter extends UIState {
|
|||||||
updateWaveforms();
|
updateWaveforms();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline function isSoundLoaded(sound:FlxSound) {
|
||||||
|
@:privateAccess
|
||||||
|
return sound != null && sound._sound != null && sound._sound.length > 0;
|
||||||
|
}
|
||||||
|
|
||||||
public function updateWaveforms() {
|
public function updateWaveforms() {
|
||||||
var wavesToGenerate:Array<{name:String, sound:FlxSound}> = [
|
var wavesToGenerate:Array<{name:String, sound:FlxSound}> = [];
|
||||||
{name: "Inst.ogg", sound: FlxG.sound.music},
|
|
||||||
];
|
if(isSoundLoaded(FlxG.sound.music))
|
||||||
if (PlayState.SONG.meta.needsVoices != false)
|
wavesToGenerate.push({name: "Inst.ogg", sound: FlxG.sound.music});
|
||||||
|
|
||||||
|
if (PlayState.SONG.meta.needsVoices != false && isSoundLoaded(vocals))
|
||||||
wavesToGenerate.push({name: "Voices.ogg", sound: vocals});
|
wavesToGenerate.push({name: "Voices.ogg", sound: vocals});
|
||||||
|
|
||||||
for (strumLine in strumLines)
|
for (strumLine in strumLines)
|
||||||
if (strumLine.vocals != null && strumLine.strumLine.vocalsSuffix != null && strumLine.strumLine.vocalsSuffix != "")
|
if (strumLine.vocals != null && strumLine.strumLine.vocalsSuffix != null && strumLine.strumLine.vocalsSuffix != "" && isSoundLoaded(strumLine.vocals))
|
||||||
wavesToGenerate.push({
|
wavesToGenerate.push({
|
||||||
name: 'Voices${strumLine.strumLine.vocalsSuffix}.ogg',
|
name: 'Voices${strumLine.strumLine.vocalsSuffix}.ogg',
|
||||||
sound: strumLine.vocals
|
sound: strumLine.vocals
|
||||||
});
|
});
|
||||||
|
|
||||||
|
trace(wavesToGenerate, @:privateAccess vocals._sound, @:privateAccess vocals._sound?.length);
|
||||||
|
|
||||||
var oldWaveformList:Array<String> = waveformHandler.waveformList;
|
var oldWaveformList:Array<String> = waveformHandler.waveformList;
|
||||||
var newWaveformList:Array<String> = [for (data in wavesToGenerate) data.name];
|
var newWaveformList:Array<String> = [for (data in wavesToGenerate) data.name];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user