Skip to content

Commit

Permalink
replaced memset with a loop to quell vs studio build error. (electro-…
Browse files Browse the repository at this point in the history
…smith#131)

Co-authored-by: stephenhensley <stephen.p.hensley@gmail.com>
  • Loading branch information
stephenhensley and stephenhensley authored Jan 30, 2021
1 parent 1f33b3e commit 8b7a370
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion modules/nlfilt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ void NlFilt::ProcessBlock(float *in, float *out, size_t size)
int32_t NlFilt::Set()
{
// Initializes delay buffer.
memset(delay_, 0, MAX_DELAY * sizeof(float)); // Memset
for(size_t i = 0; i < MAX_DELAY; i++)
{
delay_[i] = 0;
}
return OK;
}
5 changes: 4 additions & 1 deletion modules/reverbsc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ int ReverbSc::InitDelayLine(ReverbScDl *lp, int n)
NextRandomLineseg(lp, n);
/* clear delay line to zero */
lp->filter_state = 0.0;
memset(lp->buf, 0, sizeof(float) * lp->buffer_size);
for(int i = 0; i < lp->buffer_size; i++)
{
lp->buf[i] = 0;
}
return REVSC_OK;
}

Expand Down

0 comments on commit 8b7a370

Please sign in to comment.