tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | List of all members
tracktion::engine::MemoryMappedFileReader Struct Reference

FallbackReader that wraps a MemoryMappedFile which usually improves read speeds. More...

#include "tracktion_MemoryMappedFileReader.h"

Inheritance diagram for tracktion::engine::MemoryMappedFileReader:
tracktion::engine::FallbackReader juce::AudioFormatReader

Public Member Functions

 MemoryMappedFileReader (std::unique_ptr< AudioFileUtils::MappedFileAndReader > mappedFileAndReader)
 Creates a MemoryMappedFileReader for a MappedFileAndReader.
 
void setReadTimeout (int) override
 Subclassed must override this to set the timeout.
 
bool readSamples (int *const *destSamples, int numDestChannels, int startOffsetInDestBuffer, juce::int64 startSampleInFile, int numSamples) override
 
- Public Member Functions inherited from tracktion::engine::FallbackReader
 FallbackReader ()
 Constructor.
 
- Public Member Functions inherited from juce::AudioFormatReader
const StringgetFormatName () const noexcept
 
bool read (float *const *destChannels, int numDestChannels, int64 startSampleInSource, int numSamplesToRead)
 
bool read (int *const *destChannels, int numDestChannels, int64 startSampleInSource, int numSamplesToRead, bool fillLeftoverChannelsWithCopies)
 
bool read (AudioBuffer< float > *buffer, int startSampleInDestBuffer, int numSamples, int64 readerStartSample, bool useReaderLeftChan, bool useReaderRightChan)
 
virtual void readMaxLevels (int64 startSample, int64 numSamples, Range< float > *results, int numChannelsToRead)
 
virtual void readMaxLevels (int64 startSample, int64 numSamples, float &lowestLeft, float &highestLeft, float &lowestRight, float &highestRight)
 
int64 searchForLevel (int64 startSample, int64 numSamplesToSearch, double magnitudeRangeMinimum, double magnitudeRangeMaximum, int minimumConsecutiveSamples)
 
virtual AudioChannelSet getChannelLayout ()
 

Additional Inherited Members

- Public Attributes inherited from juce::AudioFormatReader
double sampleRate
 
unsigned int bitsPerSample
 
int64 lengthInSamples
 
unsigned int numChannels
 
bool usesFloatingPointData
 
StringPairArray metadataValues
 
InputStreaminput
 
- Protected Member Functions inherited from juce::AudioFormatReader
 AudioFormatReader (InputStream *sourceStream, const String &formatName)
 
- Static Protected Member Functions inherited from juce::AudioFormatReader
static void clearSamplesBeyondAvailableLength (int *const *destChannels, int numDestChannels, int startOffsetInDestBuffer, int64 startSampleInFile, int &numSamples, int64 fileLengthInSamples)
 

Detailed Description

FallbackReader that wraps a MemoryMappedFile which usually improves read speeds.

Definition at line 19 of file tracktion_MemoryMappedFileReader.h.

Constructor & Destructor Documentation

◆ MemoryMappedFileReader()

tracktion::engine::MemoryMappedFileReader::MemoryMappedFileReader ( std::unique_ptr< AudioFileUtils::MappedFileAndReader mappedFileAndReader)

Creates a MemoryMappedFileReader for a MappedFileAndReader.

Definition at line 22 of file tracktion_MemoryMappedFileReader.h.

Member Function Documentation

◆ readSamples()

bool tracktion::engine::MemoryMappedFileReader::readSamples ( int *const *  destSamples,
int  numDestChannels,
int  startOffsetInDestBuffer,
juce::int64  startSampleInFile,
int  numSamples 
)
overridevirtual

Implements juce::AudioFormatReader.

Definition at line 39 of file tracktion_MemoryMappedFileReader.h.

◆ setReadTimeout()

void tracktion::engine::MemoryMappedFileReader::setReadTimeout ( int  timeoutMilliseconds)
overridevirtual

Subclassed must override this to set the timeout.

A value of less than 0 means wait forever, A value of 0 means don't wait A value greater than 0 means wait for the given number of ms

Implements tracktion::engine::FallbackReader.

Definition at line 34 of file tracktion_MemoryMappedFileReader.h.


The documentation for this struct was generated from the following file: