Skip to content

Commit

Permalink
Fixing issues with some of the new processors
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinchowdhury18 committed Jul 29, 2023
1 parent e71f224 commit fc21878
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/jai/krusher/bit_reduction.jai
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ krusher_bit_reduce_process_block :: (buffer: **float,
for channel : 0..num_channels-1 {
samples_remaining : s32 = num_samples;
while samples_remaining > 0 {
samples_to_process := ifx samples_remaining > small_block_size then small_block_size else samples_remaining;
samples_to_process : s32 = ifx samples_remaining > small_block_size then small_block_size else samples_remaining;
defer { samples_remaining -= samples_to_process; }

samples_float_span : []float32;
Expand Down Expand Up @@ -108,6 +108,10 @@ bit_reduce_decode :: (using br_block: Bit_Reduction_Block,
}

for br_sample, i : data {
if i >= out.count {
break;
}

if #complete filter == {
case .TYPE_0; out[i] = decode_sample(shift_amount, br_sample);
case .TYPE_1; out[i] = type1_filter (decode_sample(shift_amount, br_sample), state);
Expand Down
2 changes: 1 addition & 1 deletion src/processors/drive/flapjack/Flapjack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ ParamLayout Flapjack::createParameterLayout()
using namespace ParameterHelpers;

auto params = createBaseParams();
createPercentParameter (params, driveTag, "Drive", 0.5f);
createPercentParameter (params, driveTag, "Drive", 0.75f);
createPercentParameter (params, presenceTag, "Presence", 0.5f);
createFreqParameter (params, lowCutTag, "Low Cut", 20.0f, 750.0f, 100.0f, 100.0f);
createPercentParameter (params, levelTag, "Level", 0.5f);
Expand Down
4 changes: 2 additions & 2 deletions src/processors/drive/mouse_drive/MouseDrive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ ParamLayout MouseDrive::createParameterLayout()
using namespace ParameterHelpers;

auto params = createBaseParams();
createPercentParameter (params, "distortion", "Distortion", 0.5f);
createPercentParameter (params, "volume", "Volume", 0.5f);
createPercentParameter (params, "distortion", "Distortion", 0.75f);
createPercentParameter (params, "volume", "Volume", 0.75f);

return { params.begin(), params.end() };
}
Expand Down
3 changes: 3 additions & 0 deletions src/processors/other/krusher/krusher_fallback_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ inline void bit_reduce_decode (const Bit_Reduction_Block& br_block,

for (size_t i = 0; i < 16; ++i)
{
if (i >= out.size())
break;

const auto brr_sample = br_block.data[i];

switch (filter)
Expand Down

0 comments on commit fc21878

Please sign in to comment.