Changeset 2977 for pjproject


Ignore:
Timestamp:
Oct 29, 2009 9:39:17 AM (15 years ago)
Author:
bennylp
Message:

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
Location:
pjproject/trunk/pjmedia/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/include/pjmedia-audiodev/config.h

    r2833 r2977  
    4545/** 
    4646 * This setting controls whether PortAudio support should be included. 
     47 * 
     48 * By default it is enabled except on Windows platforms (including 
     49 * Windows Mobile) and Symbian. 
    4750 */ 
    4851#ifndef PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO 
    49 #   define PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO      1 
     52#   if (defined(PJ_WIN32) && PJ_WIN32!=0) || \ 
     53       (defined(PJ_SYMBIAN) && PJ_SYMBIAN!=0) 
     54#       define PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO  0 
     55#   else 
     56#       define PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO  1 
     57#   endif 
    5058#endif 
    5159 
  • pjproject/trunk/pjmedia/include/pjmedia/config.h

    r2850 r2977  
    104104 
    105105/** 
    106  * Specify default sound device latency, in milisecond. 
     106 * Specify default sound device latency, in milisecond.  
     107 * 
     108 * Default is 160ms for Windows Mobile and 140ms for other platforms. 
    107109 */ 
    108110#ifndef PJMEDIA_SND_DEFAULT_PLAY_LATENCY 
    109 #   define PJMEDIA_SND_DEFAULT_PLAY_LATENCY 100 
     111#   if defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE!=0 
     112#       define PJMEDIA_SND_DEFAULT_PLAY_LATENCY     160 
     113#   else 
     114#       define PJMEDIA_SND_DEFAULT_PLAY_LATENCY     140 
     115#   endif 
    110116#endif 
    111117 
     
    221227 * combiner port, and dsound.c. 
    222228 * 
    223  * Default: 6 
     229 * Default: (PJMEDIA_SND_DEFAULT_PLAY_LATENCY+20)/20 
    224230 */ 
    225231#ifndef PJMEDIA_SOUND_BUFFER_COUNT 
    226 #   define PJMEDIA_SOUND_BUFFER_COUNT       6 
     232#   define PJMEDIA_SOUND_BUFFER_COUNT       ((PJMEDIA_SND_DEFAULT_PLAY_LATENCY+20)/20) 
    227233#endif 
    228234 
Note: See TracChangeset for help on using the changeset viewer.