OSDN Git Service

Minor resampler cleanup: comments and qualifier order
authorGlenn Kasten <gkasten@google.com>
Wed, 17 Jul 2013 14:25:05 +0000 (07:25 -0700)
committerGlenn Kasten <gkasten@google.com>
Wed, 24 Jul 2013 23:50:19 +0000 (16:50 -0700)
Add comments for utility function used by resampler.
Use const int32_t * not int32_t const *.

Change-Id: Iaa5d6a5f7f77178ce0492dc77dcc5c1204271e5f

audio_utils/include/audio_utils/primitives.h
audio_utils/primitives.c

index b34e309..f800b8f 100644 (file)
@@ -32,6 +32,8 @@ __BEGIN_DECLS
  * For mono, c is the number of samples / 2, and out is an array of 16-bit samples.
  * The name "dither" is a misnomer; the current implementation does not actually dither
  * but uses truncation.  This may change.
+ * The out and sums buffers must either be completely separate (non-overlapping), or
+ * they must both start at the same address.  Partially overlapping buffers are not supported.
  */
 void ditherAndClamp(int32_t* out, const int32_t *sums, size_t c);
 
index af9ab40..074f071 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <audio_utils/primitives.h>
 
-void ditherAndClamp(int32_t* out, int32_t const *sums, size_t c)
+void ditherAndClamp(int32_t* out, const int32_t *sums, size_t c)
 {
     size_t i;
     for (i=0 ; i<c ; i++) {