Exemplo n.º 1
0
static int floor0_inverse2(vorbis_block *vb,vorbis_look_floor *i,void *memo,ogg_double_t *out)
{
 vorbis_look_floor0 *look=(vorbis_look_floor0 *)i;
 vorbis_info_floor0 *info=look->vif0;

 if(memo){
  ogg_double_t *lsp=(ogg_double_t *)memo;
  ogg_double_t amp=lsp[look->m];

  vorbis_lsp_to_curve(out,lsp,look->linearcosmap[vb->W],
		      look->n[vb->W],look->m,
		      amp,(ogg_double_t)info->ampdB);
  return(1);
 }
 memset(out,0,sizeof(*out)*look->n[vb->W]);
 return(0);
}
Exemplo n.º 2
0
static int floor0_inverse2(vorbis_block *vb,vorbis_look_floor *i,
			   void *memo,float *out){
  vorbis_look_floor0 *look=(vorbis_look_floor0 *)i;
  vorbis_info_floor0 *info=look->vi;
  
  floor0_map_lazy_init(vb,info,look);

  if(memo){
    float *lsp=(float *)memo;
    float amp=lsp[look->m];

    /* take the coefficients back to a spectral envelope curve */
    vorbis_lsp_to_curve(out,
			look->linearmap[vb->W],
			look->n[vb->W],
			look->ln,
			lsp,look->m,amp,(float)info->ampdB);
    return(1);
  }
  memset(out,0,sizeof(*out)*look->n[vb->W]);
  return(0);
}