Audacity 3.2.0
|
#include <WaveTrackSink.h>
Public Member Functions | |
WaveTrackSink (WaveChannel &left, WaveChannel *pRight, WaveTrack *pGenerated, sampleCount start, bool isProcessor, sampleFormat effectiveFormat) | |
~WaveTrackSink () override | |
bool | AcceptsBuffers (const Buffers &buffers) const override |
Accepts buffers only if there is at least one channel. More... | |
bool | Acquire (Buffers &data) override |
Guarantee empty space in Buffers before they are written. More... | |
bool | Release (const Buffers &data, size_t curBlockSize) override |
Acknowledge receipt of data in Buffers, which caller may then Advance() More... | |
void | Flush (Buffers &data) |
bool | IsOk () const |
Whether any errors have occurred in writing data. More... | |
Public Member Functions inherited from AudioGraph::Sink | |
virtual | ~Sink () |
virtual bool | AcceptsBuffers (const Buffers &buffers) const =0 |
virtual bool | Acquire (Buffers &data)=0 |
Guarantee empty space in Buffers before they are written. More... | |
virtual bool | Release (const Buffers &data, size_t curBlockSize)=0 |
Acknowledge receipt of data in Buffers, which caller may then Advance() More... | |
Private Member Functions | |
void | DoConsume (Buffers &data) |
Private Attributes | |
WaveChannel & | mLeft |
WaveChannel *const | mpRight |
WaveTrack *const | mpGenerated |
WaveChannel *const | mGenLeft |
WaveChannel *const | mGenRight |
const bool | mIsProcessor |
const sampleFormat | mEffectiveFormat |
sampleCount | mOutPos |
bool | mOk { true } |
Additional Inherited Members | |
Public Types inherited from AudioGraph::Sink | |
using | Buffers = AudioGraph::Buffers |
Definition at line 27 of file WaveTrackSink.h.
WaveTrackSink::WaveTrackSink | ( | WaveChannel & | left, |
WaveChannel * | pRight, | ||
WaveTrack * | pGenerated, | ||
sampleCount | start, | ||
bool | isProcessor, | ||
sampleFormat | effectiveFormat | ||
) |
effectiveFormat | This argument affects processors only, not generators |
Definition at line 20 of file WaveTrackSink.cpp.
|
overridedefault |
|
overridevirtual |
Accepts buffers only if there is at least one channel.
Implements AudioGraph::Sink.
Definition at line 37 of file WaveTrackSink.cpp.
References AudioGraph::Buffers::Channels().
|
overridevirtual |
Guarantee empty space in Buffers before they are written.
!result || data.BlockSize() <= data.Remaining()
Implements AudioGraph::Sink.
Definition at line 42 of file WaveTrackSink.cpp.
References AudioGraph::Buffers::BlockSize(), DoConsume(), IsOk(), and AudioGraph::Buffers::Remaining().
|
private |
data.Channels() > 0
data.BlockSize() <= data.Remaining()
Definition at line 61 of file WaveTrackSink.cpp.
References WaveChannel::Append(), AudioGraph::Buffers::BlockSize(), AudioGraph::Buffers::Channels(), floatSample, AudioGraph::Buffers::GetReadPosition(), mEffectiveFormat, mGenLeft, mGenRight, mIsProcessor, mLeft, mOk, mOutPos, mpRight, AudioGraph::Buffers::Position(), AudioGraph::Buffers::Remaining(), AudioGraph::Buffers::Rewind(), and WaveChannel::Set().
Referenced by Acquire(), and Flush().
void WaveTrackSink::Flush | ( | Buffers & | data | ) |
data.Channels() > 0
data.BlockSize() <= data.Remaining()
Definition at line 97 of file WaveTrackSink.cpp.
References DoConsume(), WaveTrack::Flush(), and mpGenerated.
|
inline |
Whether any errors have occurred in writing data.
Definition at line 47 of file WaveTrackSink.h.
Referenced by Acquire().
|
overridevirtual |
Acknowledge receipt of data in Buffers, which caller may then Advance()
AcceptsBuffers(data)
curBlockSize <= data.BlockSize()
Implements AudioGraph::Sink.
Definition at line 55 of file WaveTrackSink.cpp.
|
private |
Definition at line 62 of file WaveTrackSink.h.
Referenced by DoConsume().
|
private |
Definition at line 59 of file WaveTrackSink.h.
Referenced by DoConsume().
|
private |
Definition at line 60 of file WaveTrackSink.h.
Referenced by DoConsume().
|
private |
Definition at line 61 of file WaveTrackSink.h.
Referenced by DoConsume().
|
private |
Definition at line 56 of file WaveTrackSink.h.
Referenced by DoConsume().
|
private |
Definition at line 65 of file WaveTrackSink.h.
Referenced by DoConsume().
|
private |
Definition at line 64 of file WaveTrackSink.h.
Referenced by DoConsume().
|
private |
Definition at line 58 of file WaveTrackSink.h.
Referenced by Flush().
|
private |
Definition at line 57 of file WaveTrackSink.h.
Referenced by DoConsume().