1
This commit is contained in:
@@ -505,20 +505,20 @@ func replaceContent(content string, printMsg *model.PrintMsg) (result string) {
|
||||
int16Sound := strconv.FormatInt(intSound, 16)
|
||||
voice += int16Sound
|
||||
}
|
||||
voiceDataGBK, _ := jxutils.Utf8ToGbk([]byte(voice))
|
||||
voiceData := hex.EncodeToString(voiceDataGBK)
|
||||
//voiceDataGBK, _ := jxutils.Utf8ToGbk([]byte(voice))
|
||||
//voiceData := hex.EncodeToString(voiceDataGBK)
|
||||
|
||||
//[8]sounda14 ->5b385d736f756e64613134
|
||||
//realSound := hexPrefixStr + voiceData
|
||||
realSound := voiceData
|
||||
allLen := fmt.Sprintf("%x", (len(realSound))/2)
|
||||
if len(allLen) < 2 {
|
||||
allLen = "0" + allLen
|
||||
}
|
||||
//realSound := voiceData
|
||||
//allLen := fmt.Sprintf("%x", (len(realSound))/2)
|
||||
//if len(allLen) < 2 {
|
||||
// allLen = "0" + allLen
|
||||
//}
|
||||
|
||||
//soundLenH, soundLenX := int2h8l8(int64((len(realSound) + len("0101")) / 2))
|
||||
//result = strings.ReplaceAll(result, byteSignSound, hexSignSound+allLen+"fd"+soundLenH+soundLenX+"0100"+hexPrefixStr)
|
||||
result = strings.ReplaceAll(result, byteSignSound, hexSignSoundOld+realSound)
|
||||
result = strings.ReplaceAll(result, byteSignSound, hexSignSoundOld+voice)
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user