MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ resize_block()

void MayaFlux::Buffers::AudioComputeProcessor::resize_block ( uint32_t frames)
private

Definition at line 151 of file AudioComputeProcessor.cpp.

152{
153 if (frames == 0) {
154 return;
155 }
156
157 const size_t bytes = static_cast<size_t>(frames) * k_word_bytes;
158
159 if (!m_block) {
160 m_block = std::make_shared<VKBuffer>(
161 bytes, VKBuffer::Usage::HOST_STORAGE, Kakshya::DataModality::UNKNOWN);
162 bind_buffer(k_block_name, m_block);
163 m_holds_block.store(true, std::memory_order_seq_cst);
164 } else if (m_block->get_size_bytes() != bytes) {
165 m_block->resize(bytes, false);
166 }
167
168 m_frames = frames;
169}
std::atomic< bool > m_holds_block
True while m_block is allocated and bound.
void bind_buffer(const std::string &descriptor_name, const std::shared_ptr< VKBuffer > &buffer)
Bind a VKBuffer to a named shader descriptor.
@ UNKNOWN
Unknown or undefined modality.
Definition NDData.hpp:156

References MayaFlux::Buffers::ShaderProcessor::bind_buffer(), m_block, m_frames, m_holds_block, and MayaFlux::Kakshya::UNKNOWN.

Referenced by on_attach(), and process_block().

Here is the call graph for this function:
Here is the caller graph for this function: