Ignore:
Timestamp:
Dec 19, 2017 1:45:37 AM (6 years ago)
Author:
nanang
Message:

Close #2077: New PJSUA & PJSUA2 APIs for instantiating extra audio device.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsua2/media.hpp

    r5645 r5717  
    13501350 
    13511351 
     1352/** 
     1353 * Extra audio device. This class allows application to have multiple 
     1354 * sound device instances active concurrently. Application may also use 
     1355 * this class to improve media clock. Normally media clock is driven by 
     1356 * sound device in master port, but unfortunately some sound devices may 
     1357 * produce jittery clock. To improve media clock, application can install 
     1358 * Null Sound Device (i.e: using AudDevManager::setNullDev()), which will 
     1359 * act as a master port, and install the sound device as extra sound device. 
     1360 * Note that extra sound device will not have auto-close upon idle feature. 
     1361 */ 
     1362class ExtraAudioDevice : public AudioMedia 
     1363{ 
     1364public: 
     1365    /** 
     1366     * Constructor 
     1367     * 
     1368     * @param playdev           Playback device ID. 
     1369     * @param recdev            Record device ID. 
     1370     */ 
     1371    ExtraAudioDevice(int playdev, int recdev); 
     1372 
     1373    /** 
     1374     * Destructor 
     1375     */ 
     1376    virtual ~ExtraAudioDevice(); 
     1377 
     1378    /** 
     1379     * Open the audio device using format (e.g.: clock rate, channel count, 
     1380     * samples per frame) matched to the conference bridge's format. 
     1381     */ 
     1382    void open(); 
     1383 
     1384    /** 
     1385     * Close the audio device. 
     1386     */ 
     1387    void close(); 
     1388 
     1389    /** 
     1390     * Is the extra audio device opened? 
     1391     * 
     1392     * @return                  'true' if it is opened. 
     1393     */ 
     1394    bool isOpened(); 
     1395 
     1396protected: 
     1397    int playDev; 
     1398    int recDev; 
     1399    void *ext_snd_dev; 
     1400}; 
     1401 
     1402 
    13521403/************************************************************************* 
    13531404* Video media 
Note: See TracChangeset for help on using the changeset viewer.