Changeset 3174
- Timestamp:
- May 17, 2010 12:51:06 PM (14 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 7 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk
- Property svn:mergeinfo changed
/pjproject/branches/projects/iphone (added) merged: 3127,3167,3173
- Property svn:mergeinfo changed
-
pjproject/trunk/pjmedia/build/Makefile
r3102 r3174 73 73 export PJMEDIA_AUDIODEV_SRCDIR = ../src/pjmedia-audiodev 74 74 export PJMEDIA_AUDIODEV_OBJS += audiodev.o audiotest.o errno.o \ 75 legacy_dev.o null_dev.o pa_dev.o wmme_dev.o alsa_dev.o 75 coreaudio_dev.o legacy_dev.o null_dev.o pa_dev.o wmme_dev.o \ 76 alsa_dev.o 76 77 export PJMEDIA_AUDIODEV_CFLAGS += $(_CFLAGS) 77 78 -
pjproject/trunk/pjmedia/include/pjmedia-audiodev/audiodev.h
r3159 r3174 202 202 203 203 /** Route to earpiece */ 204 PJMEDIA_AUD_DEV_ROUTE_EARPIECE = 2 204 PJMEDIA_AUD_DEV_ROUTE_EARPIECE = 2, 205 206 /** Route to paired Bluetooth device */ 207 PJMEDIA_AUD_DEV_ROUTE_BLUETOOTH = 4 205 208 206 209 } pjmedia_aud_dev_route; -
pjproject/trunk/pjmedia/include/pjmedia-audiodev/config.h
r3135 r3174 72 72 #ifndef PJMEDIA_AUDIO_DEV_HAS_NULL_AUDIO 73 73 # define PJMEDIA_AUDIO_DEV_HAS_NULL_AUDIO 0 74 #endif 75 76 77 /** 78 * This setting controls whether coreaudio support should be included. 79 */ 80 #ifndef PJMEDIA_AUDIO_DEV_HAS_COREAUDIO 81 # define PJMEDIA_AUDIO_DEV_HAS_COREAUDIO 1 74 82 #endif 75 83 -
pjproject/trunk/pjmedia/include/pjmedia-audiodev/errno.h
r2506 r3174 90 90 ((int)PJMEDIA_AUDIODEV_WMME_OUT_ERROR_START+err) 91 91 92 93 /** 94 * Mapping from CoreAudio error codes to pjmedia error space. 95 */ 96 #define PJMEDIA_AUDIODEV_COREAUDIO_ERRNO_START \ 97 (PJMEDIA_AUDIODEV_ERRNO_START+20000) 98 #define PJMEDIA_AUDIODEV_COREAUDIO_ERRNO_END \ 99 (PJMEDIA_AUDIODEV_COREAUDIO_ERRNO_START + 20000 -1) 100 /** 101 * Convert CoreAudio error code to PJLIB error code. 102 * CoreAudio error code range: 0 >= err >= -10000 103 */ 104 #define PJMEDIA_AUDIODEV_ERRNO_FROM_COREAUDIO(err) \ 105 ((int)PJMEDIA_AUDIODEV_COREAUDIO_ERRNO_START-err) 92 106 93 107 /************************************************************ -
pjproject/trunk/pjmedia/src/pjmedia-audiodev/audiodev.c
r3159 r3174 71 71 #endif 72 72 73 #if PJMEDIA_AUDIO_DEV_HAS_COREAUDIO 74 pjmedia_aud_dev_factory* pjmedia_coreaudio_factory(pj_pool_factory *pf); 75 #endif 76 73 77 #if PJMEDIA_AUDIO_DEV_HAS_ALSA 74 78 pjmedia_aud_dev_factory* pjmedia_alsa_factory(pj_pool_factory *pf); … … 379 383 #if PJMEDIA_AUDIO_DEV_HAS_ALSA 380 384 aud_subsys.drv[aud_subsys.drv_cnt++].create = &pjmedia_alsa_factory; 385 #endif 386 #if PJMEDIA_AUDIO_DEV_HAS_COREAUDIO 387 aud_subsys.drv[aud_subsys.drv_cnt++].create = &pjmedia_coreaudio_factory; 381 388 #endif 382 389 #if PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO -
pjproject/trunk/pjmedia/src/pjmedia-audiodev/coreaudio_dev.c
r3127 r3174 24 24 #if PJMEDIA_AUDIO_DEV_HAS_COREAUDIO 25 25 26 #include "TargetConditionals.h" 27 #if TARGET_OS_IPHONE 28 #define COREAUDIO_MAC 0 29 #else 30 #define COREAUDIO_MAC 1 31 #endif 32 26 33 #include <AudioUnit/AudioUnit.h> 27 34 #if !COREAUDIO_MAC … … 29 36 30 37 #define AudioDeviceID unsigned 38 39 /* For iPhone 2.x and earlier */ 40 #if __IPHONE_OS_VERSION_MIN_REQUIRED <= __IPHONE_2_2 41 #define kAudioUnitSubType_VoiceProcessingIO kAudioUnitSubType_RemoteIO 42 #define kAudioSessionProperty_OverrideCategoryEnableBluetoothInput -1 43 #endif 44 31 45 #endif 32 46 … … 40 54 #define AudioComponentInstanceDispose CloseComponent 41 55 #endif 56 42 57 43 58 #define THIS_FILE "coreaudio_dev.c" … … 194 209 AudioDeviceID *dev_ids; 195 210 UInt32 buf_size, dev_size, size = sizeof(AudioDeviceID); 196 AudioBufferList *buf ;211 AudioBufferList *buf = NULL; 197 212 OSStatus ostatus; 198 213 #endif … … 724 739 725 740 if (inID == kAudioSessionProperty_AudioRouteChange) { 726 pj_status_t status;727 741 728 742 PJ_LOG(3, (THIS_FILE, "audio route changed")); -
pjproject/trunk/pjmedia/src/pjmedia-audiodev/errno.c
r2506 r3174 76 76 #if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING != 0) 77 77 78 79 /* See if the error comes from Core Audio. */ 80 #if PJMEDIA_AUDIO_DEV_HAS_COREAUDIO 81 if (statcode >= PJMEDIA_AUDIODEV_COREAUDIO_ERRNO_START && 82 statcode <= PJMEDIA_AUDIODEV_COREAUDIO_ERRNO_END) 83 { 84 int ca_err = PJMEDIA_AUDIODEV_COREAUDIO_ERRNO_START - statcode; 85 86 PJ_UNUSED_ARG(ca_err); 87 // TODO: create more helpful error messages 88 errstr.ptr = buf; 89 pj_strcpy2(&errstr, "Core audio error"); 90 return errstr; 91 } else 92 #endif 93 78 94 /* See if the error comes from PortAudio. */ 79 95 #if PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO
Note: See TracChangeset
for help on using the changeset viewer.