![]() |
Audacity 3.2.0
|
#include <ClipSegment.h>
Public Member Functions | |
| ClipSegment (const ClipInterface &, double durationToDiscard, PlaybackDirection) | |
| ~ClipSegment () override | |
| size_t | GetFloats (float *const *buffers, size_t numSamples) override |
Fills buffers with as many as numSamples or the number of remaining samples, whichever is smaller. More... | |
| bool | Empty () const override |
| Whether the segment has no more samples to provide. More... | |
| size_t | NChannels () const override |
| The number of channels in the segment. More... | |
Public Member Functions inherited from AudioSegment | |
| virtual | ~AudioSegment () |
| virtual size_t | GetFloats (float *const *buffers, size_t numSamples)=0 |
Fills buffers with as many as numSamples or the number of remaining samples, whichever is smaller. More... | |
| virtual size_t | NChannels () const =0 |
| The number of channels in the segment. More... | |
| virtual bool | Empty () const =0 |
| Whether the segment has no more samples to provide. More... | |
Private Attributes | |
| const sampleCount | mTotalNumSamplesToProduce |
| sampleCount | mTotalNumSamplesProduced = 0 |
| ClipTimeAndPitchSource | mSource |
| bool | mPreserveFormants |
| int | mCentShift |
| std::atomic< bool > | mUpdateFormantPreservation = false |
| std::atomic< bool > | mUpdateCentShift = false |
| std::unique_ptr< TimeAndPitchInterface > | mStretcher |
| Observer::Subscription | mOnSemitoneShiftChangeSubscription |
| Observer::Subscription | mOnFormantPreservationChangeSubscription |
It is important that objects of this class are instantiated and destroyed on the same thread, due to the owned Observer::Subscription.
Definition at line 30 of file ClipSegment.h.
| ClipSegment::ClipSegment | ( | const ClipInterface & | clip, |
| double | durationToDiscard, | ||
| PlaybackDirection | direction | ||
| ) |
Definition at line 41 of file ClipSegment.cpp.
References mCentShift, mUpdateCentShift, and OptimizeForVoice.
|
override |
Definition at line 69 of file ClipSegment.cpp.
References mOnFormantPreservationChangeSubscription, mOnSemitoneShiftChangeSubscription, and Observer::Subscription::Reset().
|
overridevirtual |
Whether the segment has no more samples to provide.
Implements AudioSegment.
Definition at line 95 of file ClipSegment.cpp.
References mTotalNumSamplesProduced, and mTotalNumSamplesToProduce.
|
overridevirtual |
Fills buffers with as many as numSamples or the number of remaining samples, whichever is smaller.
| buffers | Pointers to buffers, one for each channel. |
| numSamples | The max. number of samples to write to each buffer. |
Implements AudioSegment.
Definition at line 75 of file ClipSegment.cpp.
References limitSampleBufferSize(), mCentShift, mPreserveFormants, mStretcher, mTotalNumSamplesProduced, mTotalNumSamplesToProduce, mUpdateCentShift, and mUpdateFormantPreservation.
|
overridevirtual |
The number of channels in the segment.
Implements AudioSegment.
Definition at line 100 of file ClipSegment.cpp.
References mSource, and ClipTimeAndPitchSource::NChannels().
|
private |
Definition at line 47 of file ClipSegment.h.
Referenced by ClipSegment(), and GetFloats().
|
private |
Definition at line 55 of file ClipSegment.h.
Referenced by ~ClipSegment().
|
private |
Definition at line 54 of file ClipSegment.h.
Referenced by ~ClipSegment().
|
private |
Definition at line 46 of file ClipSegment.h.
Referenced by GetFloats().
|
private |
Definition at line 45 of file ClipSegment.h.
Referenced by NChannels().
|
private |
Definition at line 53 of file ClipSegment.h.
Referenced by GetFloats().
|
private |
Definition at line 44 of file ClipSegment.h.
Referenced by Empty(), and GetFloats().
|
private |
Definition at line 43 of file ClipSegment.h.
Referenced by Empty(), and GetFloats().
|
private |
Definition at line 49 of file ClipSegment.h.
Referenced by ClipSegment(), and GetFloats().
|
private |
Definition at line 48 of file ClipSegment.h.
Referenced by GetFloats().