Skip to content

Commit

Permalink
Fixing memset bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinchowdhury18 committed Jul 24, 2023
1 parent f465196 commit bc25c41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/jai/krusher/bit_reduction.jai
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ krusher_bit_reduce_process_block :: (buffer: **float,
samples_float_span.data = buffer[channel] + num_samples - samples_remaining;
samples_float_span.count = samples_to_process;

memset(*samples_int, 0, size_of(s32) * small_block_size);
memset(*samples_int, 0, size_of(s16) * small_block_size);
samples_int_span : []s16;
samples_int_span.data = samples_int.data;
samples_int_span.count = samples_to_process;
Expand Down Expand Up @@ -84,7 +84,7 @@ decode_sample :: inline (shift: u8, x: u16) -> s16 #no_context {
bit_reduce_decode :: (using br_block: Bit_Reduction_Block,
out: []s16,
filter: BR_Filter,
using state: *Krusher_Bit_Reducer_Filter_State) #no_context {
state: *Krusher_Bit_Reducer_Filter_State) #no_context {

type1_filter :: inline (nibble_2r: s16, using state: *Krusher_Bit_Reducer_Filter_State) -> s16 #no_context {
y := cast(s32) nibble_2r + ((p1 * 15) >> 4);
Expand Down
2 changes: 1 addition & 1 deletion src/processors/other/krusher/Krusher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ ParamLayout Krusher::createParameterLayout()
&stringToFloatVal);
emplace_param<chowdsp::ChoiceParameter> (params,
"bit_reduction_filter",
"Order",
"Smoothq",
StringArray { "Zero-Order", "First-Order", "Second-Order", "Third-Order" },
1);
createPercentParameter (params, "mix", "Mix", 1.0f);
Expand Down

0 comments on commit bc25c41

Please sign in to comment.