• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ outlet_bang函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中outlet_bang函数的典型用法代码示例。如果您正苦于以下问题:C++ outlet_bang函数的具体用法?C++ outlet_bang怎么用?C++ outlet_bang使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了outlet_bang函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: lifop_bang

static void lifop_bang(t_lifop *x)
{
  t_lifop_prioritylist*plifo=0;
  t_lifop_list*lifo=0;
  t_atom*argv=0;
  int argc=0;

  if(!(plifo=getLifo(x->lifo_list))){
    outlet_bang(x->x_infout);
    return;
  }
  if(!(lifo=plifo->lifo_start)){
    outlet_bang(x->x_infout);
    return;
  }

  x->counter--;

  plifo->lifo_start=lifo->next;

  /* get the list from the entry */
  argc=lifo->argc;
  argv=lifo->argv;

  lifo->argc=0;
  lifo->argv=0;
  lifo->next=0;

  /* destroy the lifo-entry (important for recursion! */
  freebytes(lifo, sizeof(t_lifop_list));

  /* output the list */
  outlet_list(x->x_out, &s_list, argc, argv);

  /* free the list */
  freebytes(argv, argc*sizeof(t_atom));
}
开发者ID:jptrkz,项目名称:pd-zexy,代码行数:37,代码来源:lifop.c


示例2: oggread_decode_input

static int oggread_decode_input(t_oggread *x)
{
	long ret;		/* bytes per channel returned by decoder */
	int i;
	float **pcm;
    
	x->x_vi = ov_info(&x->x_ov, x->x_current_section);
    
	while(!x->x_eos)
	{
		ret = ov_read_float(&x->x_ov, &pcm, READ, &x->x_current_section);
		if (ret == 0)
		{
			/* EOF */
			x->x_eos = 1;
			x->x_stream = 0;
			clock_unset(x->x_clock);
			// post("oggread~: end of file detected, stopping");
			outlet_bang(x->x_out_end);
		}
		else if (ret < 0)
		{
			/* error in the stream.  Not a problem, just reporting it in
             case we (the app) cares.  In this case, we don't. */
		}
		else
		{
			/* we don't bother dealing with sample rate changes, etc, but
             you'll have to */
			long j;
			for(j = 0; j < ret; j++)
			{
				for(i = 0; i < x->x_vi->channels; i++)
				{
					x->x_outbuffer[x->x_outwriteposition] = pcm[i][j];
					x->x_outwriteposition = (x->x_outwriteposition + 1)%x->x_outbuffersize;
				}
			}
			x->x_outunread += (t_int)ret * x->x_vi->channels;
            
		}
		break;
	}
	x->x_decoded = (t_int)ret * x->x_vi->channels;		/* num. of samples we got from decoder */
    
	x->x_position = (t_float)ov_time_tell(&x->x_ov);
    /* exit decoding 'loop' here, we'll get called again by perform() */
	return 1;
}
开发者ID:davidfine,项目名称:timetravel_radio,代码行数:49,代码来源:oggread~.c


示例3: x10ProcessQueue

/*------------------------------------ x10ProcessQueue ---*/
static void
x10ProcessQueue(X10ControlData * xx)
{
    if (xx && (! xx->fStopping))
    {
        short prevLock = lockout_set(1);
        
        outlet_bang(xx->fPollerOut);
        clock_delay(xx->fPollClock, xx->fPollRate);
        lockout_set(prevLock);
#if USE_EVNUM
        evnum_incr();
#endif /* USE_EVNUM */
    }
} // x10ProcessQueue
开发者ID:opendragon,项目名称:Max_Objects,代码行数:16,代码来源:x10.cpp


示例4: postrender

