[xiph-commits] r18877 - trunk/squishyball

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Tue Mar 12 13:06:19 PDT 2013


Author: xiphmont
Date: 2013-03-12 13:06:19 -0700 (Tue, 12 Mar 2013)
New Revision: 18877

Modified:
   trunk/squishyball/audio.c
Log:
Followup to Kyle McKay's small-file crossloop patch; sine we're no
longer extending short files, remove the dead block of extension code.

Also render the start-position checking in main.c consistent with the
check in audio.c



Modified: trunk/squishyball/audio.c
===================================================================
--- trunk/squishyball/audio.c	2013-03-12 20:04:14 UTC (rev 18876)
+++ trunk/squishyball/audio.c	2013-03-12 20:06:19 UTC (rev 18877)
@@ -517,38 +517,6 @@
     beep2[i] = w*b*mul*2;
   }
 
-  /* make sure that the samples are at least fragsamples*3 in length! If they're not, extend... */
-  {
-    int bps = (pcm[0]->bits+7)/8;
-    int ch = pcm[0]->ch;
-    int bpf = bps*ch;
-
-    if(pcm[0]->size<fragsamples*bpf*3){
-      int fadesize = pcm[0]->size/4;
-
-      for(i=0;i<test_files;i++){
-        int j,k;
-        unsigned char *newd=calloc(fragsamples*3,bpf);
-        if(!newd){
-          fprintf(stderr,"Unable to allocate memory to extend sample to minimum length.\n");
-          exit(5);
-        }
-        memcpy(newd,pcm[i]->data,fragsamples*3*bpf);
-        free(pcm[i]->data);
-        pcm[i]->data=newd;
-
-        newd+=pcm[i]->size-fadesize;
-        for(j=0;j<fadesize;j++){
-          float v = cosf(M_PI*.5f*(i+.5f)/fadesize);
-          for(k=0;k<ch;k++){
-            put_val(newd,bps,v * get_val(newd,bps));
-            newd+=bps;
-          }
-        }
-        pcm[i]->size=fragsamples*3;
-      }
-    }
-  }
   return fragsamples;
 }
 



More information about the commits mailing list