changeset 36391:3b1fb70800f4

Add some "const" to input-only pointers.
author reimar
date Fri, 25 Oct 2013 19:59:59 +0000
parents ac6843fb4f01
children 741131acf556
files libaf/af_format.c
diffstat 1 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/libaf/af_format.c	Fri Oct 25 19:59:58 2013 +0000
+++ b/libaf/af_format.c	Fri Oct 25 19:59:59 2013 +0000
@@ -45,15 +45,15 @@
 #include "af_format_alaw.h"
 
 // Switch endianness
-static void endian(void* in, void* out, int len, int bps);
+static void endian(const void* in, void* out, int len, int bps);
 // From signed to unsigned and the other way
 static void si2us(void* data, int len, int bps);
 // Change the number of bits per sample
-static void change_bps(void* in, void* out, int len, int inbps, int outbps);
+static void change_bps(const void* in, void* out, int len, int inbps, int outbps);
 // From float to int signed
-static void float2int(float* in, void* out, int len, int bps);
+static void float2int(const float* in, void* out, int len, int bps);
 // From signed int to float
-static void int2float(void* in, float* out, int len, int bps);
+static void int2float(const void* in, float* out, int len, int bps);
 
 static af_data_t* play(struct af_instance_s* af, af_data_t* data);
 static af_data_t* play_swapendian(struct af_instance_s* af, af_data_t* data);
@@ -345,7 +345,7 @@
   af_open
 };
 
-static inline uint32_t load24bit(void* data, int pos) {
+static inline uint32_t load24bit(const void* data, int pos) {
 #if HAVE_BIGENDIAN
   return (((uint32_t)((uint8_t*)data)[3*pos])<<24) |
 	 (((uint32_t)((uint8_t*)data)[3*pos+1])<<16) |
@@ -370,7 +370,7 @@
 }
 
 // Function implementations used by play
-static void endian(void* in, void* out, int len, int bps)
+static void endian(const void* in, void* out, int len, int bps)
 {
   register int i;
   switch(bps){
@@ -413,7 +413,7 @@
   } while (i += bps);
 }
 
-static void change_bps(void* in, void* out, int len, int inbps, int outbps)
+static void change_bps(const void* in, void* out, int len, int inbps, int outbps)
 {
   register int i;
   switch(inbps){
@@ -484,7 +484,7 @@
   }
 }
 
-static void float2int(float* in, void* out, int len, int bps)
+static void float2int(const float* in, void* out, int len, int bps)
 {
   float f;
   register int i;
@@ -519,7 +519,7 @@
   }
 }
 
-static void int2float(void* in, float* out, int len, int bps)
+static void int2float(const void* in, float* out, int len, int bps)
 {
   register int i;
   switch(bps){