/////////////////////////////////////////////////////////
// postrender
//
/////////////////////////////////////////////////////////
void pix_filmOS :: postrender(GemState *state)
{
  if(state) {
    //  state->image=m_oldImage;
    state->set(GemState::_PIX, m_oldImage);
  }
  m_pixBlock.newimage = 0;
  if (m_numFrames>0 && m_reqFrame>m_numFrames){
    m_reqFrame = m_numFrames;
    outlet_bang(m_outEnd);
  }
  
  m_newFilm = 0;
  m_pixBlock.newfilm = m_newFilm;
}
开发者ID:kmatheussen,项目名称:libpd,代码行数:19,代码来源:pix_filmOS.cpp


示例5: fvec_set_sample

static t_int *aubioquiet_tilde_perform(t_int *w)
{
  t_aubioquiet_tilde *x = (t_aubioquiet_tilde *)(w[1]);
  t_sample *in          = (t_sample *)(w[2]);
  int n                 = (int)(w[3]);
  int j;
  for (j=0;j<n;j++) {
    /* write input to datanew */
    fvec_set_sample(x->vec, in[j], x->pos);
    /*time for fft*/
    if (x->pos == x->hopsize-1) {
      /* block loop */
      if (aubio_silence_detection(x->vec, x->silence)==1) {
        if (x->wassilence==1) {
          x->issilence = 1;
        } else {
          x->issilence = 2;
          outlet_bang(x->quietbang);
        }
        x->wassilence=1;
      } else {
        if (x->wassilence<=0) {
          x->issilence = 0;
        } else {
          x->issilence = -1;
          outlet_bang(x->noisybang);
        }
        x->wassilence=0;
      }
      /* end of block loop */
      x->pos = -1; /* so it will be zero next j loop */
    }
    x->pos++;
  }
  return (w+4);
}
开发者ID:aubio,项目名称:pd-aubio,代码行数:36,代码来源:aubioquiet~.c


示例6: counter_bang

//the method when a bang is received
void counter_bang(t_extCounter* x)
{
    t_float f=x->i_count;
    t_int step = x->step;
    x->i_count+=step;

    if (x->i_down-x->i_up)
    {
        if ((step>0) && (x->i_count > x->i_up))
        {
            x->i_count = x->i_down;
            // so if we're reseting output a bang on the second outlet
            outlet_bang(x->b_out);
        }
        else if (x->i_count < x->i_down)
        {
            x->i_count = x->i_up;
          // so if we're reseting output a bang on the second outlet
            outlet_bang(x->b_out);
        }
    }
    outlet_float(x->f_out, f);
    post("extCounter banging");
}
开发者ID:sphaero,项目名称:pdExternals,代码行数:25,代码来源:main.c


示例7: sel2_symbol

static void sel2_symbol(t_sel2 *x, t_symbol *s)
{
    t_selectelement *e;
    int nelement;
    if (x->x_type == A_SYMBOL)
    {
	for (nelement = x->x_nelement, e = x->x_vec; nelement--; e++)
    	    if (e->e_w.w_symbol == s)
	{
    	    outlet_bang(e->e_outlet);
    	    return;
	}
    }
    outlet_symbol(x->x_rejectout, s);
}
开发者ID:BurntBrunch,项目名称:rockbox-fft,代码行数:15,代码来源:x_connective.c


示例8: spline_make_endpoints

void Catmullrom3D::spline_exec(t_spline *x)
{
	long i;
	double inc; 
	
	t_point delta;

spline_make_endpoints(x);	// prep for hermite etc: calculate helper points
spline_stepthrough(x); 
x->b_result[0].a_w.w_float = x->b_control[x->b_size - 1].x;   // output the last point
x->b_result[1].a_w.w_float = x->b_control[x->b_size - 1].y;
x->b_result[2].a_w.w_float = x->b_control[x->b_size - 1].z;
outlet_list(x->b_outlet1, 0L, x->b_dim, x->b_result);
outlet_bang(x->b_outlet2);
}
开发者ID:Cplaton,项目名称:JamomaCore,代码行数:15,代码来源:Catmullrom3D.cpp


示例9: sel2_float

static void sel2_float(t_sel2 *x, t_float f)
{
    t_selectelement *e;
    int nelement;
    if (x->x_type == A_FLOAT)
    {
	for (nelement = x->x_nelement, e = x->x_vec; nelement--; e++)
    	    if (e->e_w.w_float == f)
	{
    	    outlet_bang(e->e_outlet);
    	    return;
	}
    }
    outlet_float(x->x_rejectout, f);
}
开发者ID:BurntBrunch,项目名称:rockbox-fft,代码行数:15,代码来源:x_connective.c


示例10: holmes_bang

/*--------------------------------------------------------------------
 * bang : output the next klatt frame as a list
 */
void holmes_bang(t_holmes *x) {
  // -- get the next frame
  holmes_compute_next_frame(&(x->hg),&(x->hs));

  if (dsqueue_empty(x->hs.eltq)) {
    // -- report end-of-queue
    outlet_bang(x->eoq_out);
  }

  // -- reset end-of-utterance flag
  x->hs.flags &= ~(HOLMES_FLAG_EOU|HOLMES_FLAG_EOW);

  // -- finally, output the klatt frame
  klatt_frame_to_alist((long *)&(x->hs.pars), x->aframe);
  outlet_list(x->kfr_out, &s_list, NPAR, x->aframe);
}
开发者ID:megrimm,项目名称:pd-chips,代码行数:19,代码来源:holmes.c


示例11: while

/* this is the actual performance routine which acts on the samples.
   It's called with a single pointer "w" which is our location in the
   DSP call list.  We return a new "w" which will point to the next item
   after us.  Meanwhile, w[0] is just a pointer to dsp-perform itself
   (no use to us), w[1] and w[2] are the input and output vector locations,
   and w[3] is the number of points to calculate. */
static t_int *fileosc_perform(t_int *w)
{
  t_float *in = (t_float *)(w[1]);
  t_float *out = (t_float *)(w[2]);
  int n = (int)(w[3]);
  t_fileosc *x = (t_fileosc *)(w[4]);

  double y,ind;
  int z,v;

  if (x->stat)
    {
      while (n--)
        {
	  /* trata o inicio de eventos */
          if (x->n==0)
            { 
	      /* testa se acabou arquivo */
              z=fscanf(x->arq,"%lf",&y);
              x->freq=y;
              if (feof(x->arq))
                {
                  x->stat=0;
                  x->n = 0;
                  post("...acabou o arquivo!");
                  outlet_bang(x->bangoutlet);
                  return (w+5);
                }
	      z=fscanf(x->arq,"%d",&v);
              x->dur=v;
	      post("novo evento: frequencia=%lf, duracao=%d",x->freq,x->dur);
	      x->delta = x->freq*x->S/sys_getsr();
            }
	  /* Aqui esta' sendo feita a leitura truncada da tabela */
	  ind = x->ind+x->n*x->delta;
	  *out = x->SENO[(int)(ind-((int)ind/x->S)*x->S)];
          x->n++;
          if (x->n==x->dur)
	    {
              x->n=0;
	      x->ind = x->ind+x->n*x->delta;
	    }
          *out++;
        }
    }
  return (w+5);
}
开发者ID:danicuki,项目名称:luckiest_song,代码行数:53,代码来源:fileosc~.c


示例12: spaceballProcessQueue

