Tidy up region gain line drawing slightly so that it doesn't overhang its region...
[ardour.git] / libs / rubberband / src / AudioCurve.h
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
2
3 /*
4     Rubber Band
5     An audio time-stretching and pitch-shifting library.
6     Copyright 2007-2008 Chris Cannam.
7     
8     This program is free software; you can redistribute it and/or
9     modify it under the terms of the GNU General Public License as
10     published by the Free Software Foundation; either version 2 of the
11     License, or (at your option) any later version.  See the file
12     COPYING included with this distribution for more information.
13 */
14
15 #ifndef _AUDIO_CURVE_H_
16 #define _AUDIO_CURVE_H_
17
18 #include <sys/types.h>
19
20 #include "sysutils.h"
21
22 namespace RubberBand 
23 {
24
25 class AudioCurve
26 {
27 public:
28     AudioCurve(size_t sampleRate, size_t windowSize);
29     virtual ~AudioCurve();
30
31     virtual void setWindowSize(size_t newSize) = 0;
32     
33     virtual float process(const float *R__ mag, size_t increment) = 0;
34     virtual float processDouble(const double *R__ mag, size_t increment);
35     virtual void reset() = 0;
36
37 protected:
38     size_t m_sampleRate;
39     size_t m_windowSize;
40 };
41
42 }
43
44 #endif
45