#include <FileMediaFoundation.h>
Inherits cinder::audio::SourceFile.
cinder::audio::msw::SourceFileMediaFoundation::SourceFileMediaFoundation |
( |
| ) |
|
cinder::audio::msw::SourceFileMediaFoundation::SourceFileMediaFoundation |
( |
const DataSourceRef & |
dataSource, |
|
|
size_t |
sampleRate |
|
) |
| |
cinder::audio::msw::SourceFileMediaFoundation::~SourceFileMediaFoundation |
( |
| ) |
|
|
virtual |
SourceFileRef cinder::audio::msw::SourceFileMediaFoundation::cloneWithSampleRate |
( |
size_t |
sampleRate | ) |
const |
|
overridevirtual |
Returns an copy of this Source with all properties identical except the sampleRate. This is useful if the SourceFile must match a samplerate that was unknown when it was first constructed.
Implements cinder::audio::SourceFile.
size_t cinder::audio::msw::SourceFileMediaFoundation::getNumChannels |
( |
| ) |
const |
|
overridevirtual |
size_t cinder::audio::msw::SourceFileMediaFoundation::getSampleRateNative |
( |
| ) |
const |
|
overridevirtual |
size_t cinder::audio::msw::SourceFileMediaFoundation::performRead |
( |
Buffer * |
buffer, |
|
|
size_t |
bufferFrameOffset, |
|
|
size_t |
numFramesNeeded |
|
) |
| |
|
overridevirtual |
Implement to perform read of frames into buffer starting at offset bufferFrameOffset
- Returns
- the actual number of frames read.
Implements cinder::audio::Source.
void cinder::audio::msw::SourceFileMediaFoundation::performSeek |
( |
size_t |
readPositionFrames | ) |
|
|
overridevirtual |
vector< std::string > cinder::audio::msw::SourceFileMediaFoundation::getSupportedExtensions |
( |
| ) |
|
|
static |
unique_ptr< SourceFile > cinder::audio::SourceFile::create |
( |
const DataSourceRef & |
dataSource, |
|
|
size_t |
sampleRate = 0 |
|
) |
| |
|
staticinherited |
Creates a new SourceFile from dataSource, with optional output samplerate. If sampleRate equals 0 the native file's samplerate is used.
size_t cinder::audio::SourceFile::read |
( |
Buffer * |
buffer | ) |
|
|
overridevirtualinherited |
Loads either as many frames as buffer can hold, or as many as there are left.
- Returns
- number of frames read into buffer.
Implements cinder::audio::Source.
Returns a copy of this Source, with identical properties and pointing at the same data source.
BufferRef cinder::audio::SourceFile::loadBuffer |
( |
| ) |
|
|
inherited |
Loads and returns the entire contents of this SourceFile.
- Returns
- a BufferRef containing the file contents.
void cinder::audio::SourceFile::seek |
( |
size_t |
readPositionFrames | ) |
|
|
inherited |
Seek the read position to readPositionFrames.
void cinder::audio::SourceFile::seekToTime |
( |
double |
readPositionSeconds | ) |
|
|
inherited |
Seek to read position readPositionSeconds.
size_t cinder::audio::SourceFile::getReadPosition |
( |
| ) |
const |
|
inherited |
Returns the current read position in frames.
double cinder::audio::SourceFile::getReadPositionSeconds |
( |
| ) |
const |
|
inherited |
Returns the current read position in seconds.
size_t cinder::audio::SourceFile::getNumFrames |
( |
| ) |
const |
|
inherited |
Returns the length in frames.
double cinder::audio::SourceFile::getNumSeconds |
( |
| ) |
const |
|
inherited |
Returns the length in seconds.
void cinder::audio::SourceFile::setupSampleRateConversion |
( |
| ) |
|
|
protectedvirtualinherited |
Sets up samplerate conversion if needed. Can be overridden by implementation if they handle samplerate conversion in a specific way, else it is handled generically with a dsp::Converter.
size_t cinder::audio::Source::getSampleRate |
( |
| ) |
const |
|
inherited |
Returns the user facing samplerate (output).
size_t cinder::audio::Source::getMaxFramesPerRead |
( |
| ) |
const |
|
inherited |
Returns the maximum number of frames that can be read with one call to read().
virtual void cinder::audio::Source::setMaxFramesPerRead |
( |
size_t |
count | ) |
|
|
virtualinherited |
Sets the maximum number of frames that can be read in one chunk.
virtual std::string cinder::audio::Source::getMetaData |
( |
| ) |
const |
|
virtualinherited |
virtual bool cinder::audio::Source::supportsConversion |
( |
| ) |
|
|
protectedvirtualinherited |
Implementations should override and return true if they can provide samplerate conversion. If false (default), a Converter will be used if needed.
void cinder::audio::Source::setSampleRate |
( |
size_t |
sampleRate | ) |
|
|
protectedinherited |
Allows implementations to set the output samplerate.
size_t cinder::audio::SourceFile::mNumFrames |
|
protectedinherited |
size_t cinder::audio::SourceFile::mFileNumFrames |
|
protectedinherited |
size_t cinder::audio::SourceFile::mReadPos |
|
protectedinherited |
The documentation for this class was generated from the following files: