1
This commit is contained in:
@@ -501,14 +501,20 @@ func replaceContent(content string, printMsg *model.PrintMsg) (result string) {
|
||||
int16Sound := strconv.FormatInt(intSound, 16)
|
||||
voice += int16Sound
|
||||
}
|
||||
globals.SugarLogger.Debug("voice============", voice)
|
||||
|
||||
realSound := hexPrefixStr + voice
|
||||
allLen := fmt.Sprintf("%x", (len("fd001a0101")+len(realSound))/2)
|
||||
if len(allLen) < 2 {
|
||||
allLen = "0" + allLen
|
||||
}
|
||||
globals.SugarLogger.Debug("realSound============", realSound)
|
||||
globals.SugarLogger.Debug("allLen============", allLen)
|
||||
|
||||
soundLenH, soundLenX := int2h8l8(int64((len(realSound) + len("0101")) / 2))
|
||||
globals.SugarLogger.Debug("result1============", result)
|
||||
result = strings.ReplaceAll(result, byteSignSound, hexSignSound+allLen+"fd"+soundLenH+soundLenX+"0100"+hexPrefixStr)
|
||||
globals.SugarLogger.Debug("result2============", result)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user