Audacity 3.2.0
|
Upstream producer of sample streams, taking Buffers as external context. More...
#include <AudioGraphSource.h>
Public Types | |
using | Buffers = AudioGraph::Buffers |
Public Member Functions | |
virtual | ~Source () |
virtual bool | AcceptsBuffers (const Buffers &buffers) const =0 |
virtual bool | AcceptsBlockSize (size_t blockSize) const =0 |
virtual std::optional< size_t > | Acquire (Buffers &data, size_t bound)=0 |
Occupy vacant space in Buffers with some data. More... | |
virtual sampleCount | Remaining () const =0 |
Result includes any amount Acquired and not yet Released. More... | |
virtual bool | Release ()=0 |
Caller is done examining last Acquire()d positions. More... | |
virtual bool | Terminates () const |
Needed only to make some postconditions assertable; defaults true. More... | |
Upstream producer of sample streams, taking Buffers as external context.
Definition at line 27 of file AudioGraphSource.h.
Definition at line 29 of file AudioGraphSource.h.
|
virtualdefault |
|
pure virtual |
Implemented in DownmixStage, MixerSource, WideSampleSource, and EffectStage.
Referenced by PerTrackEffect::ProcessTrack(), and AudioGraph::Task::Task().
|
pure virtual |
Implemented in DownmixStage, EffectStage, MixerSource, and WideSampleSource.
Referenced by PerTrackEffect::ProcessTrack(), and AudioGraph::Task::Task().
|
pure virtual |
Occupy vacant space in Buffers with some data.
May exceeed a single block of production Can assume same buffer is passed each time, while the caller advances it over the previous production, or discards it, or rotates the buffer. May rewind or rotate the buffer.
data
or nullopt to fail AcceptsBuffers(data)
AcceptsBlockSize(data.BlockSize())
bound <= data.BlockSize()
data.BlockSize() <= data.Remaining()
!result || *result <= bound
!result || *result <= data.Remaining()
!result || *result <= Remaining()
data.Remaining() > 0
!result || bound == 0 || Remaining() == 0 || *result > 0
(progress guarantee) !Terminates()
or Remaining()
was not previously defined, or is unchanged Implemented in EffectStage, MixerSource, WideSampleSource, and DownmixStage.
Referenced by Mixer::Process().
|
pure virtual |
Caller is done examining last Acquire()d positions.
May be called only after at least one successful call to Acquire()
!Terminates()
or Remaining()
reduced by what was last returned by Acquire()
Implemented in DownmixStage, EffectStage, MixerSource, and WideSampleSource.
Referenced by Mixer::Process().
|
pure virtual |
Result includes any amount Acquired and not yet Released.
May be undefined before the first successful call to Acquire()
result >= 0
Implemented in DownmixStage, EffectStage, MixerSource, and WideSampleSource.
|
virtual |
Needed only to make some postconditions assertable; defaults true.
Reimplemented in MixerSource.
Definition at line 14 of file AudioGraphSource.cpp.