Changeset 2459 for pjproject/branches/projects/aps-direct/pjmedia/include/pjmedia-audiodev/audiodev.h
- Timestamp:
- Feb 18, 2009 1:55:03 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/aps-direct/pjmedia/include/pjmedia-audiodev/audiodev.h
r2458 r2459 25 25 * @brief Audio device API. 26 26 */ 27 #include <pjmedia/ types.h>27 #include <pjmedia/port.h> 28 28 #include <pj/pool.h> 29 29 … … 100 100 101 101 /** 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 117 138 * enumeration. 118 139 */ 119 PJMEDIA_AUD_DEV_CAP_ ROUTE = 32,140 PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE = 256, 120 141 121 142 /** … … 123 144 * capability is an integer containing boolean PJ_TRUE or PJ_FALSE. 124 145 */ 125 PJMEDIA_AUD_DEV_CAP_EC = 64,146 PJMEDIA_AUD_DEV_CAP_EC = 512, 126 147 127 148 /** … … 130 151 * echo tail in milliseconds. 131 152 */ 132 PJMEDIA_AUD_DEV_CAP_EC_TAIL = 1 28,153 PJMEDIA_AUD_DEV_CAP_EC_TAIL = 1024, 133 154 134 155 /** … … 137 158 * PJ_FALSE. 138 159 */ 139 PJMEDIA_AUD_DEV_CAP_VAD = 2 56,160 PJMEDIA_AUD_DEV_CAP_VAD = 2048, 140 161 141 162 /** … … 144 165 * PJ_FALSE. 145 166 */ 146 PJMEDIA_AUD_DEV_CAP_CNG = 512,167 PJMEDIA_AUD_DEV_CAP_CNG = 4096, 147 168 148 169 /** … … 151 172 * PJ_FALSE. 152 173 */ 153 PJMEDIA_AUD_DEV_CAP_PLC = 1024174 PJMEDIA_AUD_DEV_CAP_PLC = 8192 154 175 155 176 } pjmedia_aud_dev_cap; … … 239 260 * buffer with audio samples. 240 261 * 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 */ 275 typedef pj_status_t (*pjmedia_aud_play_cb)(void *user_data, 276 pjmedia_frame *frame); 253 277 254 278 /** … … 256 280 * packet worth of audio samples. 257 281 * 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 */ 288 typedef pj_status_t (*pjmedia_aud_rec_cb)(void *user_data, 289 pjmedia_frame *frame); 269 290 270 291 /** … … 335 356 336 357 /** 337 * Set the audio route. This setting is optional, and will only be used338 * 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; 341 362 342 363 /** … … 546 567 #define PJMEDIA_EAUD_INVDEV -1 547 568 569 /* Found no devices */ 570 #define PJMEDIA_EAUD_NODEV -1 571 572 /* Unknown system error */ 573 #define PJMEDIA_EAUD_SYSERR -1 574 575 548 576 /** 549 577 * @)
Note: See TracChangeset
for help on using the changeset viewer.