本文整理汇总了C++中setProgram函数的典型用法代码示例。如果您正苦于以下问题:C++ setProgram函数的具体用法?C++ setProgram怎么用?C++ setProgram使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setProgram函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setProgram
static void setProgram(Node *n, GLProgram *p)
{
n->setShaderProgram(p);
auto& children = n->getChildren();
for(const auto &child : children) {
setProgram(child, p);
}
}
示例2: setShowHelp
bool ContextBase::parseCmdArgs(int argc, char **argv, int skipFirstArgs) {
_argc = argc;
_argv = argv;
_skipFirstArgs = skipFirstArgs;
if (_argc < 2) {
setShowHelp(true);
return false;
}
setProgram(_programNames[argv[0]]);
_argsProcessed.resize(_argc - _skipFirstArgs, false);
for (_i=_skipFirstArgs; _i < argc; _i++) {
if (isUsed(_i - _skipFirstArgs)) {
continue;
}
if (strcmp(_argv[_i], "-i") == 0) {
if (!handle_i()) return false;
}
else if (strcmp(_argv[_i], "-g") == 0) {
if (!handle_g()) return false;
}
else if ((strcmp(_argv[_i], "-h") == 0) || (strcmp(_argv[_i], "--help") == 0)) {
if (!handle_h()) return false;
}
else if (strcmp(_argv[_i], "-split") == 0) {
if (!handle_split()) return false;
}
else if (strcmp(_argv[_i], "-bed") == 0) {
if (!handle_bed()) return false;
}
else if (strcmp(_argv[_i], "-ubam") == 0) {
if (!handle_ubam()) return false;
}
else if (strcmp(_argv[_i], "-fbam") == 0) {
if (!handle_fbam()) return false;
}
else if(strcmp(_argv[_i], "-sorted") == 0) {
if (!handle_sorted()) return false;
}
else if (strcmp(_argv[_i], "-nobuf") == 0) {
if (!handle_nobuf()) return false;
}
else if (strcmp(_argv[_i], "-header") == 0) {
if (!handle_header()) return false;
}
else if (strcmp(_argv[_i], "-n") == 0) {
if (!handle_n()) return false;
}
else if (strcmp(_argv[_i], "-seed") == 0) {
if (!handle_seed()) return false;
}
}
return true;
}
示例3: Q_D
KProcess &KProcess::operator<<(const QStringList &args)
{
Q_D(KProcess);
if (d->prog.isEmpty())
setProgram(args);
else
d->args << args;
return *this;
}
示例4: PizMidi
//-----------------------------------------------------------------------------
MidiCCStepper::MidiCCStepper(audioMasterCallback audioMaster)
: PizMidi(audioMaster, kNumPrograms, kNumParams)
{
programs = new MidiCCStepperProgram[numPrograms];
if (programs) setProgram (0);
lastTime = 0 - samplesPerStep;
init();
}
示例5: setProgram
//----------------------------------------------------------------------------
//You don't have to do this, but I like to...
//----------------------------------------------------------------------------
void AmplitudeImposer::MIDI_ProgramChange(int ch, int val, int delta)
{
if(val < kNumPrograms)
setProgram(val);
MIDIEvent[0]->midiData[0] = 0xD0 + ch;
MIDIEvent[0]->midiData[1] = val;
MIDIEvent[0]->midiData[2] = 0;
MIDIEvent[0]->deltaFrames = delta;
sendVstEventsToHost(Events);
}
示例6: setProgram
NS_CC_BEGIN
#if CC_CLIPPING_NODE_OPENGLES
static void setProgram(Node *n, GLProgram *p)
{
n->setGLProgram(p);
auto& children = n->getChildren();
for(const auto &child : children) {
setProgram(child, p);
}
}
示例7: pinInt
void pinInt() {
unsigned char pinClock = PINB & _BV(DAT);
if (pinClock != pinClockLast && pinClock != 0) {
readData();
if (msgIdx == 8) {
setProgram();
TOC = BRIGHTMAX - 1;
clearMsg();
}
}
pinClockLast = pinClock;
}
示例8: setProgram
bool ContextBase::testCmdArgs(int argc, char **argv) {
_argc = argc;
_argv = argv;
_skipFirstArgs = 1;
_origProgramName = argv[0];
setProgram(_programNames[_origProgramName]);
_argsProcessed.resize(_argc - _skipFirstArgs, false);
if (!parseCmdArgs(argc, argv, 1) || getShowHelp() || !isValidState()) {
return false;
}
return true;
}
示例9: AudioEffectX
mdaLoudness::mdaLoudness(audioMasterCallback audioMaster): AudioEffectX(audioMaster, NPROGS, NPARAMS)
{
setNumInputs(2);
setNumOutputs(2);
setUniqueID('mdal');
DECLARE_VST_DEPRECATED(canMono) ();
canProcessReplacing();
programs = new mdaLoudnessProgram[NPROGS];
setProgram(0);
suspend();
}
示例10: channel
//have fun modifying this one!
void Midi16CCRouter::processMidiEvents (VstMidiEventVec *inputs, VstMidiEventVec *outputs, VstInt32 sampleFrames)
{
// process incoming events
for (unsigned int i=0;i<inputs[0].size();i++) {
//copying event "i" from input (with all its fields)
VstMidiEvent tomod = inputs[0][i];
short status = tomod.midiData[0] & 0xf0; // scraping channel
short channel = (tomod.midiData[0] & 0x0f) + 1; // isolating channel (1-16)
short data1 = tomod.midiData[1] & 0x7f;
//short data2 = tomod.midiData[2] & 0x7f;
int cci[numCCs];
int cco[numCCs];
bool discard=false;
for (int i=0;i<numCCs;i++) {
cci[i] = FLOAT_TO_MIDI(param[i*2]);
cco[i] = FLOAT_TO_MIDI2(param[i*2+1]);
}
int chi = FLOAT_TO_CHANNEL016(param[kChi]);
int cho = FLOAT_TO_CHANNEL016(param[kCho]);
if (cho==0) cho=channel;
int chipc = FLOAT_TO_CHANNEL016(param[kPC]);
if (param[kPC]==1.0f) chipc=-1;
//only look at the selected channel
if (channel == chipc || chipc == 0) {
if (status == MIDI_PROGRAMCHANGE){
automated=true;
setProgram(data1);
}
}
if (channel == chi || chi == 0) {
if (status == MIDI_CONTROLCHANGE){
for (int i=0;i<numCCs;i++) {
if (data1==cci[i]/* && cco[i]>0*/) {
if (cco[i]!=0)
tomod.midiData[1] = cco[i]-1;
tomod.midiData[0] = status | (cho-1);
outputs[0].push_back(tomod);
discard=true;
}
}
}
}
if (!discard) outputs[0].push_back(tomod);
}
}
示例11: setShowHelp
bool ContextClosest::parseCmdArgs(int argc, char **argv, int skipFirstArgs){
_argc = argc;
_argv = argv;
_skipFirstArgs = skipFirstArgs;
if (_argc < 2) {
setShowHelp(true);
return false;
}
setProgram(_programNames[argv[0]]);
_argsProcessed.resize(_argc - _skipFirstArgs, false);
for (_i=_skipFirstArgs; _i < argc; _i++) {
if (isUsed(_i - _skipFirstArgs)) {
continue;
}
if (strcmp(_argv[_i], "-c") == 0) {
//bypass intersect's use of the -c option, because -c
//means writeCount for intersect, but means columns for map.
if (!ContextBase::handle_c()) return false;
}
else if (strcmp(_argv[_i], "-d") == 0) {
if (!handle_d()) return false;
}
else if (strcmp(_argv[_i], "-D") == 0) {
if (!handle_D()) return false;
}
else if (strcmp(_argv[_i], "-io") == 0) {
if (!handle_io()) return false;
}
else if (strcmp(_argv[_i], "-iu") == 0) {
if (!handle_iu()) return false;
}
else if (strcmp(_argv[_i], "-id") == 0) {
if (!handle_id()) return false;
}
else if (strcmp(_argv[_i], "-N") == 0) {
if (!handle_N()) return false;
}
else if (strcmp(_argv[_i], "-t") == 0) {
if (!handle_t()) return false;
}
else if (strcmp(_argv[_i], "-mdb") == 0) {
if (!handle_mdb()) return false;
}
}
return ContextIntersect::parseCmdArgs(argc, argv, _skipFirstArgs);
}
示例12: close
void Bank::newBank( const string& path, const string& name, bool doSave )
{
close( doSave );
path_ = path;
name_ = name;
programNum_ = -1;
Program* program = generateDefaultProgram( 0 );
insert( end(), program );
setProgram( 0, false );
if( doSave )
save( path_, false );
}
示例13: resize
void Bank::generateDefaultBank()
{
resize( NUMPROGRAMS );
for( INT32 i=0; i<NUMPROGRAMS; i++ )
{
Program* program = generateDefaultProgram( i );
insertProgram( i, program );
}
programNum_ = -1;
name_ = "Default Bank";
path_ = "";
setProgram( 0, false );
}
示例14: Program
void JenSx1000AudioProcessor::setStateInformation (const void* data, int sizeInBytes)
{
// You should use this method to restore your parameters from this memory block,
// whose contents will have been created by the getStateInformation() call.
Program* newProgram = new Program("New Program");
ScopedPointer<XmlElement> xmlState (getXmlFromBinary (data, sizeInBytes));
newProgram -> setProgramFromXml(xmlState);
setProgram(newProgram);
}
示例15: setProgram
bool ContextBase::testCmdArgs(int argc, char **argv) {
_argc = argc;
_argv = argv;
_skipFirstArgs = 1;
setProgram(_programNames[argv[0]]);
_argsProcessed.resize(_argc - _skipFirstArgs, false);
if (!parseCmdArgs(argc, argv, 1) || getShowHelp() || !isValidState()) {
if (!_errorMsg.empty()) {
cerr <<_errorMsg << endl;
}
return false;
}
return true;
}