ADV-Plugin/qml/WSocket.qml
mashiros 6df0edd06c - 无挂件时禁用websocket
- 统一设置页面样式
- 删除无用注释
2022-04-09 15:47:56 +08:00

24 lines
470 B
QML

import QtWebSockets 1.1
import "."
WebSocket {
property string wsIp: "localhost"
property int wsPort: 5050
url: "ws://" + wsIp + ":" + wsPort
active: true
onStatusChanged: {
if(status === WebSocket.Closed || status === WebSocket.Error) {
Common.wsocketClosed();
}
}
onBinaryMessageReceived: {
let arrayBuffer = new Float32Array(message);
Common.audioDataUpdated(arrayBuffer.slice());
}
}