Show
Ignore:
Timestamp:
03/23/08 10:35:01 (16 years ago)
Author:
ppalmers
Message:

make quatafire mixer more useful

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/support/dbus/control-interface.xml

    r965 r973  
    5353          <arg type="d" name="value" direction="out"/> 
    5454      </method> 
     55      <method name="setValueIdx"> 
     56          <arg type="i" name="idx" direction="in"/> 
     57          <arg type="d" name="value" direction="in"/> 
     58          <arg type="d" name="value" direction="out"/> 
     59      </method> 
     60      <method name="getValueIdx"> 
     61          <arg type="i" name="idx" direction="in"/> 
     62          <arg type="d" name="value" direction="out"/> 
     63      </method> 
    5564  </interface> 
    5665 
     
    6170      </method> 
    6271      <method name="getValue"> 
     72          <arg type="i" name="value" direction="out"/> 
     73      </method> 
     74      <method name="setValueIdx"> 
     75          <arg type="i" name="idx" direction="in"/> 
     76          <arg type="i" name="value" direction="in"/> 
     77          <arg type="i" name="value" direction="out"/> 
     78      </method> 
     79      <method name="getValueIdx"> 
     80          <arg type="i" name="idx" direction="in"/> 
    6381          <arg type="i" name="value" direction="out"/> 
    6482      </method> 
  • trunk/libffado/support/dbus/controlserver.cpp

    r965 r973  
    219219} 
    220220 
     221DBus::Double 
     222Continuous::setValueIdx( const DBus::Int32 & idx, const DBus::Double& value ) 
     223{ 
     224    m_Slave.setValue(idx, value); 
     225/*     
     226    SleepRelativeUsec(1000*500); 
     227     
     228    debugOutput( DEBUG_LEVEL_VERBOSE, "setValue(%lf) => %lf\n", value, m_Slave.getValue() ); 
     229     
     230    return m_Slave.getValue();*/ 
     231    return value; 
     232} 
     233 
     234DBus::Double 
     235Continuous::getValueIdx( const DBus::Int32 & idx ) 
     236{ 
     237    double val = m_Slave.getValue(idx); 
     238    debugOutput( DEBUG_LEVEL_VERBOSE, "getValue(%d) => %lf\n", idx, val ); 
     239    return val; 
     240} 
     241 
    221242// --- Discrete 
    222243 
     
    249270} 
    250271 
     272DBus::Int32 
     273Discrete::setValueIdx( const DBus::Int32& idx, const DBus::Int32& value ) 
     274{ 
     275    m_Slave.setValue(idx, value); 
     276     
     277/*    SleepRelativeUsec(1000*500); 
     278    debugOutput( DEBUG_LEVEL_VERBOSE, "setValue(%d) => %d\n", value, m_Slave.getValue() ); 
     279     
     280    return m_Slave.getValue();*/ 
     281    return value; 
     282} 
     283 
     284DBus::Int32 
     285Discrete::getValueIdx( const DBus::Int32& idx ) 
     286{ 
     287    int32_t val = m_Slave.getValue(idx); 
     288    debugOutput( DEBUG_LEVEL_VERBOSE, "getValue(%d) => %d\n", idx, val ); 
     289    return val; 
     290} 
     291 
    251292// --- Text 
    252293 
  • trunk/libffado/support/dbus/controlserver.h

    r965 r973  
    9797    DBus::Double setValue( const DBus::Double & value ); 
    9898    DBus::Double getValue( ); 
     99    DBus::Double setValueIdx( const DBus::Int32 & idx, 
     100                              const DBus::Double & value ); 
     101    DBus::Double getValueIdx( const DBus::Int32 & idx ); 
    99102 
    100103private: 
     
    113116    DBus::Int32 setValue( const DBus::Int32 & value ); 
    114117    DBus::Int32 getValue( ); 
     118    DBus::Int32 setValueIdx( const DBus::Int32 & idx, 
     119                             const DBus::Int32 & value ); 
     120    DBus::Int32 getValueIdx( const DBus::Int32 & idx ); 
    115121 
    116122private: