16 #ifndef _WRITABLE_WAVE_FILE_MODEL_H_ 17 #define _WRITABLE_WAVE_FILE_MODEL_H_ 38 virtual bool addSamples(
float **samples,
int count);
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 **buffer)
const;
77 virtual void getSummaries(
int channel,
int start,
int count,
80 virtual Range
getSummary(
int channel,
int start,
int count)
const;
82 QString
getTypeName()
const {
return tr(
"Writable Wave File"); }
84 virtual void toXml(QTextStream &out,
86 QString extraAttributes =
"")
const;
QString getTypeName() const
Return the type of the model.
virtual void toXml(QTextStream &out, QString indent="", QString extraAttributes="") const
Stream this exportable object out to XML on a text stream.
float getValueMinimum() const
Return the minimum possible value found in this model type.
float getValueMaximum() const
Return the minimum possible value found in this model type.
virtual Model * clone() const
Return a copy of this model.
std::vector< Range > RangeBlock
Reader for audio files using libsndfile.
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...
bool isOK() const
Return true if the model was constructed successfully.
int getFrameCount() const
virtual void setCompletion(int completion)
const ZoomConstraint * getZoomConstraint() const
If this model imposes a zoom constraint, i.e.
virtual int getCompletion() const
bool isReady(int *) const
Return true if the model has finished loading or calculating all its data, for a model that is capabl...
virtual int getStartFrame() const
Return the first audio frame spanned by the model.
void setStartFrame(int startFrame)
WritableWaveFileModel(int sampleRate, int channels, QString path="")
Model is the base class for all data models that represent any sort of data on a time scale based on ...
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...
virtual int getSummaryBlockSize(int desired) const
int getSampleRate() const
Return the frame rate in frames per second.
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...
ZoomConstraint is a simple interface that describes a limitation on the available zoom sizes for a vi...
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...
virtual int getEndFrame() const
Return the last audio frame spanned by the model.
virtual bool addSamples(float **samples, int count)
Call addSamples to append a block of samples to the end of the file.