Changeset 5426
- Timestamp:
- Aug 23, 2016 9:13:28 AM (8 years ago)
- Location:
- pjproject/trunk/pjmedia
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/include/pjmedia/audiodev.h
r5255 r5426 182 182 183 183 /** 184 * Support for audio input routing . The value of this capability is an185 * i nteger containing #pjmedia_aud_dev_route enumeration.184 * Support for audio input routing/source. The value of this capability 185 * is an integer containing #pjmedia_aud_dev_route enumeration. 186 186 */ 187 187 PJMEDIA_AUD_DEV_CAP_INPUT_ROUTE = 128, 188 PJMEDIA_AUD_DEV_CAP_INPUT_SOURCE = 128, 188 189 189 190 /** … … 237 238 238 239 /** 239 * This enumeration describes audio routing setting.240 * This enumeration describes audio routing/source setting. 240 241 */ 241 242 typedef enum pjmedia_aud_dev_route 242 243 { 243 244 /** 244 * Default route, it is the default audio route of the audio framework 245 * backend, as in opening audio device without specifying any route 246 * setting or with specifying neutral route setting. 245 * Default route/source, it is the default audio route/source of 246 * the audio framework backend, as in opening audio device without 247 * specifying any route/source setting or with specifying neutral 248 * route/source setting. 247 249 */ 248 250 PJMEDIA_AUD_DEV_ROUTE_DEFAULT = 0, … … 255 257 256 258 /** Route to paired Bluetooth device */ 257 PJMEDIA_AUD_DEV_ROUTE_BLUETOOTH = 4 259 PJMEDIA_AUD_DEV_ROUTE_BLUETOOTH = 4, 260 261 /** 262 * Custom audio route/source, specific to each audio device 263 * backend. 264 * 265 * For Android JNI audio device, the default is 266 * VOICE_COMMUNICATION (7). To change it to another value, set 267 * the input source capability of pjmedia_aud_param accordingly. 268 * For example: 269 * pjmedia_aud_param_set_cap(¶m, PJMEDIA_AUD_DEV_CAP_INPUT_SOURCE, 270 * // 4 is VOICE_CALL 271 * PJMEDIA_AUD_DEV_ROUTE_CUSTOM | 4); 272 */ 273 PJMEDIA_AUD_DEV_ROUTE_CUSTOM = 128 258 274 259 275 } pjmedia_aud_dev_route; … … 300 316 301 317 /** 302 * Supported audio device routes , as bitmask combination of318 * Supported audio device routes/sources, as bitmask combination of 303 319 * #pjmedia_aud_dev_route. The value may be zero if the device 304 * does not support audio routing.320 * does not support changing audio routes/sources. 305 321 */ 306 322 unsigned routes; … … 436 452 437 453 /** 438 * Set the audio input route. This setting is optional, and will only be 439 * used if PJMEDIA_AUD_DEV_CAP_INPUT_ROUTE is set in the flags. 454 * Set the audio input route/source. This setting is optional, and 455 * will only be used if PJMEDIA_AUD_DEV_CAP_INPUT_ROUTE/ 456 * PJMEDIA_AUD_DEV_CAP_INPUT_SOURCE is set in the flags. 440 457 */ 441 458 pjmedia_aud_dev_route input_route; -
pjproject/trunk/pjmedia/src/pjmedia-audiodev/android_jni_dev.c
r5357 r5426 484 484 pj_ansi_strcpy(info->name, "Android JNI"); 485 485 info->default_samples_per_sec = 8000; 486 info->caps = PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING; 486 info->caps = PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING | 487 PJMEDIA_AUD_DEV_CAP_INPUT_SOURCE; 487 488 info->input_count = 1; 488 489 info->output_count = 1; 490 info->routes = PJMEDIA_AUD_DEV_ROUTE_CUSTOM; 489 491 490 492 return PJ_SUCCESS; … … 666 668 jobject record_obj; 667 669 int mic_source = 0; /* DEFAULT: default audio source */ 670 671 if ((param->flags & PJMEDIA_AUD_DEV_CAP_INPUT_SOURCE) && 672 (param->input_route & PJMEDIA_AUD_DEV_ROUTE_CUSTOM)) 673 { 674 mic_source = param->input_route & ~PJMEDIA_AUD_DEV_ROUTE_CUSTOM; 675 } 668 676 669 677 /* Get pointer to the constructor */
Note: See TracChangeset
for help on using the changeset viewer.