Index: pjproject/trunk/pjlib/include/pj/config_site_sample.h
===================================================================
--- pjproject/trunk/pjlib/include/pj/config_site_sample.h	(revision 1940)
+++ pjproject/trunk/pjlib/include/pj/config_site_sample.h	(revision 1941)
@@ -27,4 +27,5 @@
 #   undef PJMEDIA_RESAMPLE_IMP
 #   define PJMEDIA_RESAMPLE_IMP		PJMEDIA_RESAMPLE_LIBRESAMPLE
+#   define PJMEDIA_WSOLA_IMP		PJMEDIA_WSOLA_IMP_NULL
 #endif
 
@@ -50,4 +51,5 @@
 #   define PJMEDIA_RESAMPLE_IMP		PJMEDIA_RESAMPLE_NONE
 #   define PJMEDIA_HAS_SPEEX_AEC	0
+#   define PJMEDIA_WSOLA_IMP		PJMEDIA_WSOLA_IMP_NULL
 
     /* Disable all codecs but G.711 and GSM, for now */
Index: pjproject/trunk/pjmedia/include/pjmedia/config.h
===================================================================
--- pjproject/trunk/pjmedia/include/pjmedia/config.h	(revision 1940)
+++ pjproject/trunk/pjmedia/include/pjmedia/config.h	(revision 1941)
@@ -104,4 +104,40 @@
 #ifndef PJMEDIA_SOUND_USE_DELAYBUF
 #   define PJMEDIA_SOUND_USE_DELAYBUF	    0
+#endif
+
+
+/*
+ * Types of WSOLA backend algorithm.
+ */
+
+/**
+ * This denotes implementation of WSOLA using null algorithm. Expansion
+ * will generate zero frames, and compression will just discard some
+ * samples from the input.
+ *
+ * This type of implementation may be used as it requires the least
+ * processing power.
+ */
+#define PJMEDIA_WSOLA_IMP_NULL		    0
+
+/**
+ * This denotes implementation of WSOLA using fixed or floating point WSOLA
+ * algorithm. This implementation provides the best quality of the result,
+ * at the expense of one frame delay and intensive processing power 
+ * requirement.
+ */
+#define PJMEDIA_WSOLA_IMP_WSOLA		    1
+
+
+/**
+ * Specify type of Waveform based Similarity Overlap and Add (WSOLA) backend
+ * implementation to be used. WSOLA is an algorithm to expand and/or compress 
+ * audio frames without changing the pitch, and used by the delaybuf and as PLC
+ * backend algorithm.
+ *
+ * Default is PJMEDIA_WSOLA_IMP_WSOLA
+ */
+#ifndef PJMEDIA_WSOLA_IMP
+#   define PJMEDIA_WSOLA_IMP		    PJMEDIA_WSOLA_IMP_WSOLA
 #endif
 
Index: pjproject/trunk/pjmedia/src/pjmedia/wsola.c
===================================================================
--- pjproject/trunk/pjmedia/src/pjmedia/wsola.c	(revision 1940)
+++ pjproject/trunk/pjmedia/src/pjmedia/wsola.c	(revision 1941)
@@ -23,7 +23,15 @@
 #include <pj/pool.h>
 
+/*
+ * This file contains implementation of WSOLA using PJMEDIA_WSOLA_IMP_WSOLA
+ * or PJMEDIA_WSOLA_IMP_NULL
+ */
 #define THIS_FILE   "wsola.c"
 
-//#undef PJ_HAS_FLOATING_POINT
+
+#if PJMEDIA_WSOLA_IMP==PJMEDIA_WSOLA_IMP_WSOLA
+/*
+ * WSOLA implementation using WSOLA
+ */
 
 /* History size, in percentage of samples_per_frame */
@@ -721,2 +729,95 @@
 
 
+#elif PJMEDIA_WSOLA_IMP==PJMEDIA_WSOLA_IMP_NULL
+/*
+ * WSOLA implementation using NULL
+ */
+
+struct pjmedia_wsola
+{
+    unsigned samples_per_frame;
+};
+
+
+PJ_DEF(pj_status_t) pjmedia_wsola_create( pj_pool_t *pool, 
+					  unsigned clock_rate,
+					  unsigned samples_per_frame,
+					  unsigned channel_count,
+					  unsigned options,
+					  pjmedia_wsola **p_wsola)
+{
+    pjmedia_wsola *wsola;
+
+    wsola = PJ_POOL_ZALLOC_T(pool, struct pjmedia_wsola);
+    wsola->samples_per_frame = samples_per_frame;
+
+    PJ_UNUSED_ARG(clock_rate);
+    PJ_UNUSED_ARG(channel_count);
+    PJ_UNUSED_ARG(options);
+
+    *p_wsola = wsola;
+
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjmedia_wsola_destroy(pjmedia_wsola *wsola)
+{
+    PJ_UNUSED_ARG(wsola);
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjmedia_wsola_reset( pjmedia_wsola *wsola,
+					 unsigned options)
+{
+    PJ_UNUSED_ARG(wsola);
+    PJ_UNUSED_ARG(options);
+
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjmedia_wsola_save( pjmedia_wsola *wsola, 
+					short frm[], 
+					pj_bool_t prev_lost)
+{
+    PJ_UNUSED_ARG(wsola);
+    PJ_UNUSED_ARG(frm);
+    PJ_UNUSED_ARG(prev_lost);
+
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjmedia_wsola_generate( pjmedia_wsola *wsola, 
+					    short frm[])
+{
+    pjmedia_zero_samples(frm, wsola->samples_per_frame);
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjmedia_wsola_discard( pjmedia_wsola *wsola, 
+					   short buf1[],
+					   unsigned buf1_cnt, 
+					   short buf2[],
+					   unsigned buf2_cnt,
+					   unsigned *del_cnt)
+{
+    pj_assert(buf1_cnt + buf2_cnt >= wsola->samples_per_frame);
+
+    PJ_UNUSED_ARG(buf1);
+    PJ_UNUSED_ARG(buf1_cnt);
+    PJ_UNUSED_ARG(buf2);
+    PJ_UNUSED_ARG(buf2_cnt);
+
+    *del_cnt = wsola->samples_per_frame;
+
+    return PJ_SUCCESS;
+}
+
+
+#endif	/* #if PJMEDIA_WSOLA_IMP.. */
+
+
