| 32 | |
| 33 | == Migration Path == |
| 34 | |
| 35 | === Common Tasks === |
| 36 | |
| 37 | 1. The Audio Device API is implemented as a new (static) library called '''pjmedia-audiodev''', under '''pjmedia''' directory. Please add this library into link specifications of your application. |
| 38 | |
| 39 | === Ported Devices === |
| 40 | |
| 41 | The following audio device backends have been ported to the new API: |
| 42 | - !PortAudio (previously pasound.c) |
| 43 | - WMME (previously wmme_sound.c) |
| 44 | - Null implementation (previously nullsound.c) |
| 45 | - APS (previously symbian_sound_aps.cpp) |
| 46 | |
| 47 | === Compatibility settings === |
| 48 | |
| 49 | The following compile time settings/macros have introduced to manage compatibility between old and new API and to assist migration of application and/or sound device implementation to the new API. |
| 50 | |
| 51 | '''Setting 1) {{{PJMEDIA_AUDIO_API = PJMEDIA_AUDIO_API_NEW_ONLY}}}''' :: |
| 52 | This setting will completely deprecate the use of old API, and inclusion of {{{<pjmedia/sound.h>}}} in the code will raise compilation error. |
| 53 | |
| 54 | Use this setting if: |
| 55 | - you are accessing sound devices which have been implemented using the '''new''' API |
| 56 | - you have completely ported your application to use the new API |
| 57 | |
| 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}}}''' :: |
| 66 | 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 | |
| 68 | Use this setting if: |
| 69 | - you are accessing sound devices which have been implemented using new API |
| 70 | - you want to access the sound device using '''both''' old or new API's. |
| 71 | |
| 72 | '''Setting 4) {{{PJMEDIA_AUDIO_API = PJMEDIA_AUDIO_API_HAS_OLD_DEVICE}}}''' :: |
| 73 | This setting enables old sound device implementation to be accessed via '''both''' old and new API's. |
| 74 | |
| 75 | Use this setting if: |
| 76 | - you have your own sound device implementation, using the old API |
| 77 | - you want to access the sound device using '''both''' old or new API's. |
| 78 | |