void Timeline::playPause(){ if(getPlaying()) { setPlaying(false); } else { setPlaying(true); } }
void SuperColliderLoopElement::setBeat(int beat) { this->beat = beat; if (beat % getNumBeats() == 0 && getPlaying()) { count = (count + 1) % getSkip(); if (count % (numBeats * getSkip()) == 0) { if (!mute) play(); count = 0; } } if (beat == 0 && getToRecord()) { beginRecording(); } else if (isRecord && (beat >= numBeats || beat == 0)) { setRecording(false); } }
int GStreamerPlayer::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 13) qt_static_metacall(this, _c, _id, _a); _id -= 13; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { if (_id < 13) *reinterpret_cast<int*>(_a[0]) = -1; _id -= 13; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< int*>(_v) = getBrightness(); break; case 1: *reinterpret_cast< int*>(_v) = getContrast(); break; case 2: *reinterpret_cast< int*>(_v) = getHue(); break; case 3: *reinterpret_cast< int*>(_v) = getSaturation(); break; case 4: *reinterpret_cast< bool*>(_v) = getPlaying(); break; case 5: *reinterpret_cast< bool*>(_v) = getPaused(); break; case 6: *reinterpret_cast< bool*>(_v) = getStopped(); break; default: break; } _id -= 7; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setBrightness(*reinterpret_cast< int*>(_v)); break; case 1: setContrast(*reinterpret_cast< int*>(_v)); break; case 2: setHue(*reinterpret_cast< int*>(_v)); break; case 3: setSaturation(*reinterpret_cast< int*>(_v)); break; case 4: setPlaying(*reinterpret_cast< bool*>(_v)); break; case 5: setPaused(*reinterpret_cast< bool*>(_v)); break; case 6: setStopped(*reinterpret_cast< bool*>(_v)); break; default: break; } _id -= 7; } else if (_c == QMetaObject::ResetProperty) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 7; } else if (_c == QMetaObject::RegisterPropertyMetaType) { if (_id < 7) *reinterpret_cast<int*>(_a[0]) = -1; _id -= 7; } #endif // QT_NO_PROPERTIES return _id; }