upgrade echogarden

This commit is contained in:
an-lee
2024-03-17 10:32:03 +08:00
parent 90f38e9226
commit df2aac185a
4 changed files with 486 additions and 718 deletions

View File

@@ -124,7 +124,7 @@
"dayjs": "^1.11.10",
"decamelize": "^6.0.0",
"decamelize-keys": "^2.0.1",
"echogarden": "https://github.com/an-lee/echogarden",
"echogarden": "^0.12.0",
"electron-log": "^5.1.2",
"electron-settings": "^4.0.2",
"electron-squirrel-startup": "^1.0.0",

View File

@@ -1,5 +1,5 @@
import { ipcMain } from "electron";
import { align } from "echogarden/dist/api/API.js";
import * as Echogarden from "echogarden/dist/api/API.js";
import { AlignmentOptions } from "echogarden/dist/api/API";
import { AudioSourceParam } from "echogarden/dist/audio/AudioUtilities";
import path from "path";
@@ -7,6 +7,9 @@ import log from "@main/logger";
import url from "url";
import settings from "@main/settings";
import fs from "fs-extra";
import ffmpegPath from "ffmpeg-static";
Echogarden.setGlobalOption("ffmpegPath", ffmpegPath);
const __filename = url.fileURLToPath(import.meta.url);
/*
@@ -18,10 +21,10 @@ const __dirname = path
const logger = log.scope("echogarden");
class EchogardenWrapper {
public align: typeof align;
public align: typeof Echogarden.align;
constructor() {
this.align = align;
this.align = Echogarden.align;
}
async check() {

View File

@@ -20,8 +20,6 @@ const __dirname = path
.dirname(__filename)
.replace("app.asar", "app.asar.unpacked");
process.env.FFMPEG_PATH = ffmpegPath;
const logger = log.scope("ffmpeg");
export default class FfmpegWrapper {
checkCommand(): Promise<boolean> {

1191
yarn.lock

File diff suppressed because it is too large Load Diff