Ignore:
Timestamp:
Feb 18, 2009 1:55:03 PM (15 years ago)
Author:
bennylp
Message:

Added WMME device in audiodev

File:
1 edited

Legend:

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

    r2458 r2459  
    2525 * @brief Audio device API. 
    2626 */ 
    27 #include <pjmedia/types.h> 
     27#include <pjmedia/port.h> 
    2828#include <pj/pool.h> 
    2929 
     
    100100 
    101101    /**  
    102      * Support for setting the audio device volume level. The value of this 
    103      * capability is an unsigned integer representing the audio volume in  
    104      * percent. 
    105      */ 
    106     PJMEDIA_AUD_DEV_CAP_SET_VOLUME = 8, 
    107  
    108     /**  
    109      * Support for audio volume level query. The value of this capability  
    110      * is unsigned integer representing the audio volume in percent. 
    111      */ 
    112     PJMEDIA_AUD_DEV_CAP_GET_VOLUME = 16, 
    113  
    114     /**  
    115      * Support for audio routing (e.g. loudspeaker vs earpiece). The value 
    116      * of this capability is an integer containing #pjmedia_aud_dev_route 
     102     * Support for setting/retrieving the audio input device volume level. 
     103     * The value of this capability is an unsigned integer representing  
     104     * the input audio volume setting in percent. 
     105     */ 
     106    PJMEDIA_AUD_DEV_CAP_INPUT_VOLUME_SETTING = 8, 
     107 
     108    /**  
     109     * Support for setting/retrieving the audio output device volume level. 
     110     * The value of this capability is an unsigned integer representing  
     111     * the output audio volume setting in percent. 
     112     */ 
     113    PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING = 16, 
     114 
     115    /**  
     116     * Support for monitoring the current audio input signal volume.  
     117     * The value of this capability is an unsigned integer representing  
     118     * the audio volume in percent. 
     119     */ 
     120    PJMEDIA_AUD_DEV_CAP_INPUT_SIGNAL_VOLUME = 32, 
     121 
     122    /**  
     123     * Support for monitoring the current audio output signal volume.  
     124     * The value of this capability is an unsigned integer representing  
     125     * the audio volume in percent. 
     126     */ 
     127    PJMEDIA_AUD_DEV_CAP_OUTPUT_SIGNAL_VOLUME = 64, 
     128 
     129    /**  
     130     * Support for audio input routing. The value of this capability is an  
     131     * integer containing #pjmedia_aud_dev_route enumeration. 
     132     */ 
     133    PJMEDIA_AUD_DEV_CAP_INPUT_ROUTE = 128, 
     134 
     135    /**  
     136     * Support for audio output routing (e.g. loudspeaker vs earpiece). The 
     137     * value of this capability is an integer containing #pjmedia_aud_dev_route 
    117138     * enumeration. 
    118139     */ 
    119     PJMEDIA_AUD_DEV_CAP_ROUTE = 32, 
     140    PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE = 256, 
    120141 
    121142    /**  
     
    123144     * capability is an integer containing boolean PJ_TRUE or PJ_FALSE. 
    124145     */ 
    125     PJMEDIA_AUD_DEV_CAP_EC = 64, 
     146    PJMEDIA_AUD_DEV_CAP_EC = 512, 
    126147 
    127148    /**  
     
    130151     * echo tail in milliseconds. 
    131152     */ 
    132     PJMEDIA_AUD_DEV_CAP_EC_TAIL = 128, 
     153    PJMEDIA_AUD_DEV_CAP_EC_TAIL = 1024, 
    133154 
    134155    /**  
     
    137158     * PJ_FALSE. 
    138159     */ 
    139     PJMEDIA_AUD_DEV_CAP_VAD = 256, 
     160    PJMEDIA_AUD_DEV_CAP_VAD = 2048, 
    140161 
    141162    /**  
     
    144165     * PJ_FALSE. 
    145166     */ 
    146     PJMEDIA_AUD_DEV_CAP_CNG = 512, 
     167    PJMEDIA_AUD_DEV_CAP_CNG = 4096, 
    147168 
    148169    /**  
     
    151172     * PJ_FALSE. 
    152173     */ 
    153     PJMEDIA_AUD_DEV_CAP_PLC = 1024 
     174    PJMEDIA_AUD_DEV_CAP_PLC = 8192 
    154175     
    155176} pjmedia_aud_dev_cap; 
     
    239260 * buffer with audio samples. 
    240261 * 
    241  * @param user_data     User data associated with the stream. 
    242  * @param ts            Timestamp, in samples. 
    243  * @param output        Buffer to be filled out by application. 
    244  * @param size          The size requested in bytes, which will be equal to 
    245  *                      the size of one whole packet. 
    246  * 
    247  * @return              Non-zero to stop the stream. 
    248  */ 
    249 typedef pj_status_t (*pjmedia_aud_play_cb)(/* in */   void *user_data, 
    250                                            /* in */   const pj_timestamp *ts, 
    251                                            /* out */  void *output, 
    252                                            /* out */  unsigned size); 
     262 * The frame argument contains the following values: 
     263 *  - timestamp     Playback timestamp, in samples. 
     264 *  - buf           Buffer to be filled out by application. 
     265 *  - size          The size requested in bytes, which will be equal to 
     266 *                  the size of one whole packet. 
     267 * 
     268 * @param user_data User data associated with the stream. 
     269 * @param frame     Audio frame, which buffer is to be filled in by 
     270 *                  the application. 
     271 * 
     272 * @return          Returning non-PJ_SUCCESS will cause the audio stream 
     273 *                  to stop 
     274 */ 
     275typedef pj_status_t (*pjmedia_aud_play_cb)(void *user_data, 
     276                                           pjmedia_frame *frame); 
    253277 
    254278/** 
     
    256280 * packet worth of audio samples. 
    257281 * 
    258  * @param user_data     User data associated with the stream. 
    259  * @param ts            Timestamp, in samples. 
    260  * @param output        Buffer containing the captured audio samples. 
    261  * @param size          The size of the data in the buffer, in bytes. 
    262  * 
    263  * @return              Non-zero to stop the stream. 
    264  */ 
    265 typedef pj_status_t (*pjmedia_aud_rec_cb)(/* in */   void *user_data, 
    266                                           /* in */   const pj_timestamp *ts, 
    267                                           /* in */   void *input, 
    268                                           /* in*/    unsigned size); 
     282 * @param user_data User data associated with the stream. 
     283 * @param frame     Captured frame. 
     284 * 
     285 * @return          Returning non-PJ_SUCCESS will cause the audio stream 
     286 *                  to stop 
     287 */ 
     288typedef pj_status_t (*pjmedia_aud_rec_cb)(void *user_data, 
     289                                          pjmedia_frame *frame); 
    269290 
    270291/** 
     
    335356 
    336357    /**  
    337      * Set the audio route. This setting is optional, and will only be used 
    338      * if PJMEDIA_AUD_DEV_CAP_ROUTE is set in the flags. 
    339      */ 
    340     pjmedia_aud_dev_route route; 
     358     * Set the audio output route. This setting is optional, and will only be 
     359     * used if PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE is set in the flags. 
     360     */ 
     361    pjmedia_aud_dev_route out_route; 
    341362 
    342363    /** 
     
    546567#define PJMEDIA_EAUD_INVDEV     -1 
    547568 
     569/* Found no devices */ 
     570#define PJMEDIA_EAUD_NODEV      -1 
     571 
     572/* Unknown system error */ 
     573#define PJMEDIA_EAUD_SYSERR     -1 
     574 
     575 
    548576/** 
    549577 * @) 
Note: See TracChangeset for help on using the changeset viewer.