예제 #1
0
int Form1::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QMainWindow::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: quit(); break;
        case 1: play(); break;
        case 2: musinfo(); break;
        case 3: stop(); break;
        case 4: slR(); break;
        case 5: slP(); break;
        case 6: opcje(); break;
        case 7: showplaylist(); break;
        case 8: timrefDo(); break;
        case 9: funkcje_opn(); break;
        case 10: info(); break;
        case 11: aWAV(); break;
        case 12: slAT((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 13: setVol((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 14: savMus(); break;
        case 15: nextB(); break;
        case 16: prevB(); break;
        case 17: AboutQMP(); break;
        case 18: NextXs(); break;
        case 19: volup(); break;
        case 20: voldown(); break;
        case 21: minimize(); break;
        case 22: seekP((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 23: setVolR((*reinterpret_cast< int*(*)>(_a[1]))); break;
        case 24: pwp(); break;
        case 25: pwl(); break;
        case 26: netA(); break;
        case 27: selA(); break;
        case 28: SoH(); break;
        case 29: mnuAct((*reinterpret_cast< QSystemTrayIcon::ActivationReason(*)>(_a[1]))); break;
        case 30: checkUpdatesButton(); break;
        case 31: checkUpdates(); break;
        case 32: updateQVis(); break;
        case 33: BTpause(); break;
        case 34: showEq(); break;
        case 35: volMnu(); break;
        case 36: setBothVolB(); break;
        case 37: TrayMessageClicked(); break;
        case 38: showMnuOpt(); break;
        case 39: miniQMP(); break;
        case 40: showTrayMnu(); break;
        case 41: setVolFromMiniQMP((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 42: opisQMP(); break;
        case 43: resetInfoWindow(); break;
        case 44: miniVersion(); break;
        case 45: copyTitleA(); break;
        case 46: fileChanged(); break;
        default: ;
        }
        _id -= 47;
    }
    return _id;
}
예제 #2
0
vector<double> PiecewiseLinearApprox(vector<double> rawpitch)
{
	vector<double> axe;
	Vector_Axe(rawpitch.size(), axe);

	int num_seg;
	if (rawpitch.size() >= 12)
		num_seg = 3;	
	else if (rawpitch.size() >= 7)
		num_seg = 2;
	else
		num_seg = 1;

	PiecewiseLinear pwl(num_seg);
	pwl.OptApprox(rawpitch);

	vector<double> styline;
	pwl.GetValue(styline);

	return styline;
}