Revision
16712
Author
gmaruzz
Date
2010-02-21 05:01:05 -0600 (Sun, 21 Feb 2010)

Log Message

skypiax: shorter audio buffers, sync read and write audio timers each second

Modified Paths

Diff

Modified: freeswitch/trunk/src/mod/endpoints/mod_skypiax/mod_skypiax.c (16711 => 16712)


--- freeswitch/trunk/src/mod/endpoints/mod_skypiax/mod_skypiax.c	2010-02-21 08:45:38 UTC (rev 16711)
+++ freeswitch/trunk/src/mod/endpoints/mod_skypiax/mod_skypiax.c	2010-02-21 11:01:05 UTC (rev 16712)
@@ -902,7 +902,7 @@
 
 
 	if (!tech_pvt->read_buffer) {
-		int32_t len = 640 * 8;
+		int32_t len = 640 * 2;
 
 		switch_buffer_create(skypiax_module_pool, &tech_pvt->read_buffer, len);
 		switch_assert(tech_pvt->read_buffer);
@@ -1048,7 +1048,7 @@
 #endif
 
 	if (!tech_pvt->write_buffer) {
-		int32_t len = 320 * 8;
+		int32_t len = 320 * 4;
 
 		switch_buffer_create(skypiax_module_pool, &tech_pvt->write_buffer, len);
 		switch_assert(tech_pvt->write_buffer);

Modified: freeswitch/trunk/src/mod/endpoints/mod_skypiax/skypiax_protocol.c (16711 => 16712)


--- freeswitch/trunk/src/mod/endpoints/mod_skypiax/skypiax_protocol.c	2010-02-21 08:45:38 UTC (rev 16711)
+++ freeswitch/trunk/src/mod/endpoints/mod_skypiax/skypiax_protocol.c	2010-02-21 11:01:05 UTC (rev 16712)
@@ -500,6 +500,10 @@
 				if (!strcasecmp(prop, "FAILUREREASON")) {
 					DEBUGA_SKYPE("Skype FAILED on skype_call %s. Let's wait for the FAILED message.\n", SKYPIAX_P_LOG, id);
 				}
+				if (!strcasecmp(prop, "DURATION")) { /* each second, we sync ithe timers */
+					switch_core_timer_sync(&tech_pvt->timer_read);
+					switch_core_timer_sync(&tech_pvt->timer_write);
+				}
 				if (!strcasecmp(prop, "DURATION") && (!strcasecmp(value, "1"))) {
 					if (strcasecmp(id, tech_pvt->skype_call_id)) {
 						skypiax_strncpy(tech_pvt->skype_call_id, id, sizeof(tech_pvt->skype_call_id) - 1);