SAO Utils 2的音频可视化插件
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.

25 lines
550 B

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;
}
}