Changeset 1530

Show
Ignore:
Timestamp:
03/29/09 13:30:46 (14 years ago)
Author:
ppalmers
Message:

- make the sync delay an integer amount of packets to avoid phase issues
- debug message updates

Files:

Legend:

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

    r1528 r1530  
    103103    if(ok) { 
    104104        m_last_timestamp = sytRecvToFullTicks2((uint32_t)CondSwapFromBus16(packet->syt), pkt_ctr); 
    105  
    106105        //#ifdef DEBUG 
    107106        #if 0 
  • branches/libffado-2.0/src/libstreaming/generic/StreamProcessor.cpp

    r1529 r1530  
    7777    , m_ticks_per_frame( 0 ) 
    7878    , m_dll_bandwidth_hz ( STREAMPROCESSOR_DLL_BW_HZ ) 
    79     , m_sync_delay( 0 ) 
     79    , m_sync_delay_frames( 0 ) 
    8080    , m_in_xrun( false ) 
    8181{ 
     
    209209 
    210210void 
    211 StreamProcessor::setSyncDelay(unsigned int d) { 
     211StreamProcessor::setSyncDelay(unsigned int ticks) { 
     212 
     213    // round the sync delay to an integer number of packets now we know the frame rate 
     214    int frames = (int)((float)ticks / getTicksPerFrame()); 
     215    frames = (frames / getNominalFramesPerPacket()) + 1; 
     216    frames *= getNominalFramesPerPacket(); 
     217     
    212218    #ifdef DEBUG 
    213     unsigned int frames = (unsigned int)((float)d / getTicksPerFrame()); 
    214     debugOutput(DEBUG_LEVEL_VERBOSE, "Setting SP %p SyncDelay to %u ticks, %u frames\n", this, d, frames); 
     219    float ticks2 = frames * getTicksPerFrame(); 
     220    debugOutput(DEBUG_LEVEL_VERBOSE, "Setting SP %p SyncDelay to %u ticks => rounded to %u frames, %f ticks\n", 
     221                this, ticks, frames, ticks2); 
    215222    #endif 
    216     m_sync_delay = d
     223    m_sync_delay_frames = frames
    217224} 
    218225 
    219226unsigned int 
    220227StreamProcessor::getSyncDelayFrames() { 
    221     unsigned int frames = (unsigned int)((float)m_sync_delay / getTicksPerFrame()); 
    222     return frames; 
     228    return m_sync_delay_frames; 
     229
     230 
     231unsigned int 
     232StreamProcessor::getSyncDelay() { 
     233    return (unsigned int)(m_sync_delay_frames * getTicksPerFrame()); 
    223234} 
    224235 
     
    414425                        fs_nom, fs_syt, fs_diff, fs_diff_norm); 
    415426            } 
    416         } 
    417         #endif 
    418  
    419 //         #ifdef DEBUG 
    420         int ticks_per_packet = (int)(getTicksPerFrame() * getNominalFramesPerPacket()); 
    421         int diff = diffTicks(m_last_timestamp, m_last_timestamp2); 
    422         // display message if the difference between two successive tick 
    423         // values is more than 50 ticks. 1 sample at 48k is 512 ticks 
    424         // so 50 ticks = 10%, which is a rather large jitter value. 
    425         if(diff-ticks_per_packet > 50 || diff-ticks_per_packet < -50) { 
    426             debugOutput(DEBUG_LEVEL_VERBOSE, 
    427                         "cy %04u rather large TSP difference TS=%011llu => TS=%011llu (%d, nom %d)\n", 
    428                         CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, 
    429                         m_last_timestamp, diff, ticks_per_packet); 
    430             // !!!HACK!!! FIXME: this is the result of a failure in wrapping/unwrapping somewhere 
    431             // it's definitely a bug. 
    432             // try to fix up the timestamp 
    433             int64_t last_timestamp_fixed; 
    434             // first try to add one second 
    435             last_timestamp_fixed = addTicks(m_last_timestamp, TICKS_PER_SECOND); 
    436             diff = diffTicks(last_timestamp_fixed, m_last_timestamp2); 
    437             if(diff-ticks_per_packet < 50 && diff-ticks_per_packet > -50) { 
    438                 debugWarning("cy %04u rather large TSP difference TS=%011llu => TS=%011llu (%d, nom %d)\n", 
    439                              CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, 
    440                              m_last_timestamp, diff, ticks_per_packet); 
    441                 debugWarning("HACK: fixed by adding one second of ticks. This is a bug being run-time fixed.\n"); 
    442                 m_last_timestamp = last_timestamp_fixed; 
    443             } else { 
    444                 // if that didn't work, try to subtract one second 
    445                 last_timestamp_fixed = substractTicks(m_last_timestamp, TICKS_PER_SECOND); 
    446                 diff = diffTicks(last_timestamp_fixed, m_last_timestamp2); 
    447                 if(diff-ticks_per_packet < 50 && diff-ticks_per_packet > -50) { 
    448                     debugWarning("cy %04u rather large TSP difference TS=%011llu => TS=%011llu (%d, nom %d)\n", 
     427 
     428            int ticks_per_packet = (int)(getTicksPerFrame() * getNominalFramesPerPacket()); 
     429            int diff = diffTicks(m_last_timestamp, m_last_timestamp2); 
     430                // display message if the difference between two successive tick 
     431                // values is more than 50 ticks. 1 sample at 48k is 512 ticks 
     432                // so 50 ticks = 10%, which is a rather large jitter value. 
     433                if(diff-ticks_per_packet > 50 || diff-ticks_per_packet < -50) { 
     434                    debugOutput(DEBUG_LEVEL_VERBOSE, 
     435                                "cy %04u rather large TSP difference TS=%011llu => TS=%011llu (%d, nom %d)\n", 
    449436                                CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, 
    450437                                m_last_timestamp, diff, ticks_per_packet); 
    451                     debugWarning("HACK: fixed by subtracing one second of ticks. This is a bug being run-time fixed.\n"); 
    452                     m_last_timestamp = last_timestamp_fixed; 
     438                    // !!!HACK!!! FIXME: this is the result of a failure in wrapping/unwrapping somewhere 
     439                    // it's definitely a bug. 
     440                    // try to fix up the timestamp 
     441                    int64_t last_timestamp_fixed; 
     442                    // first try to add one second 
     443                    last_timestamp_fixed = addTicks(m_last_timestamp, TICKS_PER_SECOND); 
     444                    diff = diffTicks(last_timestamp_fixed, m_last_timestamp2); 
     445                    if(diff-ticks_per_packet < 50 && diff-ticks_per_packet > -50) { 
     446                        debugWarning("cy %04u rather large TSP difference TS=%011llu => TS=%011llu (%d, nom %d)\n", 
     447                                    CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, 
     448                                    m_last_timestamp, diff, ticks_per_packet); 
     449                        debugWarning("HACK: fixed by adding one second of ticks. This is a bug being run-time fixed.\n"); 
     450                        m_last_timestamp = last_timestamp_fixed; 
     451                    } else { 
     452                        // if that didn't work, try to subtract one second 
     453                        last_timestamp_fixed = substractTicks(m_last_timestamp, TICKS_PER_SECOND); 
     454                        diff = diffTicks(last_timestamp_fixed, m_last_timestamp2); 
     455                        if(diff-ticks_per_packet < 50 && diff-ticks_per_packet > -50) { 
     456                            debugWarning("cy %04u rather large TSP difference TS=%011llu => TS=%011llu (%d, nom %d)\n", 
     457                                        CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, 
     458                                        m_last_timestamp, diff, ticks_per_packet); 
     459                            debugWarning("HACK: fixed by subtracing one second of ticks. This is a bug being run-time fixed.\n"); 
     460                            m_last_timestamp = last_timestamp_fixed; 
     461                        } 
     462                    } 
    453463                } 
    454             } 
    455         } 
    456         debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 
    457                            "%04u %011llu %011llu %d %d\n", 
    458                            CYCLE_TIMER_GET_CYCLES(pkt_ctr), 
    459                            m_last_timestamp2, m_last_timestamp,  
    460                            diff, ticks_per_packet); 
    461 //         #endif 
     464                debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 
     465                                "%04u %011llu %011llu %d %d\n", 
     466                                CYCLE_TIMER_GET_CYCLES(pkt_ctr), 
     467                                m_last_timestamp2, m_last_timestamp,  
     468                                diff, ticks_per_packet); 
     469        } 
     470        #endif 
    462471 
    463472        debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 
     
    723732                debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "Nom fs: %12f, Instantanous fs: %12f, diff: %12f (%12f)\n", 
    724733                           fs_nom, fs_syt, fs_diff, fs_diff_norm); 
     734//                 debugOutput(DEBUG_LEVEL_VERBOSE, "Diff fs: %12f, m_last_timestamp: %011llu, m_last_timestamp2: %011llu\n", 
     735//                            fs_diff, m_last_timestamp, m_last_timestamp2); 
    725736                if (fs_diff_norm > 0.01 || fs_diff_norm < -0.01) { 
    726737                    debugWarning( "Instantanous samplerate more than 1%% off nominal. [Nom fs: %12f, Instantanous fs: %12f, diff: %12f (%12f)]\n", 
     
    15511562                ringbuffer_size_frames += syncdelay_in_frames; 
    15521563 
    1553                 debugOutput(DEBUG_LEVEL_VERBOSE, "Prefill transmit SP %p with %u frames\n", this, ringbuffer_size_frames); 
     1564                debugOutput(DEBUG_LEVEL_VERBOSE, "Prefill transmit SP %p with %u frames (sync_delay_frames = %d)\n", 
     1565                            this, ringbuffer_size_frames, syncdelay_in_frames); 
    15541566                // prefill the buffer 
    15551567                if(!transferSilence(ringbuffer_size_frames)) { 
  • branches/libffado-2.0/src/libstreaming/generic/StreamProcessor.h

    r1526 r1530  
    372372         * @return the sync delay (in ticks) 
    373373         */ 
    374         unsigned int getSyncDelay() {return m_sync_delay;}
     374        unsigned int getSyncDelay()
    375375        unsigned int getSyncDelayFrames(); 
    376376        /** 
    377377         * sets the sync delay 
     378         *  
     379         * note: will be rounded to an integer number of packets 
     380         *  
    378381         * @param d sync delay 
    379382         */ 
    380         void setSyncDelay(unsigned int d); 
     383        void setSyncDelay(unsigned int ticks); 
    381384 
    382385        /** 
     
    449452        float m_ticks_per_frame; 
    450453        float m_dll_bandwidth_hz; 
    451         unsigned int m_sync_delay
     454        unsigned int m_sync_delay_frames
    452455    private: 
    453456        bool m_in_xrun; 
  • branches/libffado-2.0/src/libstreaming/StreamProcessorManager.cpp

    r1528 r1530  
    491491    int max_of_min_delay = 0; 
    492492    int min_delay = 0; 
     493    int packet_size_frames = 0; 
     494    int max_packet_size_frames = 0; 
     495 
    493496    for ( StreamProcessorVectorIterator it = m_ReceiveProcessors.begin(); 
    494497            it != m_ReceiveProcessors.end(); 
     
    496499        min_delay = (*it)->getMaxFrameLatency(); 
    497500        if(min_delay > max_of_min_delay) max_of_min_delay = min_delay; 
    498     } 
     501        packet_size_frames = (*it)->getNominalFramesPerPacket(); 
     502        if(packet_size_frames > max_packet_size_frames) max_packet_size_frames = packet_size_frames; 
     503    } 
     504    for ( StreamProcessorVectorIterator it = m_TransmitProcessors.begin(); 
     505            it != m_TransmitProcessors.end(); 
     506            ++it ) { 
     507        packet_size_frames = (*it)->getNominalFramesPerPacket(); 
     508        if(packet_size_frames > max_packet_size_frames) max_packet_size_frames = packet_size_frames; 
     509    } 
     510    debugOutput( DEBUG_LEVEL_VERBOSE, " max_of_min_delay = %d, max_packet_size_frames = %d...\n", max_of_min_delay, max_packet_size_frames); 
    499511 
    500512    // add some processing margin. This only shifts the time 
    501513    // at which the buffer is transfer()'ed. This makes things somewhat 
    502     // more robust. It should be noted though that shifting the transfer 
    503     // time to a later time instant also causes the xmit buffer fill to be 
    504     // lower on average. 
     514    // more robust. 
    505515    max_of_min_delay += signal_delay_ticks; 
    506516 
     517    // Note that the equivalent number of frames is added to the  
     518    // transmit buffer to ensure that it keeps a good buffer fill, no matter 
     519    // what the sync delay is. 
    507520    m_SyncSource->setSyncDelay(max_of_min_delay); 
    508521    unsigned int syncdelay = m_SyncSource->getSyncDelay(); 
     
    530543        // check if we were woken up too soon 
    531544        time_till_next_period = m_SyncSource->getTimeUntilNextPeriodSignalUsecs(); 
    532         debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "waiting for %d usecs...\n", time_till_next_period); 
     545        debugOutput( DEBUG_LEVEL_VERBOSE, "waiting for %d usecs...\n", time_till_next_period); 
    533546        if(time_till_next_period > 0) { 
    534547            // wait for the period 
     
    549562    } 
    550563    debugOutput( DEBUG_LEVEL_VERBOSE, " sync source frame rate: %f fps (%f tpf)\n", syncrate, tpf); 
     564 
     565    m_SyncSource->setSyncDelay(max_of_min_delay); 
     566    syncdelay = m_SyncSource->getSyncDelay(); 
     567    debugOutput( DEBUG_LEVEL_VERBOSE, " updated sync delay = %d => %d ticks (%f frames) (%03us %04uc %04ut)...\n",  
     568        max_of_min_delay, syncdelay, syncdelay/tpf, 
     569        (unsigned int)TICKS_TO_SECS(syncdelay), 
     570        (unsigned int)TICKS_TO_CYCLES(syncdelay), 
     571        (unsigned int)TICKS_TO_OFFSET(syncdelay)); 
    551572 
    552573    // we now should have decent sync info on the sync source 
     
    563584    // this is the time window we have to setup all SP's such that they  
    564585    // can start wet-running correctly. 
     586    // we have to round this time to an integer number of audio packets 
     587    double time_for_startup_abs = (double)(cycles_for_startup * TICKS_PER_CYCLE); 
     588    int time_for_startup_frames = (int)(time_for_startup_abs / tpf); 
     589    time_for_startup_frames = ((time_for_startup_frames / max_packet_size_frames) + 1) * max_packet_size_frames; 
     590    uint64_t time_for_startup_ticks = (uint64_t)((float)time_for_startup_frames * tpf); 
     591 
    565592    time_of_first_sample = addTicks(time_of_first_sample, 
    566                                     cycles_for_startup * TICKS_PER_CYCLE); 
     593                                    time_for_startup_ticks); 
     594    debugOutput( DEBUG_LEVEL_VERBOSE, "  add %d frames (%011llu ticks)...\n",  
     595        time_for_startup_frames, time_for_startup_ticks); 
    567596 
    568597    debugOutput( DEBUG_LEVEL_VERBOSE, "  => first sample at TS=%011llu (%03us %04uc %04ut)...\n",  
     
    571600        (unsigned int)TICKS_TO_CYCLES(time_of_first_sample), 
    572601        (unsigned int)TICKS_TO_OFFSET(time_of_first_sample)); 
    573  
    574     #ifdef DEBUG 
    575     // the time at which the previous period would have passed is the 
    576     // time of the first sample received, minus one frame. 
    577     //m_time_of_transfer2 = substractTicks(time_of_first_sample, (uint64_t)m_SyncSource->getTicksPerFrame()); 
    578     m_time_of_transfer2 = time_of_first_sample; 
    579     #endif 
    580602 
    581603    // we should start wet-running the transmit SP's some cycles in advance 
     
    603625          ++it ) { 
    604626        (*it)->setBufferHeadTimestamp(time_of_first_sample); 
     627        ffado_timestamp_t ts; 
     628        signed int fc; 
     629        (*it)->getBufferHeadTimestamp ( &ts, &fc ); 
     630        debugOutput( DEBUG_LEVEL_VERBOSE, " transmit buffer tail %010lld => head TS %010lld, fc=%d...\n", 
     631                    time_of_first_sample, (uint64_t)ts, fc); 
    605632    } 
    606633 
     
    659686    m_time_of_transfer = m_SyncSource->getTimeAtPeriod(); 
    660687 
    661     // and a (still very rough) approximation of the rate 
     688    // and a (rough) approximation of the rate 
    662689    float rate = m_SyncSource->getTicksPerFrame(); 
     690 
     691    #ifdef DEBUG 
     692    // the time at which the previous period would have passed 
     693    m_time_of_transfer2 = m_time_of_transfer; 
     694    m_time_of_transfer2 = substractTicks(m_time_of_transfer2, (uint64_t)(m_period * rate)); 
     695    #endif 
     696 
     697    debugOutput( DEBUG_LEVEL_VERBOSE, "  initial time of transfer %010lld, rate %f...\n", 
     698                m_time_of_transfer, rate); 
     699 
    663700    int64_t delay_in_ticks = (int64_t)(((float)((m_nb_buffers-1) * m_period)) * rate); 
    664701    // also add the sync delay 
    665702    delay_in_ticks = addTicks(delay_in_ticks, m_SyncSource->getSyncDelay()); 
    666     debugOutput( DEBUG_LEVEL_VERBOSE, "  initial time of transfer %010lld, rate %f...\n", 
    667                 m_time_of_transfer, rate); 
    668703 
    669704 
     
    679714 
    680715    int64_t transmit_tail_timestamp = addTicks(m_time_of_transfer, delay_in_ticks); 
    681  
    682716    debugOutput( DEBUG_LEVEL_VERBOSE, "  preset transmit tail TS %010lld, rate %f...\n", 
    683717                transmit_tail_timestamp, rate); 
     
    686720        it != m_TransmitProcessors.end(); 
    687721        ++it ) { 
     722        (*it)->setTicksPerFrame(rate); 
    688723        (*it)->setBufferTailTimestamp(transmit_tail_timestamp); 
    689         (*it)->setTicksPerFrame(rate); 
     724        ffado_timestamp_t ts; 
     725        signed int fc; 
     726        (*it)->getBufferHeadTimestamp ( &ts, &fc ); 
     727        debugOutput( DEBUG_LEVEL_VERBOSE, "   => transmit head TS %010lld, fc=%d...\n", 
     728                    (uint64_t)ts, fc); 
    690729    } 
    691730 
  • branches/libffado-2.0/src/libutil/TimestampedBuffer.cpp

    r1529 r1530  
    5858    pthread_mutex_unlock(&m_framecounter_lock); \ 
    5959    } 
     60 
    6061 
    6162namespace Util { 
     
    7172      m_wrap_at(0xFFFFFFFFFFFFFFFFLLU), 
    7273      m_Client(c), m_framecounter(0), 
    73       m_buffer_tail_timestamp(0.0), 
    74       m_buffer_next_tail_timestamp(0.0), 
     74      m_buffer_tail_timestamp(TIMESTAMP_MAX + 1.0), 
     75      m_buffer_next_tail_timestamp(TIMESTAMP_MAX + 1.0), 
    7576      m_dll_e2(0.0), m_dll_b(DLL_COEFF_B), m_dll_c(DLL_COEFF_C), 
    7677      m_nominal_rate(0.0), m_current_rate(0.0), m_update_period(0) 
     
    202203    ENTER_CRITICAL_SECTION; 
    203204 
    204     m_dll_e2 = m_update_period * (double)rate; 
     205    m_current_rate = rate; 
     206    m_dll_e2 = m_update_period * m_current_rate; 
    205207    m_buffer_next_tail_timestamp = (ffado_timestamp_t)((double)m_buffer_tail_timestamp + m_dll_e2); 
    206208 
     
    331333 * 
    332334 * Resets the TimestampedBuffer, clearing the buffers and counters. 
    333  * Also resets the DLL to the nominal values. 
     335 * [DEL Also resets the DLL to the nominal values. DEL] 
    334336 * 
    335337 * \note when this is called, you should make sure that the buffer 
     
    344346 
    345347    m_current_rate = m_nominal_rate; 
    346     m_dll_e2=m_nominal_rate * (float)m_update_period; 
    347     // this will init the internal timestamps to a sensible value 
    348     setBufferTailTimestamp(m_buffer_tail_timestamp); 
     348    m_dll_e2 = m_current_rate * (float)m_update_period; 
    349349 
    350350    return true; 
     
    402402 
    403403    // init the DLL 
    404     m_dll_e2=m_nominal_rate * (float)m_update_period; 
    405  
    406     // this will init the internal timestamps to a sensible value 
    407     setBufferTailTimestamp(m_buffer_tail_timestamp); 
     404    m_dll_e2 = m_nominal_rate * (float)m_update_period; 
     405 
     406    // init the timestamps to a bogus value, as there is not 
     407    // really something sane to say about them 
     408    m_buffer_tail_timestamp = TIMESTAMP_MAX + 1.0; 
     409    m_buffer_next_tail_timestamp = TIMESTAMP_MAX + 1.0; 
    408410 
    409411    return true; 
     
    462464        // while disabled, we don't update the DLL, nor do we write frames 
    463465        // we just set the correct timestamp for the frames 
    464         incrementFrameCounter(nframes, ts); 
    465         decrementFrameCounter(nframes); 
     466        if (m_buffer_tail_timestamp < TIMESTAMP_MAX && m_buffer_next_tail_timestamp < TIMESTAMP_MAX) { 
     467            incrementFrameCounter(nframes, ts); 
     468            decrementFrameCounter(nframes); 
     469        } 
    466470        setBufferTailTimestamp(ts); 
    467471    } else { 
     
    502506        return false; 
    503507    } 
    504      
     508 
    505509    // make sure the head timestamp remains identical 
    506510    signed int fc; 
     
    845849#ifdef DEBUG 
    846850    if (new_timestamp >= m_wrap_at) { 
    847         debugWarning("timestamp not wrapped: "TIMESTAMP_FORMAT_SPEC"\n",new_timestamp); 
     851        debugWarning("timestamp not wrapped: "TIMESTAMP_FORMAT_SPEC"\n", new_timestamp); 
    848852    } 
    849853#endif 
     
    854858 
    855859    // add the time 
    856     ts += (ffado_timestamp_t)(m_nominal_rate * (float)m_framecounter); 
     860    ts += (ffado_timestamp_t)(m_current_rate * (float)(m_framecounter)); 
    857861 
    858862    if (ts >= m_wrap_at) { 
     
    864868    m_buffer_tail_timestamp = ts; 
    865869 
    866     m_dll_e2=m_update_period * (double)m_nominal_rate; 
     870    m_dll_e2 = m_update_period * (double)m_current_rate; 
    867871    m_buffer_next_tail_timestamp = (ffado_timestamp_t)((double)m_buffer_tail_timestamp + m_dll_e2); 
    868872 
     
    949953    ffado_timestamp_t retval; 
    950954    ENTER_CRITICAL_SECTION; 
    951     retval = getTimestampFromTail(m_framecounter-nframes); 
     955    retval = getTimestampFromTail(m_framecounter - nframes); 
    952956    EXIT_CRITICAL_SECTION; 
    953957    return retval; 
     
    11031107    debugOutputShort( DEBUG_LEVEL_NORMAL, "   Timestamps           : head: "TIMESTAMP_FORMAT_SPEC", Tail: "TIMESTAMP_FORMAT_SPEC", Next tail: "TIMESTAMP_FORMAT_SPEC"\n", 
    11041108                                          ts_head, m_buffer_tail_timestamp, m_buffer_next_tail_timestamp); 
    1105     debugOutputShort( DEBUG_LEVEL_NORMAL, "    Head - Tail         : "TIMESTAMP_FORMAT_SPEC"\n", diff); 
     1109    debugOutputShort( DEBUG_LEVEL_NORMAL, "    Head - Tail         : "TIMESTAMP_FORMAT_SPEC" (%f frames)\n", diff, diff/m_dll_e2*m_update_period); 
    11061110    debugOutputShort( DEBUG_LEVEL_NORMAL, "   DLL Rate             : %f (%f)\n", m_dll_e2, m_dll_e2/m_update_period); 
    11071111    debugOutputShort( DEBUG_LEVEL_NORMAL, "   DLL Bandwidth        : %10e 1/ticks (%f Hz)\n", getBandwidth(), getBandwidth() * TICKS_PER_SECOND); 
  • branches/libffado-2.0/src/libutil/TimestampedBuffer.h

    r1525 r1530  
    3131//typedef float ffado_timestamp_t; 
    3232//#define TIMESTAMP_FORMAT_SPEC "%14.3f" 
     33 
    3334typedef double ffado_timestamp_t; 
    3435#define TIMESTAMP_FORMAT_SPEC "%14.3f" 
     36#define TIMESTAMP_MAX 3145728000.0 
     37 
    3538// typedef int64_t ffado_timestamp_t; 
    3639// #define TIMESTAMP_FORMAT_SPEC "%012lld"