Changeset 497
- Timestamp:
- 07/25/07 17:01:52 (16 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/src/libstreaming/MotuStreamProcessor.cpp
r495 r497 124 124 // FIXME: the actual delays in the system need to be worked out so 125 125 // we can get this thing synchronised. For now this seems to work. 126 uint64_t ts_head,fc;127 126 int fc; 127 ffado_timestamp_t ts_head; 128 128 quadlet_t *quadlet = (quadlet_t *)data; 129 129 signed int i; … … 189 189 // therefore sync_lag_cycles * TICKS_PER_CYCLE earlier than 190 190 // T1. 191 ts_head = addTicks( ts_head, sync_lag_cycles * TICKS_PER_CYCLE);191 ts_head = addTicks((int64_t)ts_head, sync_lag_cycles * TICKS_PER_CYCLE); 192 192 193 193 // These are just copied from AmdtpStreamProcessor. At some point we should 194 194 // verify that they make sense for the MOTU. 195 ts_head = substractTicks( ts_head, TICKS_PER_CYCLE);195 ts_head = substractTicks((int64_t)ts_head, TICKS_PER_CYCLE); 196 196 // account for the number of cycles we are too late to enable 197 ts_head = addTicks( ts_head, cycles_past_enable * TICKS_PER_CYCLE);197 ts_head = addTicks((int64_t)ts_head, cycles_past_enable * TICKS_PER_CYCLE); 198 198 // account for one extra packet of frames 199 ts_head = substractTicks( ts_head,199 ts_head = substractTicks((int64_t)ts_head, 200 200 (uint32_t)((float)n_events * m_SyncSource->m_data_buffer->getRate())); 201 201 … … 312 312 313 313 // add the transmit transfer delay to construct the playout time 314 uint64_t ts=addTicks(timestamp, TRANSMIT_TRANSFER_DELAY);314 ffado_timestamp_t ts=addTicks(timestamp, TRANSMIT_TRANSFER_DELAY); 315 315 316 316 if (m_data_buffer->readFrames(n_events, (char *)(data + 8))) { … … 409 409 } else { // there is no more data in the ringbuffer 410 410 411 debugWarning("Transmit buffer underrun (now %d, queue %d, target %d)\n", 412 now_cycles, cycle, TICKS_TO_CYCLES(ts)); 411 // FIXME: port to new timestamp type 412 // debugWarning("Transmit buffer underrun (now %d, queue %d, target %d)\n", 413 // now_cycles, cycle, TICKS_TO_CYCLES(ts)); 413 414 414 415 // signal underrun