summaryrefslogtreecommitdiff
path: root/pjmedia
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2007-01-23 06:12:28 +0000
committerBenny Prijono <bennylp@teluu.com>2007-01-23 06:12:28 +0000
commit841130c3dd87c12c41fa3b34aef25c1f7a379e4a (patch)
tree3aa17d81828d32c4404905d18fe496d2dc8535c3 /pjmedia
parent6e7ee05ee9b9d7cf8c0cb4e0e09090bc88ca13f0 (diff)
Fixed ticket #74: unstable/stutter sound on Windows Mobile (thanks ChenHuang)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@899 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia')
-rw-r--r--pjmedia/include/pjmedia/config.h13
-rw-r--r--pjmedia/src/pjmedia/conference.c2
-rw-r--r--pjmedia/src/pjmedia/dsound.c4
-rw-r--r--pjmedia/src/pjmedia/splitcomb.c2
4 files changed, 17 insertions, 4 deletions
diff --git a/pjmedia/include/pjmedia/config.h b/pjmedia/include/pjmedia/config.h
index 5ecc04bf..fcd2b20a 100644
--- a/pjmedia/include/pjmedia/config.h
+++ b/pjmedia/include/pjmedia/config.h
@@ -66,6 +66,19 @@
/**
+ * Specify number of sound buffers. Larger number is better for sound
+ * stability and to accomodate sound devices that are unable to send frames
+ * in timely manner, however it would take more memory. One individual
+ * buffer is about 10 or 20 ms long.
+ *
+ * Default: 32
+ */
+#ifndef PJMEDIA_SOUND_BUFFER_COUNT
+# define PJMEDIA_SOUND_BUFFER_COUNT 32
+#endif
+
+
+/**
* Specify which A-law/U-law conversion algorithm to use.
* By default the conversion algorithm uses A-law/U-law table which gives
* the best performance, at the expense of 33 KBytes of static data.
diff --git a/pjmedia/src/pjmedia/conference.c b/pjmedia/src/pjmedia/conference.c
index fcec4397..672fe067 100644
--- a/pjmedia/src/pjmedia/conference.c
+++ b/pjmedia/src/pjmedia/conference.c
@@ -55,7 +55,7 @@ static FILE *fhnd_rec;
#define THIS_FILE "conference.c"
-#define RX_BUF_COUNT 8
+#define RX_BUF_COUNT PJMEDIA_SOUND_BUFFER_COUNT
#define BYTES_PER_SAMPLE 2
diff --git a/pjmedia/src/pjmedia/dsound.c b/pjmedia/src/pjmedia/dsound.c
index 30461f12..4e407771 100644
--- a/pjmedia/src/pjmedia/dsound.c
+++ b/pjmedia/src/pjmedia/dsound.c
@@ -43,8 +43,8 @@
#define BITS_PER_SAMPLE 16
#define BYTES_PER_SAMPLE (BITS_PER_SAMPLE/8)
-#define MAX_PACKET_BUFFER_COUNT 32
-#define DEFAULT_BUFFER_COUNT 16
+#define MAX_PACKET_BUFFER_COUNT PJMEDIA_SOUND_BUFFER_COUNT
+#define DEFAULT_BUFFER_COUNT PJMEDIA_SOUND_BUFFER_COUNT
#define MAX_HARDWARE 16
diff --git a/pjmedia/src/pjmedia/splitcomb.c b/pjmedia/src/pjmedia/splitcomb.c
index 338cccc5..8b3d9888 100644
--- a/pjmedia/src/pjmedia/splitcomb.c
+++ b/pjmedia/src/pjmedia/splitcomb.c
@@ -27,7 +27,7 @@
#define SIGNATURE_PORT PJMEDIA_PORT_SIGNATURE('S', 'p', 'C', 'P')
#define THIS_FILE "splitcomb.c"
#define TMP_SAMP_TYPE pj_int16_t
-#define MAX_BUF_CNT 32
+#define MAX_BUF_CNT PJMEDIA_SOUND_BUFFER_COUNT
#if 0
# define TRACE_UP_(x) PJ_LOG(5,x)