Show
Ignore:
Timestamp:
10/20/07 08:32:47 (15 years ago)
Author:
ppalmers
Message:

- Implement more complete mixer support for the saffire pro
- fix some cleanup issues with control elements

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/libcontrol/Element.cpp

    r581 r661  
    8181Container::addElement(Element *e) 
    8282{ 
    83     assert(e); 
     83    if (e==NULL) { 
     84        debugWarning("Cannot add NULL element\n"); 
     85        return false; 
     86    } 
    8487 
    8588    debugOutput( DEBUG_LEVEL_VERBOSE, "Adding Element %s to %s\n", 
     
    123126} 
    124127 
     128bool 
     129Container::clearElements(bool delete_pointers)  
     130{ 
     131    while(m_Children.size()) { 
     132        Element *e=m_Children[0]; 
     133        deleteElement(e); 
     134        if (delete_pointers) delete e; 
     135    } 
     136    return true; 
     137} 
     138 
    125139void 
    126140Container::show() 
     
    137151} 
    138152 
     153void 
     154Container::setVerboseLevel(int l) 
     155{ 
     156    debugOutput( DEBUG_LEVEL_VERBOSE, "Setting verbose level to %d...\n", l ); 
     157    for ( ElementVectorIterator it = m_Children.begin(); 
     158      it != m_Children.end(); 
     159      ++it ) 
     160    { 
     161        (*it)->setVerboseLevel(l); 
     162    } 
     163} 
     164 
    139165} // namespace Control 
  • trunk/libffado/src/libcontrol/Element.h

    r581 r661  
    101101    virtual bool deleteElement(Element *e); 
    102102    virtual bool clearElements() 
    103         {m_Children.clear(); return true;}; 
     103        {return clearElements(false);}; 
     104    virtual bool clearElements(bool delete_pointers); 
    104105 
    105106    unsigned int countElements() 
     
    110111 
    111112    virtual void show(); 
     113    virtual void setVerboseLevel(int l); 
     114 
    112115protected: 
    113116    ElementVector m_Children;