pl-nk v0.4.5
Plonk|Plink|Plank are a set of cross-platform C/C++ frameworks for audio software development
Classes | Static Public Member Functions
FilePlayUnit< SampleType > Class Template Reference

Audio file player generator. More...

List of all members.

Classes

class  Simple
 A simple file player to handle buffering and sample rate conversion. More...

Static Public Member Functions

static UnitType ar (AudioFileReader const &file, IntVariable const &loopCount=0, UnitType const &mul=SampleType(1), UnitType const &add=SampleType(0), const bool deleteWhenDone=true, BlockSize const &preferredBlockSize=BlockSize::getDefault(), SampleRate const &preferredSampleRate=SampleRate::noPreference()) throw ()
 Create an audio rate audio file player.

Detailed Description

template<class SampleType>
class FilePlayUnit< SampleType >

Audio file player generator.

The AudioFileReader object passed in must not be used by any other code.

The sample rate of the unit is by default set to the sample rate of the audio file.

NB This should not be used directly in a real-time audio thread. It should be wrapped in a TaskUnit which buffers the audio on a separate thread.

Factory functions:
  • ar (file, loopCount=0, mul=1, add=0, allowAutoDelete=true, preferredBlockSize=default, preferredSampleRate=noPref)
  • kr (file, loopCount=0, mul=1, add=0, allowAutoDelete=true)
Inputs:
  • file: (audiofilereader, multi) the audio file reader to use
  • loopCount: (value) a control to tell the file player how many times to loop (0=infinite)
  • mul: (unit, multi) the multiplier applied to the output
  • add: (unit, multi) the offset aded to the output
  • allowAutoDelete: (bool) whether this unit can be caused to be deleted by the unit it contains
  • preferredBlockSize: the preferred output block size (for advanced usage, leave on default if unsure)
  • preferredSampleRate: the preferred output sample rate (for advanced usage, leave on default if unsure)

Member Function Documentation

template<class SampleType >
static UnitType FilePlayUnit< SampleType >::ar ( AudioFileReader const &  file,
IntVariable const &  loopCount = 0,
UnitType const &  mul = SampleType (1),
UnitType const &  add = SampleType (0),
const bool  deleteWhenDone = true,
BlockSize const &  preferredBlockSize = BlockSize::getDefault(),
SampleRate const &  preferredSampleRate = SampleRate::noPreference() 
) throw () [inline, static]

Create an audio rate audio file player.


The documentation for this class was generated from the following file:
 All Classes Functions Typedefs Enumerations Enumerator Properties