Changes between Version 3 and Version 4 of Audio_Dev_API
- Timestamp:
- Feb 20, 2009 10:35:45 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Audio_Dev_API
v3 v4 6 6 The '''PJMEDIA Audio Device API''' is a new sound device abstraction API/library in PJMEDIA, introduced in PJSIP version 1.1, deprecating the [http://www.pjsip.org/pjmedia/docs/html/group__PJMED__SND.htm existing sound device API]. 7 7 8 [[BR]] 9 8 10 == Background == 9 11 10 12 The '''PJMEDIA Audio Device API''' was introduced as part of the implementation of [wiki:Nokia_APS_VAS_Direct APS-Direct] implementation in PJSIP version 1.1. During the design and implementation of [wiki:Nokia_APS_VAS_Direct APS-Direct] project, it was clear that the [http://www.pjsip.org/pjmedia/docs/html/group__PJMED__SND.htm existing sound device API] lacks many features that are needed to support the project. We had the choice to either patch the existing API with new features that are specific to Nokia APS, and potentially break existing applications anyway, or design a new sound device API to support all these new features as well as future enhancements, while providing some support for the old sound API and a clear migration path to the new API. 11 13 14 15 [[BR]] 12 16 13 17 == Features == … … 30 34 The new API supports multiple audio backends (may be called ''factories'' or ''drivers'' in the code) to be active simultaneously, and audio backends may be added or removed during run-time. 31 35 36 [[BR]] 32 37 33 38 == Migration Path == … … 56 61 - you have completely ported your application to use the new API 57 62 58 '''Setting 2) {{{PJMEDIA_AUDIO_API = PJMEDIA_AUDIO_API_OLD_ONLY}}}''' :: 59 With this setting, only old sound API is supported. This is useful for applications that implement their own sound device abstraction and wishes to continue to use old API to access the sound device. 60 61 Use this setting if: 62 - you have your own sound device implementation, using the old API 63 - you have application which uses the old API to access the sound device 64 65 '''Setting 3) {{{PJMEDIA_AUDIO_API = PJMEDIA_AUDIO_API_HAS_OLD_API}}}''' :: 63 '''Setting 2) {{{PJMEDIA_AUDIO_API = PJMEDIA_AUDIO_API_HAS_OLD_API}}}''' :: 66 64 With this setting (this is the default setting), application can use the old sound device API to access audio devices provided by the new audio device API. 67 65 68 66 Use this setting if: 69 - you are accessing sound devices which have been implemented usingnew API67 - you are accessing sound devices which have been ported to the new API 70 68 - you want to access the sound device using '''both''' old or new API's. 71 69 72 '''Setting 4) {{{PJMEDIA_AUDIO_API = PJMEDIA_AUDIO_API_HAS_OLD_DEVICE}}}''' :: 70 What this setting does: 71 - it creates a sound device implementation based on the old API, but the implementation uses/accesses the new audio device API. 72 73 '''Setting 3) {{{PJMEDIA_AUDIO_API = PJMEDIA_AUDIO_API_HAS_OLD_DEVICE}}}''' :: 73 74 This setting enables old sound device implementation to be accessed via '''both''' old and new API's. 74 75 … … 77 78 - you want to access the sound device using '''both''' old or new API's. 78 79 80 What this setting does: 81 - the new audio device API will create a wrapper for the old sound device implementation, effectively enabling the sound device implementation to be accessed via old or new API. 82 83 84 === Migration strategy === 85 86 Use the following checklist to select which setting is appropriate for your build. 87 88 1. I use sound devices provided by PJMEDIA (I don't have my own sound device implementation) 89 a. I haven't changed my application to use the new API 90 - use setting 2 (the default) 91 a. I have changed my application to use the new API 92 - you may use setting 1 to make sure that everything has been ported to the new API, or otherwise use setting 2. 93 1. I have my own sound device implementation, based on old API 94 a. I haven't changed my application to use the new API 95 - use setting 3 96 a. I have changed my application to use the new API 97 - you may use setting 1 to make sure that everything has been ported to the new API, or otherwise use setting 3. 98 1. I have ported my sound device implementation to the new API 99 a. I haven't changed my application to use the new API 100 - use setting 2 (the default) 101 a. I have changed my application to use the new API 102 - you may use setting 1 to make sure that everything has been ported to the new API, or otherwise use setting 2. 103