import QtQuick 2.12 import QtQuick.Controls 2.12 import "../../qml/api" StyleAPI { readonly property var audioData: new Array(128) readonly property bool centerLineFlag: configs["Center Line"] readonly property string center_color: configs["Center Color"] readonly property string line_color: configs["Line Color"] readonly property int linePosition: configs["Line Position"] readonly property int uDataLen: Math.pow(2, configs["Data Length"]); readonly property int dataLength: 64/uDataLen readonly property int channel: configs["Channel"] readonly property bool reverse: configs["Reverse"] readonly property bool centerRotateFlag: configs["Rotate Settings"]["Center Enable"] readonly property real centerRotateAngle: configs["Rotate Settings"]["Center Angle"] readonly property bool lineRotateFlag: configs["Rotate Settings"]["Line Enable"] readonly property real lineRotateAngle: configs["Rotate Settings"]["Line Angle"] readonly property bool autoNormalizing: configs["Data Settings"]["Auto Normalizing"] readonly property real amplitude: configs["Data Settings"]["Amplitude"] / 400.0 readonly property int unitStyle: configs["Data Settings"]["Unit Style"] property int total: channel * dataLength property real logAmplitude: Math.log10(amplitude) property real degUnit: Math.PI / 180 property real halfWidth: width/2 property real halfHeight: height/2 onAudioDataUpdeted: { if(autoNormalizing) { if (unitStyle) { //对数化显示 for(let i=0; i