Mercurial > hg > vamp-plugin-sdk
comparison vamp-sdk/RealTime.h @ 99:fe31e6aed666
* Add --list-by-category to vamp-simple-host
* Some comment updates
author | cannam |
---|---|
date | Mon, 14 Jan 2008 11:00:41 +0000 |
parents | e33fa45f0935 |
children | 5ee166dccfff |
comparison
equal
deleted
inserted
replaced
98:896a97349ac5 | 99:fe31e6aed666 |
---|---|
123 else return sec <= r.sec; | 123 else return sec <= r.sec; |
124 } | 124 } |
125 | 125 |
126 RealTime operator/(int d) const; | 126 RealTime operator/(int d) const; |
127 | 127 |
128 // Find the fractional difference between times | 128 /** |
129 // | 129 * Return the ratio of two times. |
130 */ | |
130 double operator/(const RealTime &r) const; | 131 double operator/(const RealTime &r) const; |
131 | 132 |
132 // Return a human-readable debug-type string to full precision | 133 /** |
133 // (probably not a format to show to a user directly) | 134 * Return a human-readable debug-type string to full precision |
134 // | 135 * (probably not a format to show to a user directly) |
136 */ | |
135 std::string toString() const; | 137 std::string toString() const; |
136 | 138 |
137 // Return a user-readable string to the nearest millisecond | 139 /** |
138 // in a form like HH:MM:SS.mmm | 140 * Return a user-readable string to the nearest millisecond |
139 // | 141 * in a form like HH:MM:SS.mmm |
142 */ | |
140 std::string toText(bool fixedDp = false) const; | 143 std::string toText(bool fixedDp = false) const; |
141 | 144 |
142 // Convenience functions for handling sample frames | 145 /** |
143 // | 146 * Convert a RealTime into a sample frame at the given sample rate. |
147 */ | |
144 static long realTime2Frame(const RealTime &r, unsigned int sampleRate); | 148 static long realTime2Frame(const RealTime &r, unsigned int sampleRate); |
149 | |
150 /** | |
151 * Convert a sample frame at the given sample rate into a RealTime. | |
152 */ | |
145 static RealTime frame2RealTime(long frame, unsigned int sampleRate); | 153 static RealTime frame2RealTime(long frame, unsigned int sampleRate); |
146 | 154 |
147 static const RealTime zeroTime; | 155 static const RealTime zeroTime; |
148 }; | 156 }; |
149 | 157 |