forked from Mashiro_Sorata/ADV-Plugin
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
470 B
24 lines
470 B
2 years ago
|
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());
|
||
|
}
|
||
|
}
|