annotate src/AudioFile.h @ 2:fa2af670b5c5 tip

SoundFileLoader might have moved
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Fri, 06 Jan 2012 00:23:26 +0000
parents ba2a17cf81bf
children
rev   line source
andrew@0 1 /*
andrew@0 2 * audioFile.h
andrew@0 3 * audioFileLoader3
andrew@0 4 *
andrew@0 5 * Created by Andrew on 31/07/2011.
andrew@0 6 * Copyright 2011 QMUL. All rights reserved.
andrew@0 7 *
andrew@0 8 */
andrew@0 9
andrew@0 10 //Holds the actual samples loaded in from the audio file
andrew@0 11 //in a double matrix, so multilpe channels used
andrew@0 12
andrew@0 13
andrew@0 14 #ifndef AUDIOFILE_H
andrew@0 15 #define AUDIOFILE_H
andrew@0 16
andrew@0 17 #include "ofMain.h"
andrew@0 18
andrew@1 19
andrew@1 20 //fix bug where drawn before the start high up
andrew@1 21
andrew@0 22 class AudioFile
andrew@0 23 {
andrew@0 24 public:
andrew@0 25 AudioFile(); // constructor
andrew@0 26 // ~AudioFile();
andrew@0 27
andrew@0 28
andrew@0 29
andrew@1 30 void drawAudioVectorMillis(double startTimeMillis, double endTimeMillis);
andrew@0 31 void drawAudioVectorSamples(double startTimeSample, double endTimeSample);
andrew@0 32 double getPosition(int index);
andrew@0 33
andrew@0 34 typedef std::vector<double> DoubleVector;
andrew@0 35 typedef std::vector<DoubleVector> DoubleMatrix;
andrew@0 36 DoubleVector audioVector;
andrew@0 37 DoubleMatrix audioMatrix;
andrew@0 38
andrew@1 39
andrew@0 40 double screenHeight;
andrew@0 41 int length;
andrew@0 42 double audioScaleSamples;
andrew@0 43 double playPosition;//in samples
andrew@0 44
andrew@0 45 };
andrew@0 46
andrew@0 47 #endif