[Vorbis-dev] Add vorbis_dsp_init() ?

Martin Guy martinwguy at yahoo.it
Sun Mar 15 04:18:31 PDT 2009


 int vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb){
   int i;
   memset(vb,0,sizeof(*vb));
   vb->vd=v;
-  vb->localalloc=0;
-  vb->localstore=NULL;
   if(v->analysisp){
...
   return(0);
+}
+
+void vorbis_dsp_init(vorbis_dsp_state *v){
+  memset(v,0,sizeof(*v));
 }

Er, sorry, if you remove the initialization from an existing public
function and make a new one that existing code (obviously) doesn;t
call, isn't that likely to break existing code that calls
vorbis_block_init()?

Is this an initialization that can or must always be done when
vorbis_block_init() is called, can you not just quietly do it in
there?

    M


More information about the Vorbis-dev mailing list