Skip to content

Commit

Permalink
Bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sadko4u committed Aug 17, 2023
1 parent 9426666 commit e73218b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/main/util/FFTCrossover.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ namespace lsp

b->vFFT = reinterpret_cast<float *>(ptr);
ptr += szof_buffer;

dsp::fill_zero(b->vFFT, bins);
}

return STATUS_OK;
Expand Down
7 changes: 4 additions & 3 deletions src/main/util/SpectralSplitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ namespace lsp
}

// Allocate buffer
size_t bins = 1 << max_rank;
size_t hdl_sz = align_size(sizeof(handler_t) * handlers, DEFAULT_ALIGN);
size_t buf_sz = sizeof(float) << max_rank;
size_t buf_sz = sizeof(float) *bins;
size_t to_alloc =
hdl_sz + // vHandlers
buf_sz + // vWindow
Expand Down Expand Up @@ -237,14 +238,14 @@ namespace lsp

// Clear buffers and reset pointers
windows::sqr_cosine(vWnd, frame_size * 2);
dsp::fill_zero(vInBuf, buf_size*2);
dsp::fill_zero(vInBuf, buf_size * BUFFER_MULTIPLIER);
dsp::fill_zero(vFftBuf, buf_size*2);

for (size_t i=0; i<nHandlers; ++i)
{
handler_t *h = &vHandlers[i];
if (h->pSink != NULL)
dsp::fill_zero(h->vOutBuf, buf_size * 2);
dsp::fill_zero(h->vOutBuf, buf_size * BUFFER_MULTIPLIER);
}

nFrameSize = frame_size * (fPhase * 0.5f);
Expand Down

0 comments on commit e73218b

Please sign in to comment.