Logo Search packages:      
Sourcecode: scummvm version File versions

int Audio::Timestamp::cmp ( const Timestamp ts ) const [protected]

Compare this timestamp to another one and return a value similar to strcmp.

Definition at line 114 of file timestamp.cpp.

References _framerate, _numFrames, and _secs.

Referenced by operator==().

                                            {
      int delta = _secs - ts._secs;
      if (!delta) {
            const uint g = Common::gcd(_framerate, ts._framerate);
            const uint p = _framerate / g;
            const uint q = ts._framerate / g;

            delta = (_numFrames * q - ts._numFrames * p);
      }

      return delta;
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index