Refactor PCM conversion to return result and sample rate
Build Action / Build-LiteLoader (push) Canceled after 0s
Build Action / Build-Shell (push) Canceled after 0s
Build Release / check-version (push) Canceled after 0s
Build Release / Build-LiteLoader (push) Canceled after 0s
Build Release / Build-Shell (push) Canceled after 0s
Build Release / release-napcat (push) Canceled after 0s
Build Release / build-docker (push) Canceled after 0s

Updated the FFmpeg adapter interfaces and implementations so that PCM conversion methods now return an object containing the conversion result and sample rate, instead of a Buffer. Adjusted audio processing logic to accommodate this change and improved error logging. Updated native ffmpeg addon binaries.
This commit is contained in:
手瓜一十雪 committed 2025-11-01 23:23:15 +08:00
1 parent 28ce5d3cb4
commit caaf8be3b2
10 files changed
+23 -16

No files matched your search

+1 -1
View File
@@ -93,7 +93,7 @@ export class FFmpegService {
/**
* 转换为 PCM 格式
*/
public static async convert(filePath: string, pcmPath: string): Promise<Buffer> {
public static async convert(filePath: string, pcmPath: string): Promise<{ result: boolean, sampleRate: number }> {
const adapter = await this.getAdapter();
return adapter.convertToPCM(filePath, pcmPath);
}