Changeset 862 for trunk/libffado/src
- Timestamp:
- 01/19/08 12:09:55 (16 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/src/libstreaming/generic/StreamProcessor.cpp
r860 r862 1640 1640 bool StreamProcessor::waitForProduce(unsigned int nframes) 1641 1641 { 1642 debugOutput(DEBUG_LEVEL_VERY_VERBOSE, "(%p ) wait ...\n", this);1642 debugOutput(DEBUG_LEVEL_VERY_VERBOSE, "(%p, %s) wait ...\n", this, getTypeString()); 1643 1643 struct timespec ts; 1644 1644 int result; … … 1662 1662 if (result == -1) { 1663 1663 if (errno == ETIMEDOUT) { 1664 debugOutput(DEBUG_LEVEL_VERBOSE, "(%p ) pthread_cond_timedwait() timed out\n", this);1664 debugOutput(DEBUG_LEVEL_VERBOSE, "(%p, %s) pthread_cond_timedwait() timed out\n", this, getTypeString()); 1665 1665 pthread_mutex_unlock(&m_activity_cond_lock); 1666 1666 return false; 1667 1667 } else { 1668 debugError("(%p ) pthread_cond_timedwait error\n", this);1668 debugError("(%p, %s) pthread_cond_timedwait error\n", this, getTypeString()); 1669 1669 pthread_mutex_unlock(&m_activity_cond_lock); 1670 1670 return false; … … 1686 1686 bool StreamProcessor::waitForConsume(unsigned int nframes) 1687 1687 { 1688 debugOutput(DEBUG_LEVEL_VERY_VERBOSE, "(%p ) wait ...\n", this);1688 debugOutput(DEBUG_LEVEL_VERY_VERBOSE, "(%p, %s) wait ...\n", this, getTypeString()); 1689 1689 struct timespec ts; 1690 1690 int result; … … 1705 1705 while(!canConsume(nframes)) { 1706 1706 result = pthread_cond_timedwait(&m_activity_cond, &m_activity_cond_lock, &ts); 1707 1708 1707 if (result == -1) { 1709 1708 if (errno == ETIMEDOUT) { 1710 debugOutput(DEBUG_LEVEL_VERBOSE, "(%p ) pthread_cond_timedwait() timed out\n", this);1709 debugOutput(DEBUG_LEVEL_VERBOSE, "(%p, %s) pthread_cond_timedwait() timed out\n", this, getTypeString()); 1711 1710 pthread_mutex_unlock(&m_activity_cond_lock); 1712 1711 return false; 1713 1712 } else { 1714 debugError("(%p ) pthread_cond_timedwait error\n", this);1713 debugError("(%p, %s) pthread_cond_timedwait error\n", this, getTypeString()); 1715 1714 pthread_mutex_unlock(&m_activity_cond_lock); 1716 1715 return false; … … 1719 1718 } 1720 1719 pthread_mutex_unlock(&m_activity_cond_lock); 1720 debugOutput(DEBUG_LEVEL_VERY_VERBOSE, "(%p, %s) leave ...\n", this, getTypeString()); 1721 1721 return true; 1722 1722 } … … 1732 1732 bool StreamProcessor::canProduce(unsigned int nframes) 1733 1733 { 1734 if(m_in_xrun) return true; 1734 1735 if(m_state == ePS_Running && m_next_state == ePS_Running) { 1735 1736 // check whether we already fullfil the criterion … … 1762 1763 bool StreamProcessor::canConsume(unsigned int nframes) 1763 1764 { 1765 if(m_in_xrun) return true; 1764 1766 if(m_state == ePS_Running && m_next_state == ePS_Running) { 1765 1767 // check whether we already fullfil the criterion trunk/libffado/src/libstreaming/StreamProcessorManager.cpp
r860 r862 711 711 712 712 while(period_not_ready) { 713 debugOutput( DEBUG_LEVEL_VER Y_VERBOSE, "waiting for period (%d frames in buffer)...\n", m_SyncSource->getBufferFill());713 debugOutput( DEBUG_LEVEL_VERBOSE, "waiting for period (%d frames in buffer)...\n", m_SyncSource->getBufferFill()); 714 714 bool result; 715 715 if(m_SyncSource->getType() == StreamProcessor::ePT_Receive) { … … 757 757 if(xrun_occurred) break; 758 758 // FIXME: make sure we also exit this loop when something else happens (e.g. signal, iso error) 759 } 760 761 if(xrun_occurred) { 762 debugOutput( DEBUG_LEVEL_VERBOSE, "exit due to xrun...\n"); 759 763 } 760 764