Hi Steven, IIRC, the current WM app samples with provided config_site_sample.h are ready for Speex. Anyway, here are some 'check-points' to use Speex on WM: 1. Use Speex-NB or Speex/8000, other modes may not work because of CPU limitation. 2. Avoid resample, e.g: in point #1, Speex-NB uses 8000Hz sampling rate, so use the same clock rate for sound device and conference bridge/audio switch board. 3. Use lower Speex complexity/quality, e.g: #define PJSUA_DEFAULT_CODEC_QUALITY 5 #define PJMEDIA_CODEC_SPEEX_DEFAULT_QUALITY 5 4. Use release mode and also apply optimization on build setting (optimization level 2 will be applied in release mode by default, this should be enough). 5. Optional, apply higher sound device latency setting to achieve more stability. 6. Moreover, see http://trac.pjsip.org/repos/wiki/FAQ#cpu. BR, nanang On Sat, Mar 13, 2010 at 7:07 AM, Steven Beck <sbeck45 at gmail.com> wrote: > Hi, > ? I'm having a hard time getting speex to work on Windows Mobile.? I'm using > version 1.0.3.? I had been using only G.711, with the following > configuration in config_site.h: > > #define PJ_HAS_TCP????????????????????? 0 > #define PJSIP_HAS_TLS_TRANSPORT???????? 0 > > #define PJMEDIA_HAS_SPEEX_AEC?????????????? 0 > #define PJMEDIA_ECHO_SUPPRESS_FACTOR??????? 1 > > #define PJMEDIA_CODEC_MAX_SILENCE_PERIOD??? 0 > > #define PJMEDIA_HAS_STEVEU_PLC????????????? 0 > > #define PJMEDIA_HAS_G711_PLC??????????? 0 > #define PJMEDIA_HAS_SMALL_FILTER??????? 0 > #define PJMEDIA_HAS_LARGE_FILTER??????? 0 > > #define PJMEDIA_HAS_G711_CODEC????????? 1 > #define PJMEDIA_HAS_SPEEX_CODEC???????? 0 > #define PJMEDIA_HAS_GSM_CODEC?????????? 0 > #define PJMEDIA_HAS_ILBC_CODEC????????? 0 > #define PJMEDIA_HAS_L16_CODEC?????????? 0 > > #define PJMEDIA_HAS_SRTP??? ??????????? 0 > > #define PJMEDIA_SOUND_IMPLEMENTATION???? PJMEDIA_SOUND_WIN32_MME_SOUND > #define PJMEDIA_PREFER_DIRECT_SOUND??? ??? 0 > #define PJMEDIA_SND_DEFAULT_REC_LATENCY? 100 > #define PJMEDIA_SND_DEFAULT_PLAY_LATENCY 100 > #define PJMEDIA_SOUND_USE_DELAYBUF??? ??? 0 > #define PJMEDIA_SOUND_BUFFER_COUNT??? ??? 20 > > This has been working fine with G.711. > > I then wanted to add SPEEX, so I changed PJMEDIA_HAS_SPEEX_CODEC in the > above to 1.? Running this, the program would hang when media was activated > for a SPEEX call, but still worked for a G.711 call. > > I then found a recommended WINCE config in config_site_sample.h, which I > tried: > > #define PJ_HAS_FLOATING_POINT??? 0 > > #define PJMEDIA_HAS_G711_PLC???? 0 > #define PJMEDIA_HAS_L16_CODEC??? 0 > #define PJMEDIA_HAS_SPEEX_AEC??? 0 > > #undef PJMEDIA_RESAMPLE_IMP > #define PJMEDIA_RESAMPLE_IMP???? PJMEDIA_RESAMPLE_LIBRESAMPLE > #define PJMEDIA_WSOLA_IMP??? ??? PJMEDIA_WSOLA_IMP_WSOLA_LITE > > #define PJSUA_DEFAULT_CODEC_QUALITY??? ??? ??? 5 > #define PJMEDIA_CODEC_SPEEX_DEFAULT_QUALITY??? 5 > > #define PJMEDIA_SDP_NEG_PREFER_REMOTE_CODEC_ORDER??? 0 > > With this config, the program would not hang, but there was no sound in or > out, for any call, SPEEX or G.711.? I also discovered in the log that the > sound device was giving "Unanticipated host error"s during initialization, > and that no sound device could be opened.? I compared this log to the > original configuration and found that this log was using PortAudio while the > original was using WMME. > > This configuration also left the microphone in a broken state.? If after > exiting the program I started a program built with my original config, the > mic would not work.? I would have to reboot the device, after which the mic > worked again with my original config program. > > So I added to the recommended WINCE config the following: > > #define PJMEDIA_SOUND_IMPLEMENTATION???? PJMEDIA_SOUND_WIN32_MME_SOUND > #define PJMEDIA_PREFER_DIRECT_SOUND??? ??? 0 > #define PJMEDIA_SND_DEFAULT_REC_LATENCY? 100 > #define PJMEDIA_SND_DEFAULT_PLAY_LATENCY 100 > #define PJMEDIA_SOUND_USE_DELAYBUF??? ??? 0 > #define PJMEDIA_SOUND_BUFFER_COUNT??? ??? 20 > > Running with this config, the program hung again, when a speex call was made > or received.? A G.711 call still worked. > > I'm out of ideas.? Unless it absolutely can not be made to work with 1.0.3, > I really must stay with that version (instead of going for 1.5.5). > > I've been told that SPEEX works for Windows Mobile.? Can someone please tell > me what is needed to get it to work? > > ?? Thanks, > ?? Steven > > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > >