Changeset 515
- Timestamp:
- 08/09/07 16:19:26 (16 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/src/libstreaming/MotuStreamProcessor.cpp
r512 r515 120 120 int cycle, unsigned int dropped, unsigned int max_length) { 121 121 122 // FIXME: the actual delays in the system need to be worked out so123 // we can get this thing synchronised. For now this seems to work.124 122 int fc; 125 123 int64_t ts_head; … … 146 144 // packet is intended for and 'now' 147 145 int cycle_diff = diffCycles(cycle, now_cycles); 148 149 //debugOutput(DEBUG_LEVEL_VERBOSE,"tx: enabled=%d, cycle=%d, now_cycles=%d, diff=%d\n",150 // !m_is_disabled,cycle, now_cycles, cycle_diff);151 146 152 147 // Signal that streaming is still active … … 240 235 int64_t timestamp = ts_head; 241 236 242 //debugOutput(DEBUG_LEVEL_VERBOSE,"tx cycle %d, base timestamp %lld\n",cycle, ts_head);243 244 237 // we send a packet some cycles in advance, to avoid the 245 238 // following situation: … … 258 251 ticks_to_advance += (int64_t)cycle_diff * TICKS_PER_CYCLE; 259 252 260 // determine the 'now' time in ticks261 // uint64_t cycle_timer=CYCLE_TIMER_TO_TICKS(ctr);262 253 263 254 // time until the packet is to be sent (if <= 0: send packet) 264 255 // For Amdtp this looked like 256 // // determine the 'now' time in ticks 257 // uint64_t cycle_timer=CYCLE_TIMER_TO_TICKS(ctr); 265 258 // int32_t until_next=diffTicks(timestamp, cycle_timer + ticks_to_advance); 266 259 // However, this didn't seem to work well with the MOTU's buffer structure. … … 1011 1004 m_data_buffer->setBufferTailTimestamp(m_last_timestamp); 1012 1005 1013 debugOutput(DEBUG_LEVEL_VERBOSE,"On enable: last ts=%lld, ts2=%lld = %lld (%p)\n",1014 m_last_timestamp, m_last_timestamp2, m_last_timestamp-m_last_timestamp2,1015 m_data_buffer);1016 1017 1006 } else { 1018 1007 debugOutput(DEBUG_LEVEL_VERY_VERBOSE, … … 1083 1072 1084 1073 debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "put packet...\n"); 1085 //debugOutput(DEBUG_LEVEL_VERBOSE,"rx cycle=%d, last ts=%lld\n",cycle, m_last_timestamp);1086 1074 1087 1075 //=> process the packet