Audacity 3.2.0
|
#include <AudioSegmentSampleView.h>
Public Member Functions | |
AudioSegmentSampleView (std::vector< BlockSampleView > blockViews, size_t start, size_t length) | |
Constructs an AudioSegmentSampleView from BlockSampleView s. More... | |
AudioSegmentSampleView (size_t length) | |
Constructs a silent AudioSegmentSampleView . More... | |
void | Copy (float *buffer, size_t bufferSize) const |
Copies up to GetSampleCount() or bufferSize samples, whichever is less, into buffer . Samples after that are zeroed. More... | |
void | AddTo (float *buffer, size_t bufferSize) const |
Adds up to GetSampleCount() or bufferSize samples, whichever is less, into buffer . Samples after that are left unchanged. More... | |
size_t | GetSampleCount () const |
The number of samples in this view. More... | |
Private Member Functions | |
void | DoCopy (float *buffer, size_t bufferSize) const |
void | DoAdd (float *buffer, size_t bufferSize) const |
Private Attributes | |
const std::vector< BlockSampleView > | mBlockViews |
const size_t | mStart = 0 |
const size_t | mLength |
const bool | mIsSilent |
Definition at line 25 of file AudioSegmentSampleView.h.
AudioSegmentSampleView::AudioSegmentSampleView | ( | std::vector< BlockSampleView > | blockViews, |
size_t | start, | ||
size_t | length | ||
) |
Constructs an AudioSegmentSampleView
from BlockSampleView
s.
blockViews | A continuous sequence of samples, segmented in blocks. |
start | Index of the first sample in blockViews to look at. |
length | The number of samples from start to look at. |
!blockViews.empty()
start < blockViews[0].size()
Audacity: A Digital Audio Editor
Matthieu Hodgkinson
Definition at line 17 of file AudioSegmentSampleView.cpp.
References mBlockViews.
AudioSegmentSampleView::AudioSegmentSampleView | ( | size_t | length | ) |
Constructs a silent AudioSegmentSampleView
.
length | The number of "silence samples". |
Definition at line 31 of file AudioSegmentSampleView.cpp.
void AudioSegmentSampleView::AddTo | ( | float * | buffer, |
size_t | bufferSize | ||
) | const |
Adds up to GetSampleCount()
or bufferSize
samples, whichever is less, into buffer
. Samples after that are left unchanged.
Definition at line 43 of file AudioSegmentSampleView.cpp.
References DoAdd(), and mIsSilent.
void AudioSegmentSampleView::Copy | ( | float * | buffer, |
size_t | bufferSize | ||
) | const |
Copies up to GetSampleCount()
or bufferSize
samples, whichever is less, into buffer
. Samples after that are zeroed.
Definition at line 37 of file AudioSegmentSampleView.cpp.
References DoCopy(), and mIsSilent.
Referenced by ClipTimeAndPitchSource::Pull().
|
private |
Definition at line 61 of file AudioSegmentSampleView.cpp.
References limitSampleBufferSize(), mBlockViews, min(), mLength, and mStart.
Referenced by AddTo(), and DoCopy().
|
private |
Definition at line 55 of file AudioSegmentSampleView.cpp.
References DoAdd().
Referenced by Copy().
size_t AudioSegmentSampleView::GetSampleCount | ( | ) | const |
The number of samples in this view.
Definition at line 50 of file AudioSegmentSampleView.cpp.
References mLength.
|
private |
Definition at line 67 of file AudioSegmentSampleView.h.
Referenced by AudioSegmentSampleView(), and DoAdd().
|
private |
Definition at line 70 of file AudioSegmentSampleView.h.
|
private |
Definition at line 69 of file AudioSegmentSampleView.h.
Referenced by DoAdd(), and GetSampleCount().
|
private |
Definition at line 68 of file AudioSegmentSampleView.h.
Referenced by DoAdd().