# HG changeset patch # User Chris Cannam # Date 1434391304 -3600 # Node ID cd156ede1395a7d6bc88d390c6651aab87dda3c1 # Parent 5cbf71022679421cf570d1f0670a00702cedad96 Use in-memory cache for WAV files as well, if appropriate diff -r 5cbf71022679 -r cd156ede1395 data/fileio/AudioFileReaderFactory.cpp --- a/data/fileio/AudioFileReaderFactory.cpp Mon Jun 15 16:02:58 2015 +0100 +++ b/data/fileio/AudioFileReaderFactory.cpp Mon Jun 15 19:01:44 2015 +0100 @@ -136,9 +136,10 @@ if (reader->isOK() && (!reader->isQuicklySeekable() || normalised || + (cacheMode == CodedAudioFileReader::CacheInMemory) || (targetRate != 0 && fileRate != targetRate))) { - SVDEBUG << "AudioFileReaderFactory::createReader: WAV file rate: " << reader->getSampleRate() << ", normalised " << normalised << ", seekable " << reader->isQuicklySeekable() << ", creating decoding reader" << endl; + SVDEBUG << "AudioFileReaderFactory::createReader: WAV file rate: " << reader->getSampleRate() << ", normalised " << normalised << ", seekable " << reader->isQuicklySeekable() << ", in memory " << (cacheMode == CodedAudioFileReader::CacheInMemory) << ", creating decoding reader" << endl; delete reader; reader = new DecodingWavFileReader @@ -204,9 +205,10 @@ if (reader->isOK() && (!reader->isQuicklySeekable() || normalised || + (cacheMode == CodedAudioFileReader::CacheInMemory) || (targetRate != 0 && fileRate != targetRate))) { - SVDEBUG << "AudioFileReaderFactory::createReader: WAV file rate: " << reader->getSampleRate() << ", normalised " << normalised << ", seekable " << reader->isQuicklySeekable() << ", creating decoding reader" << endl; + SVDEBUG << "AudioFileReaderFactory::createReader: WAV file rate: " << reader->getSampleRate() << ", normalised " << normalised << ", seekable " << reader->isQuicklySeekable() << ", in memory " << (cacheMode == CodedAudioFileReader::CacheInMemory) << ", creating decoding reader" << endl; delete reader; reader = new DecodingWavFileReader