Changeset 469

Show
Ignore:
Timestamp:
09/13/08 09:25:19 (4 months ago)
Author:
gabriel
Message:

Add JACK version detection to conditionally compile jack_position_t::bbt_offset

bbt_offset was added to jack_position_t in 0.102.4, and we only use the
parameter in two lines of code in jack_output.cpp. By conditionally
compiling, Hydrogen can be compiled with the JACK 0.100.0 libraries
(which is the current version in Debian stable/etch).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Sconstruct

    r450 r469  
    163163        env.CacheDir( "scons_cache" ) 
    164164         
     165        if jack: 
     166            env.ParseConfig('pkg-config --modversion jack', get_jack_api_flags) 
    165167 
    166168        #env.Decider is not known in older scons version 
     
    256258        return app 
    257259 
    258  
     260def get_jack_api_flags(xenv, pkg_ver): 
     261    (major, minor, patch) = pkg_ver.rstrip().split('.') 
     262    major = int(major) 
     263    minor = int(minor) 
     264    patch = int(patch) 
     265    rv = "" 
     266    if (major == 0) and (minor < 102): 
     267        rv = "-DJACK_NO_BBT_OFFSET" 
     268    if (major == 0) and (minor == 102) and (patch < 4): 
     269        rv = "-DJACK_NO_BBT_OFFSET" 
     270    xenv.MergeFlags(rv) 
    259271 
    260272opts = Options() 
  • trunk/libs/hydrogen/src/IO/jack_output.cpp

    r452 r469  
    276276         
    277277                long long nNewFrames = ( long long )( hydrogen_ticks_to_locate * fNewTickSize ); 
     278#ifndef JACK_NO_BBT_OFFSET 
    278279                if ( m_JackTransportPos.valid & JackBBTFrameOffset ) 
    279280                        nNewFrames += m_JackTransportPos.bbt_offset ; 
     281#endif 
    280282                m_transport.m_nFrames = nNewFrames; 
    281283