Definition at line 216 of file SoundStreamContainer.cpp.
217{
219 std::ranges::fill(
output, 0.0);
220 return;
221 }
222
223 uint64_t frames_to_copy = std::min<size_t>(num_frames,
m_num_frames - start_frame);
224 uint64_t elements_to_copy = std::min(
226 static_cast<uint64_t
>(
output.size()));
227
230
231 if (
offset < interleaved_data.size()) {
232 uint64_t available = std::min<size_t>(elements_to_copy, interleaved_data.size() -
offset);
233 std::copy_n(interleaved_data.begin() +
offset, available,
output.begin());
234
235 if (available <
output.size()) {
236 std::fill(
output.begin() + available,
output.end(), 0.0);
237 }
238 } else {
239 std::ranges::fill(
output, 0.0);
240 }
241}
std::shared_ptr< Core::VKImage > output
std::span< const double > get_data_as_double() const
Get the audio data as a specific type.
References get_data_as_double(), m_num_channels, m_num_frames, offset, and output.
Referenced by get_frames_impl().