/*------------------------------------ spaceballProcessQueue ---*/
static void
spaceballProcessQueue(SpaceballData * xx)
{
    if (xx && (! xx->fStopping))
    {
        short prevLock = lockout_set(1);
        
        if (! xx->fReset)
        {
            static unsigned char resetString[] = "@RESET\015\015";
            
            if (! xx->fDelayCounter)
            {
                spaceballPerformWriteCommand(xx, sizeof(resetString) - 1, resetString);
                ++xx->fDelayCounter;
            }
            else if (xx->fDelayCounter++ >= xx->fResetDuration)
            {
                xx->fReset = true;
                xx->fDelayCounter = 0;
            }
        }
        else if (! xx->fInited)
        {
            static unsigned char initString[] =
                                            "CB\015NT\015FR?\[email protected]@r\015MSSV\015Z\015BcCcCc\015";
            
            if (! xx->fDelayCounter)
            {
                spaceballPerformWriteCommand(xx, sizeof(initString) - 1, initString);
                spaceballZeroValues(xx);
                ++xx->fDelayCounter;
            }
            else if (xx->fDelayCounter++ >= xx->fInitDuration)
            {
                xx->fInited = true;
                xx->fDelayCounter = 0;
            }
        }
        outlet_bang(xx->fSampleBangOut);
        clock_delay(xx->fPollClock, xx->fPollRate);
        lockout_set(prevLock);
#if USE_EVNUM
        evnum_incr();
#endif /* USE_EVNUM */
    }
} // spaceballProcessQueue
开发者ID:opendragon,项目名称:Max_Objects,代码行数:48,代码来源:spaceball.cpp


示例13: cmd_Anything

/*------------------------------------ cmd_Anything ---*/
Pvoid
cmd_Anything(RcxControlPtr xx,
             PSymbol       message,
             short         argc,
             PAtom         argv)
{
  EnterCallback();
  LOG_ERROR_2(OUTPUT_PREFIX "Unknown message '%s' seen", message->s_name)
  outlet_bang(xx->fErrorBangOut);
  for (short ii = 0; ii < argc; ++ii)
  {
    switch (argv[ii].a_type)
    {
      case A_LONG:
        LOG_POST_3("  argument %hd is a long (%ld)", ii, argv[ii].a_w.w_long)
        break;

      case A_SYM:
        LOG_POST_3("  argument %hd is a symbol (%s)", ii, argv[ii].a_w.w_sym->s_name)
        break;

      case A_FLOAT:
        LOG_POST_3("  argument %hd is a float (%g)", ii, double(argv[ii].a_w.w_float))
        break;

      case A_SEMI:
        LOG_POST_2("  argument %hd is a semicolon", ii)
        break;

      case A_COMMA:
        LOG_POST_2("  argument %hd is a comma", ii)
        break;

      case A_DOLLAR:
        LOG_POST_2("  argument %hd is a dollar sign", ii)
        break;

      default:
        LOG_POST_3("  argument %hd is an unknown type (%hd)", ii, argv[ii].a_type)
        break;

    }
  }
  ExitMaxMessageHandler()
} /* cmd_Anything */
开发者ID:opendragon,项目名称:Max_Objects,代码行数:46,代码来源:rcx_Anything.c


示例14: rawin_close

static void rawin_close(t_rawin *x)
{

    if (!x->x_active) return;

    /* stop thread: set giveup + wait */
    x->x_giveup = 1;
    if (x->x_mode) pthread_join(x->x_thread, NULL);
    x->x_active = 0;

    /* close pipe */
    close(x->x_pipefd);

    /* notify */
    outlet_bang(x->x_sync_outlet);
    pdp_post("pdp_rawin: connection to %s closed", x->x_pipe->s_name);
    
}
开发者ID:Angeldude,项目名称:pd,代码行数:18,代码来源:pdp_rawin.c


示例15: past_int

void past_int(t_past *x, long n)
{
	t_atom a;
	
	atom_setlong(&a, n);
	if (x->p_size==1) {
		if (past_compare(x,&a,0) > 0) {
			if (!x->p_set) {
				x->p_set = 1;
				outlet_bang(x->p_out);
			}
		} else {
			x->p_set = 0;
		}
	} else {
		if (past_compare(x,&a,0) < 0)
			x->p_set = 0;
	}
}
开发者ID:Cycling74,项目名称:max5-sdk,代码行数:19,代码来源:past.c


示例16: image_newclick

