From c56c6f966c224a89a03542198386a74a86d109e7 Mon Sep 17 00:00:00 2001 From: Mathieu Rene Date: Fri, 4 Dec 2009 06:10:32 +0000 Subject: [PATCH] mod_dahdi_codec: code before decl git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15785 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/codecs/mod_dahdi_codec/mod_dahdi_codec.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/mod/codecs/mod_dahdi_codec/mod_dahdi_codec.c b/src/mod/codecs/mod_dahdi_codec/mod_dahdi_codec.c index 8b8ff8e233..c1c9ede574 100644 --- a/src/mod/codecs/mod_dahdi_codec/mod_dahdi_codec.c +++ b/src/mod/codecs/mod_dahdi_codec/mod_dahdi_codec.c @@ -452,6 +452,11 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_dahdi_codec_load) struct stat statbuf; struct dahdi_transcoder_info info = { 0 }; int32_t fd, res; + int mpf = 20000; /* Algorithmic delay of 15ms with 5ms of look-ahead delay */ + int spf = 160; + int bpfd = 320; + int bpfc = 20; + int fpnp = 20; total_encoders = 0; total_encoders_usage = 0; @@ -507,11 +512,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_dahdi_codec_load) *module_interface = switch_loadable_module_create_module_interface(pool, modname); SWITCH_ADD_CODEC(codec_interface, "DAHDI G.729A 8.0k"); /* 8.0kbit */ - int mpf = 20000; /* Algorithmic delay of 15ms with 5ms of look-ahead delay */ - int spf = 160; - int bpfd = 320; - int bpfc = 20; - int fpnp = 20; + switch_core_codec_add_implementation(pool, codec_interface, SWITCH_CODEC_TYPE_AUDIO, /* enumeration defining the type of the codec */