Ignore:
Timestamp:
Feb 21, 2009 2:21:59 PM (15 years ago)
Author:
bennylp
Message:

Updated libraries and applications to use the new Audio Device API

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/aps-direct/pjmedia/include/pjmedia/config.h

    r2452 r2468  
    6565 */ 
    6666 
    67 /** Constant for NULL sound backend. */ 
    68 #define PJMEDIA_SOUND_NULL_SOUND            0 
    69  
    70 /** Constant for PortAudio sound backend. */ 
    71 #define PJMEDIA_SOUND_PORTAUDIO_SOUND       1 
    72  
    73 /** Constant for Win32 DirectSound sound backend. */ 
    74 #define PJMEDIA_SOUND_WIN32_DIRECT_SOUND    2 
    75  
    76 /** Constant for Win32 MME sound backend. */ 
    77 #define PJMEDIA_SOUND_WIN32_MME_SOUND       3 
    78  
    79 /** Constant for Symbian Multimedia Audio Stream backend. */ 
    80 #define PJMEDIA_SOUND_SYMB_MDA_SOUND        4 
    81  
    82 /** Constant for Symbian APS backend. */ 
    83 #define PJMEDIA_SOUND_SYMB_APS_SOUND        5 
    84  
    85 /** Constant for Symbian VAS backend. */ 
    86 #define PJMEDIA_SOUND_SYMB_VAS_SOUND        6 
    87  
    88  
    89 /** When this is set, pjmedia will not provide any sound device backend.  
    90  *  Application will have to provide its own sound device backend 
    91  *  and link the application with it. 
    92  */ 
    93 #define PJMEDIA_SOUND_EXTERNAL              255 
    94  
    95  
    96 /** 
    97  * Unless specified otherwise, sound device uses PortAudio implementation 
    98  * by default. 
    99  */ 
    100 #ifndef PJMEDIA_SOUND_IMPLEMENTATION 
    101 #  if defined(PJ_WIN32) && PJ_WIN32!=0 
    102 /*#   define PJMEDIA_SOUND_IMPLEMENTATION   PJMEDIA_SOUND_WIN32_DIRECT_SOUND*/ 
    103 /*#   define PJMEDIA_SOUND_IMPLEMENTATION   PJMEDIA_SOUND_WIN32_MME_SOUND*/ 
    104 #   define PJMEDIA_SOUND_IMPLEMENTATION     PJMEDIA_SOUND_PORTAUDIO_SOUND 
    105 #  else 
    106 #   define PJMEDIA_SOUND_IMPLEMENTATION     PJMEDIA_SOUND_PORTAUDIO_SOUND 
    107 #  endif 
    108 #endif 
    109  
    110 /** 
    111  * Specify if the sound device implementation supports handling encoded 
    112  * frames. Setting this to zero will activate some emulation in the 
    113  * sound port. 
    114  */ 
    115 #if PJMEDIA_SOUND_IMPLEMENTATION==PJMEDIA_SOUND_SYMB_APS_SOUND || \ 
    116     PJMEDIA_SOUND_IMPLEMENTATION==PJMEDIA_SOUND_SYMB_VAS_SOUND 
    117 #   define PJMEDIA_SND_SUPPORT_OPEN2    1 
    118 #else 
    119 #   define PJMEDIA_SND_SUPPORT_OPEN2    0 
    120 #endif 
    121  
    122 /** 
    123  * Specify whether we prefer to use DirectSound on Windows. 
    124  * 
    125  * Default: 0 
    126  */ 
    127 #ifndef PJMEDIA_PREFER_DIRECT_SOUND 
    128 #   define PJMEDIA_PREFER_DIRECT_SOUND      0 
    129 #endif 
    130  
    131  
    132 /** 
    133  * Specify sound device latency default, in milisecond. 
     67/** 
     68 * This macro has been deprecated in releasee 1.1. Please see 
     69 * http://trac.pjsip.org/repos/wiki/Audio_Dev_API for more information. 
     70 */ 
     71#if defined(PJMEDIA_SOUND_IMPLEMENTATION) 
     72#   error PJMEDIA_SOUND_IMPLEMENTATION has been deprecated 
     73#endif 
     74 
     75/** 
     76 * This macro has been deprecated in releasee 1.1. Please see 
     77 * http://trac.pjsip.org/repos/wiki/Audio_Dev_API for more information. 
     78 */ 
     79#if defined(PJMEDIA_PREFER_DIRECT_SOUND) 
     80#   error PJMEDIA_PREFER_DIRECT_SOUND has been deprecated 
     81#endif 
     82 
     83/** 
     84 * Setting PJMEDIA_AUDIO_API to this value will completely deprecate the use 
     85 * of old API, and inclusion of <pjmedia/sound.h> in the code will raise  
     86 * compilation error. 
     87 */ 
     88#define PJMEDIA_AUDIO_API_NEW_ONLY          1 
     89 
     90/** 
     91 * Setting PJMEDIA_AUDIO_API to this value enables application to use the old 
     92 * sound device API to access audio devices provided by the new audio device  
     93 * API.  
     94 */ 
     95#define PJMEDIA_AUDIO_API_HAS_OLD_API       2 
     96 
     97/** 
     98 * Setting PJMEDIA_AUDIO_API to this value enables old sound device  
     99 * implementation to be accessed via both old and new API's.  
     100 */ 
     101#define PJMEDIA_AUDIO_API_HAS_OLD_DEVICE    3 
     102 
     103/** 
     104 * Specify how the audio API should handle compatibility with old sound API. 
     105 * Valid values are: PJMEDIA_AUDIO_API_HAS_OLD_API (default,  
     106 * PJMEDIA_AUDIO_API_NEW_ONLY, or PJMEDIA_AUDIO_API_HAS_OLD_DEVICE. Please 
     107 * see http://trac.pjsip.org/repos/wiki/Audio_Dev_API for more info. 
     108 */ 
     109#ifndef PJMEDIA_AUDIO_API 
     110#   define PJMEDIA_AUDIO_API                PJMEDIA_AUDIO_API_NEW_ONLY 
     111#endif 
     112 
     113 
     114/** 
     115 * Specify default sound device latency, in milisecond. 
    134116 */ 
    135117#ifndef PJMEDIA_SND_DEFAULT_REC_LATENCY 
     
    137119#endif 
    138120 
     121/** 
     122 * Specify default sound device latency, in milisecond. 
     123 */ 
    139124#ifndef PJMEDIA_SND_DEFAULT_PLAY_LATENCY 
    140125#   define PJMEDIA_SND_DEFAULT_PLAY_LATENCY 100 
    141 #endif 
    142  
    143  
    144 /** 
    145  * Specify whether delay buffer is used for sound device. 
    146  * When delay buffer is enabled, the sound device callback  
    147  * will be called one after another evenly. 
    148  * The delay buffer also performs the best delay calculation 
    149  * for the sound device, and will try to limit the delay caused 
    150  * by uneven callback calls to this delay. 
    151  * 
    152  * When this setting is enabled, the PJMEDIA_SOUND_BUFFER_COUNT 
    153  * macro will specify the maximum size of the delay buffer. 
    154  */ 
    155 #ifndef PJMEDIA_SOUND_USE_DELAYBUF 
    156 #   define PJMEDIA_SOUND_USE_DELAYBUF       0 
    157126#endif 
    158127 
Note: See TracChangeset for help on using the changeset viewer.