Mercurial > hg > beatroot-vamp
comparison BeatRootProcessor.h @ 31:b9c2f444cdaa
Fix incorrect return timestamps when run with non-zero origin time
author | Chris Cannam |
---|---|
date | Fri, 06 Dec 2013 14:38:17 +0000 |
parents | 3a5840de4d5f |
children | 937432fc2898 |
comparison
equal
deleted
inserted
replaced
30:eeafdd147988 | 31:b9c2f444cdaa |
---|---|
92 | 92 |
93 /** Constructor: note that streams are not opened until the input | 93 /** Constructor: note that streams are not opened until the input |
94 * file is set (see <code>setInputFile()</code>). */ | 94 * file is set (see <code>setInputFile()</code>). */ |
95 BeatRootProcessor(float sr, AgentParameters parameters) : | 95 BeatRootProcessor(float sr, AgentParameters parameters) : |
96 sampleRate(sr), | 96 sampleRate(sr), |
97 hopTime(0.010), | |
98 fftTime(0.04644), | |
97 hopSize(0), | 99 hopSize(0), |
98 fftSize(0), | 100 fftSize(0), |
99 hopTime(0.010), | |
100 fftTime(0.04644), | |
101 agentParameters(parameters) | 101 agentParameters(parameters) |
102 { | 102 { |
103 hopSize = lrint(sampleRate * hopTime); | 103 hopSize = lrint(sampleRate * hopTime); |
104 fftSize = lrint(pow(2, lrint( log(fftTime * sampleRate) / log(2)))); | 104 fftSize = lrint(pow(2, lrint( log(fftTime * sampleRate) / log(2)))); |
105 init(); | 105 init(); |