Mercurial > hg > svcore
comparison base/test/TestRealTime.h @ 1069:32ab6c48efaa
Merge from branch tonioni
author | Chris Cannam |
---|---|
date | Mon, 20 Apr 2015 09:11:34 +0100 |
parents | a1cd5abcb38b |
children | b8a788c9a6f1 |
comparison
equal
deleted
inserted
replaced
1036:682d64f05e72 | 1069:32ab6c48efaa |
---|---|
280 1, 2, 8000, 22050, 44100, 44101, 192000 | 280 1, 2, 8000, 22050, 44100, 44101, 192000 |
281 }; | 281 }; |
282 int m = sizeof(rates)/sizeof(rates[0]); | 282 int m = sizeof(rates)/sizeof(rates[0]); |
283 | 283 |
284 for (int i = 0; i < n; ++i) { | 284 for (int i = 0; i < n; ++i) { |
285 int frame = frames[i]; | 285 sv_frame_t frame = frames[i]; |
286 for (int j = 0; j < m; ++j) { | 286 for (int j = 0; j < m; ++j) { |
287 int rate = rates[j]; | 287 int rate = rates[j]; |
288 | 288 |
289 RealTime rt = RealTime::frame2RealTime(frame, rate); | 289 RealTime rt = RealTime::frame2RealTime(frame, rate); |
290 int conv = RealTime::realTime2Frame(rt, rate); | 290 sv_frame_t conv = RealTime::realTime2Frame(rt, rate); |
291 QCOMPARE(frame, conv); | 291 QCOMPARE(frame, conv); |
292 | 292 |
293 rt = RealTime::frame2RealTime(-frame, rate); | 293 rt = RealTime::frame2RealTime(-frame, rate); |
294 conv = RealTime::realTime2Frame(rt, rate); | 294 conv = RealTime::realTime2Frame(rt, rate); |
295 QCOMPARE(-frame, conv); | 295 QCOMPARE(-frame, conv); |