35 | | To use APS-Direct also means that you are restricted to use the audio switchboard at compile time (audio switchboard will be explained later). This means that you loose the capability of mixing audio with PJSUA-LIB, as well as several other restrictions on your audio routing arrangements. |
36 | | |
37 | | |
38 | | == No access to PCM data == |
39 | | |
40 | | This may sound obvious, but it really means that many PJMEDIA features will not be available to use when the sound device is opened in codec mode (such as: tone generator, PCM WAV files, echo canceller, conference bridge mixing, software based codecs, etc.). Some of these fatures, such as EC and codecs, will use the corresponding features in the sound device hardware, but some others such as tone generator simply cannot be used unless the sound device is closed and re-opened in PCM mode. |
41 | | |
42 | | == No mixing == |
43 | | |
44 | | As will later be explained, we have developed a new variant of conference bridge called ''audio switchboard''. This object has the same API as the bridge, but it lacks the mixing capability of the bridge. The implication of this is you can't have two slots transmitting to the same slot in the switchboard. |
45 | | |
46 | | So among other things, you can't have two calls with active and connected to the audio device at the same time. You can have more than one calls, but one of them must be put on-hold. |
47 | | |
48 | | |
49 | | == One format rule == |
50 | | |
51 | | The sound device can only handle one format at a time, meaning that if it is currently opened with G.729 format (for one call for example), you can't feed it with PCM frames for example from the tone generator or PCM WAV files. |
52 | | |
53 | | All PJMEDIA features that work with PCM audio will no longer work if the audio device is currently opened in codec mode. This includes the tone generator (tonegen) and WAV files. If you wish to use any of the features above, you must close the sound device and re-open it in PCM mode. |
54 | | |
55 | | |
| 35 | To use APS-Direct also means that you are restricted to use the audio switchboard at compile time (audio switchboard will be explained later). This means that you loose the capability of mixing audio with PJSUA-LIB, as well as several other restrictions on your audio routing arrangements. Among other things, you can't have two calls active and connected to the audio device at the same time. You can have more than one calls, but one of them must be put on-hold. |
| 36 | |
| 37 | The sound device can only handle one format at a time, meaning that if it is currently opened with G.729 format (for one call for example), you can't feed it with PCM frames for example from the tone generator or PCM WAV files. All PJMEDIA features that work with PCM audio will no longer work if the audio device is currently opened in codec mode. This includes the tone generator (tonegen) and WAV files. If you wish to use any of the features above, you must close the sound device and re-open it in PCM mode. |
| 38 | |
| 39 | |
| 40 | == When APS-Direct is activated == |
| 41 | |
| 42 | APS-Direct is used when passthrough codec is used (and vice versa): |
| 43 | - when APS-Direct is used, the sound device emits and takes encoded audio frames (in contrast to PCM audio frames), and the stream needs special codec which handles this. This special codec is called passthrough codec, since it just do (de)packetization and not the actual encoding/decoding. |
| 44 | - similarly when passthrough codec is selected in the stream, the stream will emit and take encoded audio frames (rather than PCM frames), hence it needs APS-Direct on the other side. |
| 45 | |
| 46 | One important thing to note: '''you may still use software codecs such as Speex and G.722 even when your application is compiled with APS-Direct support'''. When one of these software codecs are selected to be used by the stream, the stream will work as usual (i.e. emitting and taking PCM audio frames) and the audio device should be opened in normal/PCM mode (i.e. non-APS-Direct mode). |