Changeset 2468 for pjproject/branches/projects/aps-direct/pjmedia/include/pjmedia-audiodev/audiodev.h
- Timestamp:
- Feb 21, 2009 2:21:59 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/aps-direct/pjmedia/include/pjmedia-audiodev/audiodev.h
r2466 r2468 18 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 #ifndef __ AUDIODEV_H__21 #define __ AUDIODEV_H__20 #ifndef __PJMEDIA_AUDIODEV_AUDIODEV_H__ 21 #define __PJMEDIA_AUDIODEV_AUDIODEV_H__ 22 22 23 23 /** … … 52 52 */ 53 53 54 /** Device identifier */ 55 typedef pj_int32_t pjmedia_aud_dev_id; 56 57 /** Constant to denote default ID */ 58 #define PJMEDIA_AUD_DEV_DEFAULT_ID (-1) 54 /** 55 * Type for device index. 56 */ 57 typedef pj_int32_t pjmedia_aud_dev_index; 58 59 /** 60 * Constant to denote default device 61 */ 62 #define PJMEDIA_AUD_DEV_DEFAULT (-1) 63 64 /** 65 * Type for device unique identifier. The unique device ID can be used to save 66 * a reference to a particular device across software reboots. 67 */ 68 typedef pj_uint32_t pjmedia_aud_dev_uid; 59 69 60 70 … … 67 77 * 68 78 * Application can also set the specific features/capabilities when opening 69 * the audio stream by setting the \a flags member of #pjmedia_aud_ dev_param79 * the audio stream by setting the \a flags member of #pjmedia_aud_param 70 80 * structure. 71 81 * … … 118 128 * the audio volume in percent. 119 129 */ 120 PJMEDIA_AUD_DEV_CAP_INPUT_SIGNAL_ VOLUME= 32,130 PJMEDIA_AUD_DEV_CAP_INPUT_SIGNAL_METER = 32, 121 131 122 132 /** … … 125 135 * the audio volume in percent. 126 136 */ 127 PJMEDIA_AUD_DEV_CAP_OUTPUT_SIGNAL_ VOLUME= 64,137 PJMEDIA_AUD_DEV_CAP_OUTPUT_SIGNAL_METER = 64, 128 138 129 139 /** … … 142 152 /** 143 153 * The audio device has echo cancellation feature. The value of this 144 * capability is a n integercontaining boolean PJ_TRUE or PJ_FALSE.154 * capability is a pj_bool_t containing boolean PJ_TRUE or PJ_FALSE. 145 155 */ 146 156 PJMEDIA_AUD_DEV_CAP_EC = 512, … … 155 165 /** 156 166 * The audio device has voice activity detection feature. The value 157 * of this capability is a n integercontaining boolean PJ_TRUE or167 * of this capability is a pj_bool_t containing boolean PJ_TRUE or 158 168 * PJ_FALSE. 159 169 */ … … 162 172 /** 163 173 * The audio device has comfort noise generation feature. The value 164 * of this capability is a n integercontaining boolean PJ_TRUE or174 * of this capability is a pj_bool_t containing boolean PJ_TRUE or 165 175 * PJ_FALSE. 166 176 */ … … 169 179 /** 170 180 * The audio device has packet loss concealment feature. The value 171 * of this capability is a n integercontaining boolean PJ_TRUE or181 * of this capability is a pj_bool_t containing boolean PJ_TRUE or 172 182 * PJ_FALSE. 173 183 */ … … 226 236 * The underlying driver name 227 237 */ 228 char driver[ 128];238 char driver[32]; 229 239 230 240 /** … … 290 300 291 301 /** 292 * This structure specifies the parameters to open the audio devicestream.293 */ 294 typedef struct pjmedia_aud_ dev_param302 * This structure specifies the parameters to open the audio stream. 303 */ 304 typedef struct pjmedia_aud_param 295 305 { 296 306 /** … … 303 313 * direction includes input/capture direction. 304 314 */ 305 pjmedia_aud_dev_i drec_id;315 pjmedia_aud_dev_index rec_id; 306 316 307 317 /** … … 309 319 * direction includes output/playback direction. 310 320 */ 311 pjmedia_aud_dev_i dplay_id;321 pjmedia_aud_dev_index play_id; 312 322 313 323 /** … … 387 397 pj_bool_t cng_enabled; 388 398 389 } pjmedia_aud_ dev_param;399 } pjmedia_aud_param; 390 400 391 401 … … 432 442 433 443 /** 444 * Get string info for the specified capability. 445 * 446 * @param cap The capability ID. 447 * @param p_desc Optional pointer which will be filled with longer 448 * description about the capability. 449 * 450 * @return Capability name. 451 */ 452 PJ_DECL(const char*) pjmedia_aud_dev_cap_name(pjmedia_aud_dev_cap cap, 453 const char **p_desc); 454 455 456 /** 434 457 * Get the number of sound devices installed in the system. 435 458 * … … 438 461 PJ_DECL(unsigned) pjmedia_aud_dev_count(void); 439 462 440 441 /**442 * Enumerate device ID's.443 *444 * @param max_count Maximum number of device id's to retrieve.445 * @param ids Array to receive the device id's.446 *447 * @return The actual number of device id's filled in.448 */449 PJ_DECL(unsigned) pjmedia_aud_dev_enum(unsigned max_count,450 pjmedia_aud_dev_id ids[]);451 463 452 464 /** … … 460 472 * error code. 461 473 */ 462 PJ_DECL(pj_status_t) pjmedia_aud_dev_get_info(pjmedia_aud_dev_i did,474 PJ_DECL(pj_status_t) pjmedia_aud_dev_get_info(pjmedia_aud_dev_index id, 463 475 pjmedia_aud_dev_info *info); 476 477 478 /** 479 * Lookup device index based on the driver and device name. 480 * 481 * @param drv_name The driver name. 482 * @param dev_name The device name. 483 * 484 * @return PJ_SUCCESS if the device can be found. 485 */ 486 PJ_DECL(pj_status_t) pjmedia_aud_dev_lookup(const char *drv_name, 487 const char *dev_name, 488 pjmedia_aud_dev_index *id); 464 489 465 490 … … 475 500 * error code. 476 501 */ 477 PJ_DECL(pj_status_t) pjmedia_aud_dev_default_param(pjmedia_aud_dev_i did,478 pjmedia_aud_ dev_param *param);502 PJ_DECL(pj_status_t) pjmedia_aud_dev_default_param(pjmedia_aud_dev_index id, 503 pjmedia_aud_param *param); 479 504 480 505 … … 493 518 * error code. 494 519 */ 495 PJ_DECL(pj_status_t) pjmedia_aud_stream_create(const pjmedia_aud_ dev_param *param,520 PJ_DECL(pj_status_t) pjmedia_aud_stream_create(const pjmedia_aud_param *param, 496 521 pjmedia_aud_rec_cb rec_cb, 497 522 pjmedia_aud_play_cb play_cb, 498 523 void *user_data, 499 pjmedia_aud_stream **p_ aud_strm);524 pjmedia_aud_stream **p_strm); 500 525 501 526 /** … … 510 535 */ 511 536 PJ_DECL(pj_status_t) pjmedia_aud_stream_get_param(pjmedia_aud_stream *strm, 512 pjmedia_aud_ dev_param *param);537 pjmedia_aud_param *param); 513 538 514 539 /** … … 581 606 #define PJMEDIA_EAUD_NOTREADY -1 582 607 608 /* Invalid audio capability or audio capability not supported */ 609 #define PJMEDIA_EAUD_INVCAP -1 610 583 611 /* Unknown system error */ 584 612 #define PJMEDIA_EAUD_SYSERR -1 … … 592 620 593 621 594 #endif /* __ AUDIODEV_H__ */595 622 #endif /* __PJMEDIA_AUDIODEV_AUDIODEV_H__ */ 623
Note: See TracChangeset
for help on using the changeset viewer.