16 #ifndef _WAVE_FILE_MODEL_H_ 17 #define _WAVE_FILE_MODEL_H_ 65 virtual int getData(
int channel,
int start,
int count,
68 virtual int getData(
int channel,
int start,
int count,
69 double *buffer)
const;
71 virtual int getData(
int fromchannel,
int tochannel,
73 float **buffers)
const;
77 virtual void getSummaries(
int channel,
int start,
int count,
79 int &blockSize)
const;
81 virtual Range
getSummary(
int channel,
int start,
int count)
const;
85 virtual void toXml(QTextStream &out,
87 QString extraAttributes =
"")
const;
AudioFileReader * m_reader
virtual int getEndFrame() const
Return the last audio frame spanned by the model.
int getSampleRate() const
Return the frame rate in frames per second.
int getNativeRate() const
Return the frame rate of the underlying material, if the model itself has already been resampled.
std::vector< float > SampleBlock
WaveFileModel(FileSource source, int targetRate=0)
std::vector< Range > RangeBlock
const ZoomConstraint * getZoomConstraint() const
If this model imposes a zoom constraint, i.e.
RangeCacheFillThread * m_fillThread
QString getTypeName() const
Return the type of the model.
int m_lastDirectReadCount
int getFrameCount() const
virtual Model * clone() const
Return a copy of this model.
bool isReady(int *) const
Return true if the model has finished loading or calculating all its data, for a model that is capabl...
RangeCacheFillThread(WaveFileModel &model)
virtual int getData(int channel, int start, int count, float *buffer) const
Get the specified set of samples from the given channel of the model in single-precision floating-poi...
static PowerOfSqrtTwoZoomConstraint m_zoomConstraint
int getFillExtent() const
virtual int getStartFrame() const
Return the first audio frame spanned by the model.
virtual void toXml(QTextStream &out, QString indent="", QString extraAttributes="") const
Stream this exportable object out to XML on a text stream.
QString getMaker() const
Return the "artist" or "maker" of the model, if known.
Model is the base class for all data models that represent any sort of data on a time scale based on ...
virtual void getSummaries(int channel, int start, int count, RangeBlock &ranges, int &blockSize) const
Return ranges from the given start frame, corresponding to the given number of underlying sample fram...
FileSource is a class used to refer to the contents of a file that may be either local or at a remote...
int getChannelCount() const
Return the number of distinct channels for this model.
Base class for models containing dense two-dimensional data (value against time) that may be meaningf...
QString getTitle() const
Return the "work title" of the model, if known.
float getValueMaximum() const
Return the minimum possible value found in this model type.
virtual Range getSummary(int channel, int start, int count) const
Return the range from the given start frame, corresponding to the given number of underlying sample f...
ZoomConstraint is a simple interface that describes a limitation on the available zoom sizes for a vi...
void setStartFrame(int startFrame)
int m_lastDirectReadStart
float getValueMinimum() const
Return the minimum possible value found in this model type.
bool isOK() const
Return true if the model was constructed successfully.
QString getLocation() const
Return the location of the data in this model (e.g.
virtual int getSummaryBlockSize(int desired) const