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.
26 lines
550 B
26 lines
550 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.audioData = arrayBuffer.slice();
|
||
|
Common.audioDataUpdated(arrayBuffer.slice());
|
||
|
// arrayBuffer = null;
|
||
|
}
|
||
|
}
|