This commit is contained in:
suyl
2021-07-09 15:22:25 +08:00
parent e392777487
commit 65f3ac6330

View File

@@ -474,7 +474,7 @@ func replaceContent(content string, printMsg *model.PrintMsg) (result string) {
//fd 固定
//001a (声音数据长度高八位低八位)
//0101 固定
soundPerfix := "[" + utils.Int2Str(printer.Volume*2) + "]" + printer.Sound + ","
soundPerfix := "[v" + utils.Int2Str(printer.Volume*2) + "]" + printer.Sound + ","
hexPrefix, _ := jxutils.Utf8ToGbk([]byte(soundPerfix))
hexPrefixStr := hex.EncodeToString(hexPrefix)
realSound := hexPrefixStr + sound