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


Public Member Functions

  • ~TargetFile ()
  • void
    write (const Buffer *buffer)
  • void
    write (const Buffer *buffer, size_t numFrames)
  • void
    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, std::string extension="")
  • std::unique_ptr< TargetFile >
    create (const fs::path &path, size_t sampleRate, size_t numChannels, SampleType sampleType=SampleType::INT_16, std::string extension="")

Protected Member Functions

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

Protected Attributes

  • size_t
    mSampleRate
  • size_t
    mNumChannels
  • mSampleType