本文整理汇总了C++中OUT0函数的典型用法代码示例。如果您正苦于以下问题:C++ OUT0函数的具体用法?C++ OUT0怎么用?C++ OUT0使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了OUT0函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: IN0
cam_flash_err_e CFlashSequencer::startSeq(sequenceID_t sequence, CFlashController *pController, flashSeqClbk_t pClbk, flashSeqClbkCtxtHnd_t ctxtHnd) {
IN0("\n");
if (pController == NULL) { // Error: a valid controller handle must be passed.
OUT0("\n");
return CAM_FLASH_ERR_BAD_PARAMETER;
}
if (curSeq != NONE_SEQ) { // A running sequence cannot be interrupted
OUT0("\n");
return CAM_FLASH_ERR_BAD_PRECONDITION;
}
curSeq = sequence;
switch (sequence) {
case NONE_SEQ:
i32_remSteps = 0;
break;
case RED_EYE_REMOVAL_SEQ:
i32_remSteps = sizeof(a_RER_sequence) / sizeof(cam_flashSeq_atom_t);
break;
case PRIVACY_SEQ:
i32_remSteps = sizeof(a_PI_sequence) / sizeof(cam_flashSeq_atom_t);
break;
}
mController = pController;
mpClbk = pClbk;
mctxtHnd = ctxtHnd;
sigTimer(); // To be called after delay by the chosen timing service.
OUT0("\n");
return CAM_FLASH_ERR_NONE;
}
示例2: Dbrown_next
void Dbrown_next(Dbrown *unit, int inNumSamples)
{
if (inNumSamples) {
float lo = DEMANDINPUT_A(1, inNumSamples); if(!sc_isnan(lo)) { unit->m_lo = lo; }
float hi = DEMANDINPUT_A(2, inNumSamples); if(!sc_isnan(hi)) { unit->m_hi = hi; }
float step = DEMANDINPUT_A(3, inNumSamples); if(!sc_isnan(step)) { unit->m_step = step; }
if (unit->m_repeats < 0.) {
float x = DEMANDINPUT_A(0, inNumSamples);
unit->m_repeats = sc_isnan(x) ? 0.f : floor(x + 0.5f);
unit->m_val = unit->mParent->mRGen->frand() * (unit->m_hi - unit->m_lo) + unit->m_lo;
}
if (unit->m_repeatCount >= unit->m_repeats) {
OUT0(0) = NAN;
return;
}
unit->m_repeatCount++;
OUT0(0) = unit->m_val;
float x = unit->m_val + unit->mParent->mRGen->frand2() * unit->m_step;
unit->m_val = sc_fold(x, unit->m_lo, unit->m_hi);
} else {
unit->m_repeats = -1.f;
unit->m_repeatCount = 0;
}
}
示例3: Dswitch_next
void Dswitch_next(Dswitch *unit, int inNumSamples)
{
int index;
float ival;
if (inNumSamples) {
float val = DEMANDINPUT_A(unit->m_index, inNumSamples);
//printf("index: %i\n", (int) val);
if(sc_isnan(val)) {
ival = DEMANDINPUT_A(0, inNumSamples);
if(sc_isnan(ival)) {
OUT0(0) = ival;
return;
}
index = (int32)floor(ival + 0.5f);
index = sc_wrap(index, 0, unit->mNumInputs - 2) + 1;
val = DEMANDINPUT_A(unit->m_index, inNumSamples);
RESETINPUT(unit->m_index);
// printf("resetting index: %i\n", unit->m_index);
unit->m_index = index;
}
OUT0(0) = val;
} else {
printf("...\n");
for (int i=0; i<unit->mNumInputs; ++i) {
RESETINPUT(i);
}
index = (int32)floor(DEMANDINPUT(0) + 0.5f);
index = sc_wrap(index, 0, unit->mNumInputs - 1) + 1;
unit->m_index = index;
}
}
示例4: Dstutter_next
void Dstutter_next(Dstutter *unit, int inNumSamples)
{
if (inNumSamples) {
if (unit->m_repeatCount >= unit->m_repeats) {
float val = DEMANDINPUT_A(1, inNumSamples);
float repeats = DEMANDINPUT_A(0, inNumSamples);
if(sc_isnan(repeats) || sc_isnan(val)) {
OUT0(0) = NAN;
return;
} else {
unit->m_value = val;
unit->m_repeats = floor(repeats + 0.5f);
unit->m_repeatCount = 0.f;
}
}
OUT0(0) = unit->m_value;
unit->m_repeatCount++;
} else {
unit->m_repeats = -1.f;
unit->m_repeatCount = 0.f;
RESETINPUT(0);
RESETINPUT(1);
}
}
示例5: Dibrown_next
void Dibrown_next(Dibrown *unit, int inNumSamples)
{
if (inNumSamples) {
float lo = DEMANDINPUT_A(1, inNumSamples); if(!sc_isnan(lo)) { unit->m_lo = (int32)lo; }
float hi = DEMANDINPUT_A(2, inNumSamples); if(!sc_isnan(hi)) { unit->m_hi = (int32)hi; }
float step = DEMANDINPUT_A(3, inNumSamples); if(!sc_isnan(step)) { unit->m_step = (int32)step; }
if (unit->m_repeats < 0.) {
float x = DEMANDINPUT_A(0, inNumSamples);
unit->m_repeats = sc_isnan(x) ? 0.f : floor(x + 0.5f);
unit->m_val = unit->mParent->mRGen->irand(unit->m_hi - unit->m_lo + 1) + unit->m_lo;
}
if (unit->m_repeatCount >= unit->m_repeats) {
OUT0(0) = NAN;
return;
}
OUT0(0) = unit->m_val;
int32 z = unit->m_val + unit->mParent->mRGen->irand2(unit->m_step);
unit->m_val = sc_fold(z, unit->m_lo, unit->m_hi);
} else {
unit->m_repeats = -1.f;
unit->m_repeatCount = 0;
}
}
示例6: Dbufrd_next
void Dbufrd_next(Dbufrd *unit, int inNumSamples)
{
int32 loop = (int32)DEMANDINPUT_A(2, inNumSamples);
D_GET_BUF_SHARED
D_CHECK_BUF
double loopMax = (double)(loop ? bufFrames : bufFrames - 1);
double phase;
if (inNumSamples)
{
float x = DEMANDINPUT_A(1, inNumSamples);
if (sc_isnan(x)) {
OUT0(0) = NAN;
return;
}
phase = x;
phase = sc_loop((Unit*)unit, phase, loopMax, loop);
int32 iphase = (int32)phase;
const float* table1 = bufData + iphase * bufChannels;
OUT0(0) = table1[0];
}
else
{
RESETINPUT(1);
}
}
示例7: Diwhite_next
void Diwhite_next(Diwhite *unit, int inNumSamples)
{
if (inNumSamples) {
float lo = DEMANDINPUT_A(1, inNumSamples);
float hi = DEMANDINPUT_A(2, inNumSamples);
if(!sc_isnan(lo)) { unit->m_lo = (int32)floor(DEMANDINPUT_A(1, inNumSamples) + 0.5f); }
if(!sc_isnan(hi)) {
int32 hi = (int32)floor(DEMANDINPUT_A(2, inNumSamples) + 0.5f);
unit->m_range = hi - unit->m_lo + 1;
}
if (unit->m_repeats < 0.) {
float x = DEMANDINPUT_A(0, inNumSamples);
unit->m_repeats = sc_isnan(x) ? 0.f : floor(x + 0.5f);
}
if (unit->m_repeatCount >= unit->m_repeats) {
OUT0(0) = NAN;
return;
}
unit->m_repeatCount++;
float x = unit->mParent->mRGen->irand(unit->m_range) + unit->m_lo;
OUT0(0) = x;
} else {
unit->m_repeats = -1.f;
unit->m_repeatCount = 0;
}
}
示例8: DbufTag_end
void DbufTag_end(DbufTag *unit, int which_case, int inNumSamples) {
int recycle = (int) DEMANDINPUT_A(dtag_recycle, inNumSamples);
int mode = (int) IN0(dtag_mode);
if(which_case == 0) {
DbufTag_reset(unit, recycle, inNumSamples);
if(mode == 4) {
printf("tag system was reset externally.\n");
if(recycle) {
printf("recycling. axiom length: %d\n", recycle);
}
}
return;
}
if((mode == 0) || (mode == which_case)) {
if(recycle) {
DbufTag_reset(unit, recycle, inNumSamples);
} else {
OUT0(0) = NAN;
}
return;
}
if(mode >= 4) {
printf("tag system halt: ");
if(which_case == 1) {
printf("divergence too large (buffer filled up).\n");
} else {
printf("terminated (string empty)\n");
}
if(recycle) {
printf("recycling. axiom length: %d\n", recycle);
//printf("new axiom:\n"); // todo.
DbufTag_reset(unit, recycle, inNumSamples);
GET_BUF
printf("new axiom (index %ld..%ld): ", unit->m_read_pos, unit->m_write_pos);
int32 n = unit->m_write_pos - unit->m_read_pos;
if(n < 0) {
n = sc_wrap(n, 0, bufFrames - 1);
}
for(int32 i=0; i < n; i++) {
int32 j = sc_wrap(unit->m_read_pos + i, 0, bufFrames - 1);
printf("%d ", (int)bufData[j]);
}
printf("\n");
} else {
OUT0(0) = NAN;
}
return;
}
OUT0(0) = NAN;
}
示例9: MedianSeparation_Ctor
void MedianSeparation_Ctor( MedianSeparation* unit ) {
//fft, fftharmonic, fftpercussive, fftsize, mediansize=17, hardorsoft=0, p=1
//IFFT needs to know what it is operating on
OUT0(0) = ZIN0(1); //-1;
OUT0(1) = ZIN0(2);
unit->fftsize_ = ZIN0(3); //so can set things up in constructor, rather than later on
unit->mediansize_ = ZIN0(4); //default 17, may cause trouble otherwise?
//printf("MedianSeparation starting %d %d \n",unit->fftsize_,unit->mediansize_);
if(unit->mediansize_<3)
unit->mediansize_ = 17;
unit->midpoint_ = unit->mediansize_/2;
unit->fftbins_ = (unit->fftsize_/2) +1; //actually /2 + 1 but polar form has separate packed dc and nyquist
unit->magnitudeposition_= 0;
unit->phaseposition_= 0;
//separate storage
unit->magnitudes_ = (float *) RTAlloc(unit->mWorld, sizeof(float)* unit->mediansize_ * unit->fftbins_);
unit->phases_ = (float *) RTAlloc(unit->mWorld, sizeof(float)* (unit->midpoint_+1) * unit->fftbins_); //only store half data since only need phases for midpoint about to output; this necessitates holding midpoint+1 values (to include just arrived)
//float * data_; //2D grid
//zero out all magnitudes and phases
int i;
for (i=0; i<unit->mediansize_ * unit->fftbins_; ++i)
unit->magnitudes_[i] = 0.0f;
for (i=0; i<(unit->midpoint_+1) * unit->fftbins_; ++i)
unit->phases_[i] = 0.0f;
unit->collection_ = (float *) RTAlloc(unit->mWorld, sizeof(float)* unit->mediansize_); //reusable array for sorting and finding median
unit->horizontalmedians_ = (float *) RTAlloc(unit->mWorld, sizeof(float)* unit->fftbins_);
unit->verticalmedians_ = (float *) RTAlloc(unit->mWorld, sizeof(float)* unit->fftbins_);
//need to go a step at a time over the vertical, horizontal sort and the eventual output (so takes four blocks to calculate, FFT must be at least 256)
unit->amortisationstep_=0;
SETCALC(MedianSeparation_next);
}
示例10: Dshuf_next
void Dshuf_next(Dshuf *unit, int inNumSamples)
{
// Print("->Dshuf_next %d\n", inNumSamples);
if (inNumSamples) {
//Print(" unit->m_repeats %d\n", unit->m_repeats);
if (unit->m_repeats < 0.) {
float x = DEMANDINPUT_A(0, inNumSamples);
unit->m_repeats = sc_isnan(x) ? 0.f : floor(x + 0.5f);
}
while (true) {
//Print(" unit->m_index %d unit->m_repeatCount %d\n", unit->m_index, unit->m_repeatCount);
if (unit->m_index >= (unit->mNumInputs - 1)) {
unit->m_index = 0;
unit->m_repeatCount++;
}
if (unit->m_repeatCount >= unit->m_repeats) {
//Print("done\n");
OUT0(0) = NAN;
unit->m_index = 0;
return;
}
if (ISDEMANDINPUT(unit->m_indices[unit->m_index])) {
if (unit->m_needToResetChild) {
unit->m_needToResetChild = false;
RESETINPUT(unit->m_indices[unit->m_index]);
}
float x = DEMANDINPUT_A(unit->m_indices[unit->m_index], inNumSamples);
if (sc_isnan(x)) {
unit->m_index++;
unit->m_needToResetChild = true;
} else {
OUT0(0) = x;
return;
}
} else {
OUT0(0) = DEMANDINPUT_A(unit->m_indices[unit->m_index], inNumSamples);
//Print(" unit->m_index %d OUT0(0) %g\n", unit->m_index, OUT0(0));
unit->m_index++;
unit->m_needToResetChild = true;
return;
}
}
} else {
unit->m_repeats = -1.f;
unit->m_repeatCount = 0;
unit->m_needToResetChild = true;
unit->m_index = 0;
Dshuf_scramble(unit);
}
}
示例11: Donce_next
void Donce_next(Donce *unit, int inNumSamples)
{
if (inNumSamples) {
if (unit->m_bufcounter == unit->mWorld->mBufCounter) {
OUT0(0) = unit->m_prev;
} else {
float x = DEMANDINPUT_A(0, inNumSamples);
unit->m_prev = x;
OUT0(0) = x;
}
} else {
RESETINPUT(0);
}
}
示例12: IN0
void OpenMax_Component_ConfigCB::setConfig(t_sint32 index, void * opaque_ptr)
//*************************************************************************************************************
{
IN0("\n");
mOMXProxy->setConfigFromProcessing((OMX_INDEXTYPE)index, (OMX_PTR)opaque_ptr);
OUT0("\n");
}
示例13: IN0
void openmax_processor::processEvent(void)
//*************************************************************************************************************
{// fsm.component.component.type interface posteven method processEvent
IN0("\n");
Component::processEvent();
OUT0("\n");
}
示例14: AnnBasic_next
void AnnBasic_next(AnnBasic *unit, int numSamples)
{
unsigned int in_c = sigInCount(unit);
unsigned int out_c = sigOutCount(unit);
AnnDef *def = Ann_GetAnnDef<true>( unit->ann_i, sigInCount(unit), sigOutCount(unit) );
if(!def) {
SETCALC( AnnBasic_idle );
AnnBasic_idle(unit, numSamples);
return;
}
struct fann *ann = def->_ann;
float *in = unit->inputs;
for( int i = 0; i < in_c; ++i )
{
in[i] = IN0(IN_SIG + i);
}
fann_type *out = fann_run( ann, in );
for( int i = 0; i < out_c; ++i )
{
OUT0(i) = out[i];
}
}
示例15: IN0
OMX_ERRORTYPE MPEG4Enc_ArmNmf_ProcessingComponent::codecConfigure()
{
IN0("");
OUT0("");
return OMX_ErrorNone;
}