Base class that is used to create and write to an audio destination. Currently only supports .wav encoding.


Public Member Functions

  • ~TargetFile ()
  • write (const Buffer *buffer)
  • write (const Buffer *buffer, size_t numFrames)
  • write (const Buffer *buffer, size_t numFrames, size_t frameOffset)
  • size_t
    getSampleRate () const
  • size_t
    getNumChannels () const

Static Public Member Functions

  • std::unique_ptr< TargetFile >
    create (const DataTargetRef &dataTarget, size_t sampleRate, size_t numChannels, SampleType sampleType=SampleType::INT_16, const std::string &extension="")
  • std::unique_ptr< TargetFile >
    create (const fs::path &path, size_t sampleRate, size_t numChannels, SampleType sampleType=SampleType::INT_16, const std::string &extension="")

Protected Member Functions

  • TargetFile (const DataTargetRef &dataTarget, size_t sampleRate, size_t numChannels, SampleType sampleType)
  • performWrite (const Buffer *buffer, size_t numFrames, size_t frameOffset)=0

Protected Attributes

  • size_t
    mSampleRate
  • size_t
    mNumChannels
  • mSampleType