LMMS
Loading...
Searching...
No Matches
juce::AiffAudioFormatWriter Class Reference
Inheritance diagram for juce::AiffAudioFormatWriter:
juce::AudioFormatWriter

Public Member Functions

 AiffAudioFormatWriter (OutputStream *out, double rate, unsigned int numChans, unsigned int bits, const StringPairArray &metadataValues)
 ~AiffAudioFormatWriter () override
bool write (const int **data, int numSamples) override
Public Member Functions inherited from juce::AudioFormatWriter
virtual ~AudioFormatWriter ()
const StringgetFormatName () const noexcept
virtual bool flush ()
bool writeFromAudioReader (AudioFormatReader &reader, int64 startSample, int64 numSamplesToRead)
bool writeFromAudioSource (AudioSource &source, int numSamplesToRead, int samplesPerBlock=2048)
bool writeFromAudioSampleBuffer (const AudioBuffer< float > &source, int startSample, int numSamples)
bool writeFromFloatArrays (const float *const *channels, int numChannels, int numSamples)
double getSampleRate () const noexcept
int getNumChannels () const noexcept
int getBitsPerSample () const noexcept
bool isFloatingPoint () const noexcept

Private Member Functions

void writeHeader ()

Private Attributes

MemoryBlock tempBlock
MemoryBlock markChunk
MemoryBlock comtChunk
MemoryBlock instChunk
uint64 lengthInSamples = 0
uint64 bytesWritten = 0
int64 headerPosition = 0
bool writeFailed = false

Additional Inherited Members

Protected Member Functions inherited from juce::AudioFormatWriter
 AudioFormatWriter (OutputStream *destStream, const String &formatName, double sampleRate, unsigned int numberOfChannels, unsigned int bitsPerSample)
 AudioFormatWriter (OutputStream *destStream, const String &formatName, double sampleRate, const AudioChannelSet &audioChannelLayout, unsigned int bitsPerSample)
Protected Attributes inherited from juce::AudioFormatWriter
double sampleRate
unsigned int numChannels
unsigned int bitsPerSample
bool usesFloatingPointData
AudioChannelSet channelLayout
OutputStreamoutput

Constructor & Destructor Documentation

◆ AiffAudioFormatWriter()

juce::AiffAudioFormatWriter::AiffAudioFormatWriter ( OutputStream * out,
double rate,
unsigned int numChans,
unsigned int bits,
const StringPairArray & metadataValues )
inline

◆ ~AiffAudioFormatWriter()

juce::AiffAudioFormatWriter::~AiffAudioFormatWriter ( )
inlineoverride

Member Function Documentation

◆ write()

bool juce::AiffAudioFormatWriter::write ( const int ** samplesToWrite,
int numSamples )
inlineoverridevirtual

Writes a set of samples to the audio stream.

Note that if you're trying to write the contents of an AudioBuffer, you can use writeFromAudioSampleBuffer().

Parameters
samplesToWritean array of arrays containing the sample data for each channel to write. This is a zero-terminated array of arrays, and can contain a different number of channels than the actual stream uses, and the writer should do its best to cope with this. If the format is fixed-point, each channel will be formatted as an array of signed integers using the full 32-bit range -0x80000000 to 0x7fffffff, regardless of the source's bit-depth. If it is a floating-point format, you should treat the arrays as arrays of floats, and just cast it to an (int**) to pass it into the method.
numSamplesthe number of samples to write

Implements juce::AudioFormatWriter.

◆ writeHeader()

void juce::AiffAudioFormatWriter::writeHeader ( )
inlineprivate

Member Data Documentation

◆ bytesWritten

uint64 juce::AiffAudioFormatWriter::bytesWritten = 0
private

◆ comtChunk

MemoryBlock juce::AiffAudioFormatWriter::comtChunk
private

◆ headerPosition

int64 juce::AiffAudioFormatWriter::headerPosition = 0
private

◆ instChunk

MemoryBlock juce::AiffAudioFormatWriter::instChunk
private

◆ lengthInSamples

uint64 juce::AiffAudioFormatWriter::lengthInSamples = 0
private

◆ markChunk

MemoryBlock juce::AiffAudioFormatWriter::markChunk
private

◆ tempBlock

MemoryBlock juce::AiffAudioFormatWriter::tempBlock
private

◆ writeFailed

bool juce::AiffAudioFormatWriter::writeFailed = false
private

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