41 #if !defined(__CAAudioTimeStamp_h__)
42 #define __CAAudioTimeStamp_h__
48 #if !defined(__COREAUDIO_USE_FLAT_INCLUDES__)
49 #include <CoreAudio/CoreAudioTypes.h>
51 #include <CoreAudioTypes.h>
60 struct CAAudioTimeStamp
67 CAAudioTimeStamp() { memset(
this, 0,
sizeof(AudioTimeStamp)); }
68 CAAudioTimeStamp(
const AudioTimeStamp& v) { memcpy(
this, &v,
sizeof(AudioTimeStamp)); }
69 CAAudioTimeStamp(Float64 inSampleTime) { memset(
this, 0,
sizeof(AudioTimeStamp)); mSampleTime = inSampleTime; mFlags = kAudioTimeStampSampleTimeValid; }
70 CAAudioTimeStamp(UInt64 inHostTime) { memset(
this, 0,
sizeof(AudioTimeStamp)); mHostTime = inHostTime; mFlags = kAudioTimeStampHostTimeValid; }
71 CAAudioTimeStamp(Float64 inSampleTime, UInt64 inHostTime) { memset(
this, 0,
sizeof(AudioTimeStamp)); mSampleTime = inSampleTime; mHostTime = inHostTime; mFlags = kAudioTimeStampSampleTimeValid | kAudioTimeStampHostTimeValid; }
75 CAAudioTimeStamp& operator=(
const AudioTimeStamp& v) { memcpy(
this, &v,
sizeof(AudioTimeStamp));
return *
this; }
79 static const AudioTimeStamp kZero;
83 bool operator<(
const AudioTimeStamp& x,
const AudioTimeStamp& y);
84 bool operator==(
const AudioTimeStamp& x,
const AudioTimeStamp& y);
85 inline bool operator!=(
const AudioTimeStamp& x,
const AudioTimeStamp& y) {
return !(x == y); }
86 inline bool operator<=(
const AudioTimeStamp& x,
const AudioTimeStamp& y) {
return (x < y) || (x == y); }
87 inline bool operator>=(
const AudioTimeStamp& x,
const AudioTimeStamp& y) {
return !(x < y); }
88 inline bool operator>(
const AudioTimeStamp& x,
const AudioTimeStamp& y) {
return !((x < y) || (x == y)); }
bool TTFOUNDATION_EXPORT operator!=(const TTObject &anObject, const TTObject &anotherObject)
Compare two objects for inequality.
bool TTFOUNDATION_EXPORT operator==(const TTObject &anObject, const TTObject &anotherObject)
Compare two objects for equality.