feat(audio): 使用 Windowed Sinc 高质量重采样器替代线性插值
Some checks failed
ci/woodpecker/tag/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/tag/woodpecker Pipeline failed
统一音频输出采样率为 44100Hz,使用 go-audio-resampler 库实现 Windowed Sinc + Polyphase FIR 算法(VeryHigh 28-bit 精度), 替代原有的线性插值透传方案。 主要变更: - 新增 sincResampler:三阶段 Read 循环(填充→处理→Flush) - 双缓冲区架构避免输出样本丢失,复用内存减少 GC 压力 - WAV/MP3/BGM 播放管线全部接入 Sinc 重采样器 - 移除旧的 linearResampler 和透传模式 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
8
go.mod
8
go.mod
@@ -1,6 +1,6 @@
|
||||
module game-driver
|
||||
|
||||
go 1.23.2
|
||||
go 1.26
|
||||
|
||||
require (
|
||||
github.com/adrg/libvlc-go/v3 v3.1.6
|
||||
@@ -14,10 +14,10 @@ require (
|
||||
github.com/hypebeast/go-osc v0.0.0-20220308234300-cec5a8a1e5f5
|
||||
github.com/spf13/viper v1.21.0
|
||||
github.com/tencentcloud/tencentcloud-cls-sdk-go v1.0.11
|
||||
github.com/tphakala/go-audio-resampler v1.2.0
|
||||
github.com/urfave/cli/v3 v3.8.0
|
||||
github.com/warthog618/go-gpiocdev v0.9.1
|
||||
github.com/youpy/go-wav v0.3.2
|
||||
github.com/zeozeozeo/gomplerate v0.0.0-20250404113140-0fbb236df825
|
||||
go.uber.org/zap v1.27.0
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.2.1
|
||||
)
|
||||
@@ -47,6 +47,7 @@ require (
|
||||
github.com/spf13/cast v1.10.0 // indirect
|
||||
github.com/spf13/pflag v1.0.10 // indirect
|
||||
github.com/subosito/gotenv v1.6.0 // indirect
|
||||
github.com/tphakala/simd v1.0.22 // indirect
|
||||
github.com/youpy/go-riff v0.1.0 // indirect
|
||||
github.com/ysmood/fetchup v0.3.0 // indirect
|
||||
github.com/ysmood/goob v0.4.0 // indirect
|
||||
@@ -58,8 +59,9 @@ require (
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
||||
golang.org/x/net v0.37.0 // indirect
|
||||
golang.org/x/sys v0.31.0 // indirect
|
||||
golang.org/x/sys v0.42.0 // indirect
|
||||
golang.org/x/text v0.28.0 // indirect
|
||||
gonum.org/v1/gonum v0.17.0 // indirect
|
||||
google.golang.org/protobuf v1.36.5 // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user