WaveformOversampler.h
Go to the documentation of this file.
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2 
3 /*
4  Sonic Visualiser
5  An audio file viewer and annotation editor.
6  Centre for Digital Music, Queen Mary, University of London.
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 SV_WAVEFORM_OVERSAMPLER_H
16 #define SV_WAVEFORM_OVERSAMPLER_H
17 
18 #include "base/BaseTypes.h"
19 
21 
32 {
33 public:
42  int channel,
43  sv_frame_t sourceStartFrame,
44  sv_frame_t sourceFrameCount,
45  int oversampleBy);
46 
47 private:
49  int channel,
50  sv_frame_t sourceStartFrame,
51  sv_frame_t sourceFrameCount);
52 
53  static int m_filterRatio;
55 };
56 
57 #endif
int64_t sv_frame_t
Frame index, the unit of our time axis.
Definition: BaseTypes.h:31
std::vector< float, breakfastquay::StlAllocator< float > > floatvec_t
Definition: BaseTypes.h:53
Oversample the sample data from a DenseTimeValueModel by an integer factor, on the assumption that th...
static floatvec_t getOversampledData(const DenseTimeValueModel &source, int channel, sv_frame_t sourceStartFrame, sv_frame_t sourceFrameCount, int oversampleBy)
Return an oversampled version of the audio data from the given source sample range.
static floatvec_t m_filter
Precalculated windowed sinc FIR filter for oversampling ratio of 8.
Base class for models containing dense two-dimensional data (value against time). ...
static floatvec_t getFixedRatioData(const DenseTimeValueModel &source, int channel, sv_frame_t sourceStartFrame, sv_frame_t sourceFrameCount)