A view into a sub-range of an AudioFileData.
More...
#include <subsection_reader.hpp>
|
| | AudioSubsectionReader ()=default |
| | AudioSubsectionReader (const AudioFileData &source, uint64_t start_frame, uint64_t length_frames) |
| | Create a subsection from frame start_frame to start_frame + length_frames.
|
| uint64_t | num_frames () const |
| | Number of frames in this subsection.
|
| uint32_t | num_channels () const |
| | Number of channels.
|
| uint32_t | sample_rate () const |
| | Sample rate (inherited from source).
|
| float | sample (uint32_t channel, uint64_t frame) const |
| | Read a frame from this subsection.
|
| void | read_frames (float *dest, uint32_t channel, uint64_t start, uint64_t count) const |
| | Copy frames from this subsection into a destination buffer.
|
| AudioFileData | extract () const |
| | Extract this subsection as a new AudioFileData (copies data).
|
| double | duration_seconds () const |
| | Duration in seconds.
|
| bool | is_valid () const |
| | Whether this reader has a valid source.
|
A view into a sub-range of an AudioFileData.
Does not copy the audio data — references the original.
◆ AudioSubsectionReader() [1/2]
| pulp::audio::AudioSubsectionReader::AudioSubsectionReader |
( |
| ) |
|
|
default |
◆ AudioSubsectionReader() [2/2]
| pulp::audio::AudioSubsectionReader::AudioSubsectionReader |
( |
const AudioFileData & | source, |
|
|
uint64_t | start_frame, |
|
|
uint64_t | length_frames ) |
|
inline |
Create a subsection from frame start_frame to start_frame + length_frames.
◆ duration_seconds()
| double pulp::audio::AudioSubsectionReader::duration_seconds |
( |
| ) |
const |
|
inline |
◆ extract()
| AudioFileData pulp::audio::AudioSubsectionReader::extract |
( |
| ) |
const |
|
inline |
◆ is_valid()
| bool pulp::audio::AudioSubsectionReader::is_valid |
( |
| ) |
const |
|
inline |
Whether this reader has a valid source.
◆ num_channels()
| uint32_t pulp::audio::AudioSubsectionReader::num_channels |
( |
| ) |
const |
|
inline |
◆ num_frames()
| uint64_t pulp::audio::AudioSubsectionReader::num_frames |
( |
| ) |
const |
|
inline |
Number of frames in this subsection.
◆ read_frames()
| void pulp::audio::AudioSubsectionReader::read_frames |
( |
float * | dest, |
|
|
uint32_t | channel, |
|
|
uint64_t | start, |
|
|
uint64_t | count ) const |
|
inline |
Copy frames from this subsection into a destination buffer.
◆ sample()
| float pulp::audio::AudioSubsectionReader::sample |
( |
uint32_t | channel, |
|
|
uint64_t | frame ) const |
|
inline |
Read a frame from this subsection.
◆ sample_rate()
| uint32_t pulp::audio::AudioSubsectionReader::sample_rate |
( |
| ) |
const |
|
inline |
Sample rate (inherited from source).
The documentation for this class was generated from the following file: