summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2009-10-29 09:39:17 +0000
committerBenny Prijono <bennylp@teluu.com>2009-10-29 09:39:17 +0000
commit80c2628e5009a4ef25ac9dbd624da75e7907f0db (patch)
tree269a482487bbb985d73f8a80c25aebda620ef0cd
parent64153021595b2d80fe4182d888f88cf932006067 (diff)
Ticket #983: make native WMME the default audio device on Windows and Windows Mobile:
- increase default playback latency (PJMEDIA_SND_DEFAULT_PLAY_LATENCY) to 140ms for Win32 and 160ms for WM - set default PJMEDIA_SOUND_BUFFER_COUNT to (PJMEDIA_SND_DEFAULT_PLAY_LATENCY+20)/20 rather than hardcoded 6 - disable PA from audiodev on Win32 and WM git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2977 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--pjmedia/include/pjmedia-audiodev/config.h10
-rw-r--r--pjmedia/include/pjmedia/config.h14
2 files changed, 19 insertions, 5 deletions
diff --git a/pjmedia/include/pjmedia-audiodev/config.h b/pjmedia/include/pjmedia-audiodev/config.h
index 0cbec050..937e391a 100644
--- a/pjmedia/include/pjmedia-audiodev/config.h
+++ b/pjmedia/include/pjmedia-audiodev/config.h
@@ -44,9 +44,17 @@ PJ_BEGIN_DECL
/**
* This setting controls whether PortAudio support should be included.
+ *
+ * By default it is enabled except on Windows platforms (including
+ * Windows Mobile) and Symbian.
*/
#ifndef PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO
-# define PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO 1
+# if (defined(PJ_WIN32) && PJ_WIN32!=0) || \
+ (defined(PJ_SYMBIAN) && PJ_SYMBIAN!=0)
+# define PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO 0
+# else
+# define PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO 1
+# endif
#endif
diff --git a/pjmedia/include/pjmedia/config.h b/pjmedia/include/pjmedia/config.h
index a81d2e71..8fa302ad 100644
--- a/pjmedia/include/pjmedia/config.h
+++ b/pjmedia/include/pjmedia/config.h
@@ -103,10 +103,16 @@
#endif
/**
- * Specify default sound device latency, in milisecond.
+ * Specify default sound device latency, in milisecond.
+ *
+ * Default is 160ms for Windows Mobile and 140ms for other platforms.
*/
#ifndef PJMEDIA_SND_DEFAULT_PLAY_LATENCY
-# define PJMEDIA_SND_DEFAULT_PLAY_LATENCY 100
+# if defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE!=0
+# define PJMEDIA_SND_DEFAULT_PLAY_LATENCY 160
+# else
+# define PJMEDIA_SND_DEFAULT_PLAY_LATENCY 140
+# endif
#endif
@@ -220,10 +226,10 @@
* The setting here currently is used by the conference bridge, the splitter
* combiner port, and dsound.c.
*
- * Default: 6
+ * Default: (PJMEDIA_SND_DEFAULT_PLAY_LATENCY+20)/20
*/
#ifndef PJMEDIA_SOUND_BUFFER_COUNT
-# define PJMEDIA_SOUND_BUFFER_COUNT 6
+# define PJMEDIA_SOUND_BUFFER_COUNT ((PJMEDIA_SND_DEFAULT_PLAY_LATENCY+20)/20)
#endif