Ignore:
Timestamp:
Dec 4, 2013 7:05:35 AM (8 years ago)
Author:
bennylp
Message:

Re #1519: added AudioMedia? for the sound device

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/pjsua2/pjsip/src/pjsua2/media.cpp

    r4672 r4676  
    356356    extFmt.clear(); 
    357357} 
     358 
     359/////////////////////////////////////////////////////////////////////////////// 
     360/* 
     361 * Simple AudioMedia class for sound device. 
     362 */ 
     363class DevAudioMedia : public AudioMedia 
     364{ 
     365public: 
     366    DevAudioMedia(); 
     367}; 
     368 
     369DevAudioMedia::DevAudioMedia() 
     370{ 
     371    this->id = 0; 
     372    registerMediaPort(NULL); 
     373} 
     374 
    358375/////////////////////////////////////////////////////////////////////////////// 
    359376/* Audio device operations. */ 
    360377 
     378AudDevManager::AudDevManager() 
     379{ 
     380    devMedia = new DevAudioMedia; 
     381} 
     382 
     383AudDevManager::~AudDevManager() 
     384{ 
     385    delete devMedia; 
     386    clearAudioDevList(); 
     387} 
     388 
    361389int AudDevManager::getCaptureDev() const throw(Error) 
    362390{ 
     
    364392} 
    365393 
     394AudioMedia &AudDevManager::getCaptureDevMedia() throw(Error) 
     395{ 
     396    return *devMedia; 
     397} 
     398 
    366399int AudDevManager::getPlaybackDev() const throw(Error) 
    367400{ 
    368401    return getActiveDev(false); 
     402} 
     403 
     404AudioMedia &AudDevManager::getPlaybackDevMedia() throw(Error) 
     405{ 
     406    return *devMedia; 
    369407} 
    370408 
     
    682720} 
    683721 
    684 AudDevManager::AudDevManager() 
    685 { 
    686  
    687  
    688 } 
    689  
    690 AudDevManager::~AudDevManager() 
    691 { 
    692     clearAudioDevList(); 
    693 } 
    694  
    695722void AudDevManager::clearAudioDevList() 
    696723{ 
Note: See TracChangeset for help on using the changeset viewer.