Skip to content

Commit

Permalink
fix upc bug with short IR
Browse files Browse the repository at this point in the history
  • Loading branch information
MicahStrange committed Jul 15, 2024
1 parent 42a5b06 commit ca2e6de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zones_convolver/time_distributed/TimeDistributedNUPC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ TimeDistributedNUPC::TimeDistributedNUPC (juce::dsp::AudioBlock<const float> ir_
auto partition_scheme = GetPartitionScheme (kGarciaResults, max_block_size_, ir_num_samples);

const auto upc_layout = partition_scheme.front ();
auto offset = upc_layout.GetSubConvolverSizeSamples (max_block_size_);
auto offset = std::min (upc_layout.GetSubConvolverSizeSamples (max_block_size_),
static_cast<int> (ir_block.getNumSamples ()));

auto upc_ir_segment = ir_block.getSubBlock (0, offset);
upc_ = std::make_unique<UniformPartitionedConvolver> (spec, upc_ir_segment);
Expand Down

0 comments on commit ca2e6de

Please sign in to comment.