fix: fix bug

This commit is contained in:
fanpeng 2025-07-08 09:18:31 +08:00
parent a24b367a5b
commit 61b32567e6
4 changed files with 9 additions and 8 deletions

View File

@ -546,11 +546,11 @@
}
const callback = async audioData => {
console.log('传输数据', audioData)
await dataSendFunction(
const result = await dataSendFunction(
`${deviceInfo.value.productId}/${deviceInfo.value.deviceName}`,
audioData
)
console.log(`数据传输结果:${result.data.result}`, audioData)
}
const handlePlaySuccess = () => {

View File

@ -94,10 +94,10 @@
abbreviation: 'CN',
group: 'Z'
})
const username = ref('')
const password = ref('')
const username = ref('18174429647')
const password = ref('..022059')
const select = ref(false)
const select = ref(true)
const pending = ref(false)

View File

@ -77,7 +77,7 @@ public class AudioRecorderManager: NSObject {
mBytesPerPacket: 0,
mFramesPerPacket: 1024,
mBytesPerFrame: 0,
mChannelsPerFrame: 1,
mChannelsPerFrame: inputFormat.channelCount,
mBitsPerChannel: 0,
mReserved: 0
)

View File

@ -179,13 +179,14 @@ export const dataSendFunction = async function (id: string, data: Array<number>)
try {
const result = await dataSend(id, buffer, data.length)
console.log('发送数据结果', result)
XP2PDataHelper.deallocateBytes(buffer)
return {
code: 0,
data: {},
data: {
result: result
},
message: '成功'
}
} catch (error) {