[xiph-commits] r3340 - libfishsound/branches/1.0-stable-flac/src/libfishsound

conrad at svn.annodex.net conrad at svn.annodex.net
Fri Jan 11 06:05:04 PST 2008


Author: conrad
Date: 2008-01-11 06:05:03 -0800 (Fri, 11 Jan 2008)
New Revision: 3340

Modified:
   libfishsound/branches/1.0-stable-flac/src/libfishsound/flac.c
Log:
cleanups in flac.c


Modified: libfishsound/branches/1.0-stable-flac/src/libfishsound/flac.c
===================================================================
--- libfishsound/branches/1.0-stable-flac/src/libfishsound/flac.c	2008-01-11 13:56:55 UTC (rev 3339)
+++ libfishsound/branches/1.0-stable-flac/src/libfishsound/flac.c	2008-01-11 14:05:03 UTC (rev 3340)
@@ -162,19 +162,19 @@
 	dfi (fsound, (float **)retpcm, blocksize, fsound->user_data);
       } else {
 	FishSoundDecoded_Float df;
-	float ** retpcm, *p;
-        FLAC__int32 * s = (FLAC__int32 *)buffer;
+        FLAC__int32 * s = (FLAC__int32 *)buffer; /* de-interleave source */
+	float *d; /* de-interleave dest */
 
         for (j = 0; j < channels; j++) {
 	  fi->pcm_out[j] = realloc(fi->pcm_out[j], sizeof(float) * blocksize);
         }
 	for (i = 0; i < blocksize; i++)
 	  for (j = 0; j < channels; j++) {
-	    p = fi->pcm_out[j];
-	    p[i] = s[i*channels + j] * norm;
+	    d = fi->pcm_out[j];
+	    d[i] = s[i*channels + j] * norm;
 	  }
       	df = (FishSoundDecoded_Float)fsound->callback.decoded_float;
-	df (fsound, retpcm, blocksize, fsound->user_data);
+	df (fsound, fi->pcm_out, blocksize, fsound->user_data);
     }
   }
   return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;



More information about the commits mailing list