Changeset 1488

Show
Ignore:
Timestamp:
11/25/08 18:27:37 (12 years ago)
Author:
jwoithe
Message:

* MOTU: confirm fix in rev 1487. Always explicitly send silence when a port is disabled regardless of whatever happens to be in the port's buffer.
* MOTU: add missing NL in some debugWarning() calls.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/libffado-2.0/src/libstreaming/motu/MotuReceiveStreamProcessor.cpp

    r1419 r1488  
    219219        case Port::E_Audio: 
    220220            if(decodeMotuEventsToPort(static_cast<MotuAudioPort *>(*it), (quadlet_t *)data, offset, nevents)) { 
    221                 debugWarning("Could not decode packet data to port %s",(*it)->getName().c_str()); 
     221                debugWarning("Could not decode packet data to port %s\n",(*it)->getName().c_str()); 
    222222                no_problem=false; 
    223223            } 
     
    225225        case Port::E_Midi: 
    226226             if(decodeMotuMidiEventsToPort(static_cast<MotuMidiPort *>(*it), (quadlet_t *)data, offset, nevents)) { 
    227                  debugWarning("Could not decode packet midi data to port %s",(*it)->getName().c_str()); 
     227                 debugWarning("Could not decode packet midi data to port %s\n",(*it)->getName().c_str()); 
    228228                 no_problem=false; 
    229229             } 
  • branches/libffado-2.0/src/libstreaming/motu/MotuTransmitStreamProcessor.cpp

    r1487 r1488  
    494494      it != m_Ports.end(); 
    495495      ++it ) { 
    496         // If this port is disabled, don't process it 
    497         // if((*it)->isDisabled()) {continue;}; 
     496        // If this port is disabled, unconditionally send it silence. 
     497        if((*it)->isDisabled()) { 
     498          if (encodeSilencePortToMotuEvents(static_cast<MotuAudioPort *>(*it), (quadlet_t *)data, offset, nevents)) { 
     499            debugWarning("Could not encode silence for disabled port %s to Motu events\n",(*it)->getName().c_str()); 
     500            // Don't treat this as a fatal error at this point 
     501          } 
     502          continue; 
     503        fi 
    498504 
    499505        Port *port=(*it); 
     
    503509        case Port::E_Audio: 
    504510            if (encodePortToMotuEvents(static_cast<MotuAudioPort *>(*it), (quadlet_t *)data, offset, nevents)) { 
    505                 debugWarning("Could not encode port %s to Motu events",(*it)->getName().c_str()); 
     511                debugWarning("Could not encode port %s to Motu events\n",(*it)->getName().c_str()); 
    506512                no_problem=false; 
    507513            } 
     
    509515        case Port::E_Midi: 
    510516             if (encodePortToMotuMidiEvents(static_cast<MotuMidiPort *>(*it), (quadlet_t *)data, offset, nevents)) { 
    511                  debugWarning("Could not encode port %s to Midi events",(*it)->getName().c_str()); 
     517                 debugWarning("Could not encode port %s to Midi events\n",(*it)->getName().c_str()); 
    512518                 no_problem=false; 
    513519             } 
     
    535541        case Port::E_Audio: 
    536542            if (encodeSilencePortToMotuEvents(static_cast<MotuAudioPort *>(*it), (quadlet_t *)data, offset, nevents)) { 
    537                 debugWarning("Could not encode port %s to MBLA events",(*it)->getName().c_str()); 
     543                debugWarning("Could not encode port %s to MBLA events\n",(*it)->getName().c_str()); 
    538544                no_problem = false; 
    539545            } 
     
    541547        case Port::E_Midi: 
    542548            if (encodeSilencePortToMotuMidiEvents(static_cast<MotuMidiPort *>(*it), (quadlet_t *)data, offset, nevents)) { 
    543                 debugWarning("Could not encode port %s to Midi events",(*it)->getName().c_str()); 
     549                debugWarning("Could not encode port %s to Midi events\n",(*it)->getName().c_str()); 
    544550                no_problem = false; 
    545551            }