summaryrefslogtreecommitdiff
path: root/NT/src/nodes_audio_analysis.h
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2014-01-30 18:13:45 +0000
committerTim Redfern <tim@eclectronics.org>2014-01-30 18:13:45 +0000
commitc2b62131b0e6984f8fea7f44e364ae5c886c211a (patch)
tree0e6e1502d95a8c9e99fea979f92d2ee12518ecbe /NT/src/nodes_audio_analysis.h
parent5858a7f89d844e3577f6400681bdd47a7bdd8e2c (diff)
making fragmenting exporter
Diffstat (limited to 'NT/src/nodes_audio_analysis.h')
-rw-r--r--NT/src/nodes_audio_analysis.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/NT/src/nodes_audio_analysis.h b/NT/src/nodes_audio_analysis.h
index 4542e19..aa4abeb 100644
--- a/NT/src/nodes_audio_analysis.h
+++ b/NT/src/nodes_audio_analysis.h
@@ -39,7 +39,6 @@ namespace Rotor {
void cleanup(){};
int process_frame(uint8_t *data,int samples_in_frame);
void print_vector(xmlIO XML);
- const double get_output(const Frame_parameters &frame){return 0.0;};
vector<double> audiodata;
int height,width,samples_per_column;
int out_sample,sample,samples;
@@ -55,9 +54,9 @@ namespace Rotor {
bool init(int _channels,int _bits,int _samples,int _rate);
void cleanup();
int process_frame(uint8_t *data,int samples_in_frame);
- const double output(const Time_spec &time) {
+ const double& output(const Frame_parameters &frame) {
if (features.size()) {
- auto i=features.upper_bound(time.time); //the first element in the container whose key is considered to go after k
+ auto i=features.upper_bound(frame.time); //the first element in the container whose key is considered to go after k
double uk;
double v1,v2;
v1=v2=0.0;
@@ -74,11 +73,11 @@ namespace Rotor {
if (i->second.values.size()) v1=i->second.values[0];
switch (attributes["mode"]->intVal){
case VAMPHOST_Timeline:
- return (((time.time-lk)/(uk-lk))+ln);
+ return (((frame.time-lk)/(uk-lk))+ln);
case VAMPHOST_Timesteps:
return (double)ln;
case VAMPHOST_Valueline:
- return ((time.time-lk)/(uk-lk))+v1; //((((time.time-lk)/(uk-lk))*(v2-v1))+v1);
+ return ((frame.time-lk)/(uk-lk))+v1; //((((time.time-lk)/(uk-lk))*(v2-v1))+v1);
case VAMPHOST_Values:
return v1;
}