Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions renderer/render_frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ async function renderHitsounds(mediaPromise, beatmap, start_time, actual_length,
for(const scoringFrame of scoringFrames){
if(scoringFrame.combo >= scoringFrame.previousCombo || scoringFrame.previousCombo < 30)
continue;

hitSounds.push({
offset: (scoringFrame.offset - start_time) / time_scale,
sound: 'combobreak',
Expand All @@ -156,7 +156,7 @@ async function renderHitsounds(mediaPromise, beatmap, start_time, actual_length,
if(beatmap.Replay.auto !== true){
if(hitObject.hitOffset == null)
continue;

offset += hitObject.hitOffset;
}

Expand All @@ -175,7 +175,7 @@ async function renderHitsounds(mediaPromise, beatmap, start_time, actual_length,
}
}
}

if(hitObject.objectName == 'slider'){
hitObject.EdgeHitSounds.forEach((edgeHitSounds, index) => {
edgeHitSounds.forEach(hitSound => {
Expand All @@ -184,7 +184,7 @@ async function renderHitsounds(mediaPromise, beatmap, start_time, actual_length,
if(index == 0 && beatmap.Replay.auto !== true){
if(hitObject.hitOffset == null)
return;

offset += hitObject.hitOffset;
}

Expand Down Expand Up @@ -306,7 +306,7 @@ async function renderHitsounds(mediaPromise, beatmap, start_time, actual_length,
await execFilePromise(ffmpeg, mergeArgs, { shell: true });

resolve(path.resolve(file_path, 'merged.wav'));
});
}).catch(reject);
});
}

Expand Down Expand Up @@ -377,7 +377,7 @@ async function downloadMedia(options, beatmap, beatmap_path, size, download_path
{ apply: 'shade', params: [80] }
])
.writeAsync(path.resolve(extraction_path, 'bg.png'));

output.background_path = path.resolve(extraction_path, 'bg.png');
}catch(e){
output.background_path = null;
Expand Down Expand Up @@ -787,7 +787,7 @@ module.exports = {
name: `video.${options.type}`
}]}).then(() => {
fs.promises.rm(file_path, { recursive: true }).catch(helper.error);
}).catch(console.error);
}).catch(console.error);
});

ffmpegProcess.stderr.on('data', data => {
Expand Down