changeset 14717:51a7560a92b7

confusing mixture of typecasts and casted variable, removed typecasts
author reimar
date Thu, 17 Feb 2005 15:35:44 +0000
parents 7b2abc34b737
children 11376fd550ac
files libaf/af_format.c
diffstat 1 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/libaf/af_format.c	Thu Feb 17 00:05:23 2005 +0000
+++ b/libaf/af_format.c	Thu Feb 17 15:35:44 2005 +0000
@@ -287,25 +287,25 @@
     af_data_t *data = arg;
     
     // Make sure this filter isn't redundant 
-    if(af->data->format == ((af_data_t*)arg)->format && 
-       af->data->bps == ((af_data_t*)arg)->bps)
+    if(af->data->format == data->format && 
+       af->data->bps == data->bps)
       return AF_DETACH;
 
     // Check for errors in configuraton
-    if((AF_OK != check_bps(((af_data_t*)arg)->bps)) ||
-       (AF_OK != check_format(((af_data_t*)arg)->format)) ||
+    if((AF_OK != check_bps(data->bps)) ||
+       (AF_OK != check_format(data->format)) ||
        (AF_OK != check_bps(af->data->bps)) ||
        (AF_OK != check_format(af->data->format)))
       return AF_ERROR;
 
     af_msg(AF_MSG_VERBOSE,"[format] Changing sample format from %s to %s\n",
-	   af_fmt2str(((af_data_t*)arg)->format,buf1,256),
+	   af_fmt2str(data->format,buf1,256),
 	   af_fmt2str(af->data->format,buf2,256));
 
-    af->data->rate = ((af_data_t*)arg)->rate;
-    af->data->nch  = ((af_data_t*)arg)->nch;
+    af->data->rate = data->rate;
+    af->data->nch  = data->nch;
     af->mul.n      = af->data->bps;
-    af->mul.d      = ((af_data_t*)arg)->bps;
+    af->mul.d      = data->bps;
     af_frac_cancel(&af->mul);
     
     af->play = play; // set default
@@ -321,7 +321,7 @@
 	(af->data->format == AF_FORMAT_S16_NE))
     {
 	af_msg(AF_MSG_VERBOSE,"[format] Accelerated %s to %s conversion\n",
-	   af_fmt2str(((af_data_t*)arg)->format,buf1,256),
+	   af_fmt2str(data->format,buf1,256),
 	   af_fmt2str(af->data->format,buf2,256));
 	af->play = play_float_s16;
     }
@@ -329,7 +329,7 @@
 	(af->data->format == AF_FORMAT_FLOAT_NE))
     {
 	af_msg(AF_MSG_VERBOSE,"[format] Accelerated %s to %s conversion\n",
-	   af_fmt2str(((af_data_t*)arg)->format,buf1,256),
+	   af_fmt2str(data->format,buf1,256),
 	   af_fmt2str(af->data->format,buf2,256));
 	af->play = play_s16_float;
     }