uchar OutputMap::grandMasterValue() { UniverseArray* ua = claimUniverses(); uchar value = ua->gMValue(); releaseUniverses(false); return value; }
UniverseArray::GMValueMode OutputMap::grandMasterValueMode() { UniverseArray* ua = claimUniverses(); UniverseArray::GMValueMode mode = ua->gMValueMode(); releaseUniverses(false); return mode; }
void OutputMap::setGrandMasterChannelMode(UniverseArray::GMChannelMode mode) { bool changed = false; UniverseArray* ua = claimUniverses(); if(ua->gMChannelMode() != mode) { ua->setGMChannelMode(mode); changed = true; } releaseUniverses(changed); }
void OutputMap::setGrandMasterValue(uchar value) { bool changed = false; UniverseArray* ua = claimUniverses(); if (ua->gMValue() != value) { ua->setGMValue(value); changed = true; } releaseUniverses(changed); if (changed == true) emit grandMasterValueChanged(value); }
void MasterTimer::timerTick() { Doc* doc = qobject_cast<Doc*> (parent()); Q_ASSERT(doc != NULL); UniverseArray* universes = doc->outputMap()->claimUniverses(); universes->zeroIntensityChannels(); timerTickFunctions(universes); timerTickDMXSources(universes); timerTickFader(universes); doc->outputMap()->releaseUniverses(); doc->outputMap()->dumpUniverses(); }
void UniverseArray_Test::writeEfficiency() { UniverseArray* ua = new UniverseArray(512 * 4); ua->setGMValue(127); int i; /* This applies 50%(127) Grand Master to ALL channels in all universes. I'm not really sure what kinds of figures to expect here, since this is just one part in the overall processor load. Typically I get ~0.15ms on an Intel Core 2 [email protected], which looks plausible to me: DMX frame interval is 1/44Hz =~ 23ms. Applying GM to ALL channels takes less than 1ms so there's a full 22ms to spare after GM. */ QBENCHMARK { for (i = 0; i < int(512 * 4); i++) ua->write(i, 200, QLCChannel::Intensity); } for (i = 0; i < int(512 * 4); i++) QCOMPARE(ua->postGMValues()->at(i), char(100)); }