From 50a65440ace93f85087372ad81170720c82587ba Mon Sep 17 00:00:00 2001
From: Anthony Minessale <anthony.minessale@gmail.com>
Date: Thu, 29 Dec 2005 00:27:18 +0000
Subject: [PATCH] but it should compile doh

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@233 d0543943-73ff-0310-b7d9-9358b9ac24b2
---
 src/mod/mod_rawaudio/mod_rawaudio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mod/mod_rawaudio/mod_rawaudio.c b/src/mod/mod_rawaudio/mod_rawaudio.c
index 68e895286e..79449b14fc 100644
--- a/src/mod/mod_rawaudio/mod_rawaudio.c
+++ b/src/mod/mod_rawaudio/mod_rawaudio.c
@@ -111,12 +111,12 @@ static switch_status switch_raw_encode(switch_codec *codec,
 			printf("Activate Resample %d->%d\n", codec->implementation->samples_per_second, other_codec->implementation->samples_per_second);
 			context->enc_from = codec->implementation->samples_per_second;
 			context->enc_to = other_codec->implementation->samples_per_second;
-			context->enc_factor = ((double)other_codec->implementation->samples_per_second / (double)codec->implementation->samples_per_second);
+			context->enc_factor = ((double) context->enc_from / (double)context->enc_to);
 			context->enc_resampler = resample_open(1, context->enc_factor, context->enc_factor);
 		}
 
 		if (context->enc_from) {
-	
+		
 		}
 
 		return SWITCH_STATUS_SUCCESS;