static int image_newclick(t_gobj *z, struct _glist *glist, int xpix, int ypix, int shift, int alt, int dbl, int doit)
{
	//printf("doit=%d\n", doit);
	t_image *x = (t_image *)z;
	if (doit && x->x_click)
		outlet_bang(x->x_obj.ob_outlet);
	// LATER: figure out how to do click on and click off
	// and provide a toggle button behavior insteadS
	/*{
		x->x_clicked = 1;
		outlet_float(x->x_obj.ob_outlet, x->x_clicked);
	}
	else if (x->x_clicked)
	{
		x->x_clicked = 0;
		outlet_float(x->x_obj.ob_outlet, x->x_clicked);
	}*/
	return(1);
}
开发者ID:pd-l2ork,项目名称:pd,代码行数:19,代码来源:image.c


示例17: past_float

void past_float(t_past *x, double f)
{
	t_atom a;
		
	atom_setfloat(&a, f);
	if (x->p_size==1) {
		if (past_compare(x,&a,0) > 0) {
			if (!x->p_set) {
				x->p_set = 1;
				outlet_bang(x->p_out);
			}
		} else {
			x->p_set = 0;
		}
	} else {
		if (past_compare(x,&a,0) < 0)
			x->p_set = 0;
	}
}
开发者ID:Cycling74,项目名称:max5-sdk,代码行数:19,代码来源:past.c


示例18: substitute_dooutput

/* LATER rethink */
static void substitute_dooutput(t_substitute *x,
				t_symbol *s, int ac, t_atom *av, int pass)
{
    t_outlet *out = (pass ? x->x_passout : ((t_object *)x)->ob_outlet);
    if (s == &s_float)
    {
	if (ac > 1)
	    outlet_list(out, &s_list, ac, av);
	else
	    outlet_float(out, av->a_w.w_float);
    }
    else if (s == &s_bang && !ac)  /* CHECKED */
	outlet_bang(out);
    else if (s == &s_symbol && ac == 1 && av->a_type == A_SYMBOL)
	outlet_symbol(out, av->a_w.w_symbol);
    else if (s)
	outlet_anything(out, s, ac, av);
    else if (ac)
	outlet_list(out, &s_list, ac, av);
}
开发者ID:porres,项目名称:pd-cyclone,代码行数:21,代码来源:substitute.c


示例19: bytes2any_anything

/*--------------------------------------------------------------------
 * anything
 */
static void bytes2any_anything(t_bytes2any *x, MOO_UNUSED t_symbol *sel, int argc, t_atom *argv)
{
  int i0=0, i;

  /*-- scan & output --*/
  if (x->x_eos >= 0) {
    for (i=i0; i < argc; i++) {
      if (((int)atom_getfloatarg(i,argc,argv))==((int)x->x_eos)) {
	bytes2any_atoms(x, i-i0, argv+i0);
	i0=i+1;
      }
    }
  }

  if (i0 < argc) {
    bytes2any_atoms(x, argc-i0, argv+i0);
  }

  outlet_bang(x->x_outlet_done);
}
开发者ID:pd-projects,项目名称:pdstring-libdir,代码行数:23,代码来源:bytes2any.c


示例20: imagebang_bang

static void imagebang_bang(t_imagebang *x)
{
	
	t_glist* glist = glist_getcanvas(x->glist);
    if(x->flashing) {
		sys_vgui(".x%lx.c itemconfigure %lximage -image %lx_imagebang \n", glist, x,x->image_a);
        clock_delay(x->clock_brk, x->clockbrk);
        //x->flashed = 1;
    } else  {
		sys_vgui(".x%lx.c itemconfigure %lximage -image %lx_imagebang \n", glist, x,x->image_b);
        x->flashing = 1;
        
    }
    clock_delay(x->clock_flash, x->clockflash);
    
    outlet_bang(x->outlet);
    
    if(x->send && x->send->s_thing ) pd_bang(x->send->s_thing);
    
}
开发者ID:electrickery,项目名称:pd-tof,代码行数:20,代码来源:imagebang.c



注:本文中的outlet_bang函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ outlet_int函数代码示例发布时间:2022-05-30
下一篇:
C++ outlet_anything函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap