Changes between Version 3 and Version 4 of Audio_Dev_API


Ignore:
Timestamp:
Feb 20, 2009 10:35:45 AM (15 years ago)
Author:
bennylp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Audio_Dev_API

    v3 v4  
    66The '''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]. 
    77 
     8[[BR]] 
     9 
    810== Background == 
    911 
    1012The '''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. 
    1113 
     14 
     15[[BR]] 
    1216 
    1317== Features == 
     
    3034 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. 
    3135 
     36[[BR]] 
    3237 
    3338== Migration Path == 
     
    5661  - you have completely ported your application to use the new API 
    5762 
    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}}}''' :: 
    6664With 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. 
    6765 
    6866Use this setting if: 
    69  - you are accessing sound devices which have been implemented using new API 
     67 - you are accessing sound devices which have been ported to the new API 
    7068 - you want to access the sound device using '''both''' old or new API's. 
    7169 
    72  '''Setting 4) {{{PJMEDIA_AUDIO_API = PJMEDIA_AUDIO_API_HAS_OLD_DEVICE}}}''' :: 
     70What 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}}}''' :: 
    7374This setting enables old sound device implementation to be accessed via '''both''' old and new API's. 
    7475 
     
    7778 - you want to access the sound device using '''both''' old or new API's. 
    7879 
     80What 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 
     86Use 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