32 m_path(source.getLocalFilename()),
43 SVDEBUG <<
"DecodingWavFileReader::DecodingWavFileReader(\"" 44 <<
m_path <<
"\"): rate " << targetRate << endl;
46 Profiler profiler(
"DecodingWavFileReader::DecodingWavFileReader",
true);
64 (tr(
"Decoding %1...").arg(QFileInfo(
m_path).fileName()));
67 int blockSize = 16384;
72 for (
int i = 0; i < total; i += blockSize) {
74 int count = blockSize;
75 if (i + count > total) count = total - i;
124 int blockSize = 16384;
129 for (
int i = 0; i < total; i += blockSize) {
131 int count = blockSize;
132 if (i + count > total) count = total - i;
int getChannelCount() const
static bool supportsContentType(QString type)
std::vector< float > SampleBlock
Reader for audio files using libsndfile.
static bool supports(FileSource &source)
static bool supportsExtension(QString ext)
DecodingWavFileReader(FileSource source, ResampleMode resampleMode, CacheMode cacheMode, int targetRate=0, bool normalised=false, ProgressReporter *reporter=0)
static bool supportsContentType(QString type)
void addSamplesToDecodeCache(float **samples, int nframes)
static bool supports(FileSource &source)
DecodeThread * m_decodeThread
int getFrameCount() const
static void getSupportedExtensions(std::set< QString > &extensions)
virtual ~DecodingWavFileReader()
FileSource is a class used to refer to the contents of a file that may be either local or at a remote...
static void getSupportedExtensions(std::set< QString > &extensions)
void addBlock(const SampleBlock &frames)
virtual void setProgress(int percentage)=0
virtual void getInterleavedFrames(int start, int count, SampleBlock &frames) const
Must be safe to call from multiple threads with different arguments on the same object at the same ti...
bool isDecodeCacheInitialised() const
ProgressReporter * m_reporter
virtual QString getError() const
void initialiseDecodeCache()
virtual void setMessage(QString text)=0
int getSampleRate() const
void startSerialised(QString id)
DecodingWavFileReader * m_reader
static bool supportsExtension(QString ext)
Profile point instance class.
WavFileReader * m_original