fix: fix bug
This commit is contained in:
parent
a24b367a5b
commit
61b32567e6
@ -546,11 +546,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const callback = async audioData => {
|
const callback = async audioData => {
|
||||||
console.log('传输数据', audioData)
|
const result = await dataSendFunction(
|
||||||
await dataSendFunction(
|
|
||||||
`${deviceInfo.value.productId}/${deviceInfo.value.deviceName}`,
|
`${deviceInfo.value.productId}/${deviceInfo.value.deviceName}`,
|
||||||
audioData
|
audioData
|
||||||
)
|
)
|
||||||
|
console.log(`数据传输结果:${result.data.result}`, audioData)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handlePlaySuccess = () => {
|
const handlePlaySuccess = () => {
|
||||||
|
|||||||
@ -94,10 +94,10 @@
|
|||||||
abbreviation: 'CN',
|
abbreviation: 'CN',
|
||||||
group: 'Z'
|
group: 'Z'
|
||||||
})
|
})
|
||||||
const username = ref('')
|
const username = ref('18174429647')
|
||||||
const password = ref('')
|
const password = ref('..022059')
|
||||||
|
|
||||||
const select = ref(false)
|
const select = ref(true)
|
||||||
|
|
||||||
const pending = ref(false)
|
const pending = ref(false)
|
||||||
|
|
||||||
|
|||||||
@ -77,7 +77,7 @@ public class AudioRecorderManager: NSObject {
|
|||||||
mBytesPerPacket: 0,
|
mBytesPerPacket: 0,
|
||||||
mFramesPerPacket: 1024,
|
mFramesPerPacket: 1024,
|
||||||
mBytesPerFrame: 0,
|
mBytesPerFrame: 0,
|
||||||
mChannelsPerFrame: 1,
|
mChannelsPerFrame: inputFormat.channelCount,
|
||||||
mBitsPerChannel: 0,
|
mBitsPerChannel: 0,
|
||||||
mReserved: 0
|
mReserved: 0
|
||||||
)
|
)
|
||||||
|
|||||||
@ -179,13 +179,14 @@ export const dataSendFunction = async function (id: string, data: Array<number>)
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const result = await dataSend(id, buffer, data.length)
|
const result = await dataSend(id, buffer, data.length)
|
||||||
console.log('发送数据结果', result)
|
|
||||||
|
|
||||||
XP2PDataHelper.deallocateBytes(buffer)
|
XP2PDataHelper.deallocateBytes(buffer)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
code: 0,
|
code: 0,
|
||||||
data: {},
|
data: {
|
||||||
|
result: result
|
||||||
|
},
|
||||||
message: '成功'
|
message: '成功'
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user