全面替换log为zap

This commit is contained in:
2024-11-08 18:42:13 +08:00
parent 3da1fe761e
commit edb8d30605
17 changed files with 269 additions and 55 deletions

View File

@@ -2,12 +2,12 @@ package audio
import (
"context"
"game-driver/pkg/logger"
"github.com/gopxl/beep/v2"
"github.com/gopxl/beep/v2/mp3"
"github.com/gopxl/beep/v2/speaker"
"github.com/gopxl/beep/v2/wav"
"io"
"log"
"time"
)
@@ -18,7 +18,7 @@ func init() {
if err != nil {
panic("扬声器初始化异常: " + err.Error())
}
log.Println("扬声器初始化完成")
logger.Infoln("扬声器初始化完成")
}
func PlayWav(c context.Context, r io.Reader) {