全面替换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

@@ -1,11 +1,11 @@
package audio
import (
"game-driver/pkg/logger"
"github.com/gopxl/beep/v2"
"github.com/gopxl/beep/v2/mp3"
"github.com/gopxl/beep/v2/speaker"
"io"
"log"
)
func PlayBgmMP3(r io.ReadCloser, opts ...beep.LoopOption) (*beep.Ctrl, func() error) {
@@ -16,7 +16,7 @@ func PlayBgmMP3(r io.ReadCloser, opts ...beep.LoopOption) (*beep.Ctrl, func() er
loop2, err := beep.Loop2(streamer, opts...)
if err != nil {
log.Println("循环播放异常: ", err)
logger.Infoln("循环播放异常: ", err)
return nil, streamer.Close
}