On Thu, 04 Jan 2007 14:52:06 +0100
Sebastian Schäfer <[EMAIL PROTECTED]> wrote:
[stuff deleted]
> The new source would be great.
> Thank you very much for your efforts!
>
> > Regards,
> > Sergei.
> >
> Regards,
> Sebastian
>
OK, I have just sent Sebastian the new source.
The offending line was
(*plugin_data).bin_$MBEQ::all_ascii_bands[$#MBEQ::all_ascii_bands] =
fft_length - 1;
- it should be
(*plugin_data).bin_$MBEQ::all_ascii_bands[$#MBEQ::all_ascii_bands] =
half_fft_length - 1;
instead, i.e. the bug was having 'fft_length' instead of 'half_fft_length'.
The bug was causing memory area overrun in case of any of the last two
controls was non-default. That's why zeros did not cause the segmentation
fault, and non-zeros did.
Regarding the alignment - there is 'fftwf_malloc' function in the FFTW
suite, but it doesn't work (probably a standard C library bug), i.e. it
doesn't ensure proper alignment, so I had to use 'posix_memalign', for which
I wrote a macro:
#define POSIX_MEMALIGN_AND_CHECK(type, ptr, alignment, number_of_items,
item_size, line_number) \\
if(posix_memalign((void *)&ptr, alignment, number_of_items * item_size) != 0) \\
{\\
fprintf(stderr, "$MBEQ::__config_hash{FileLabel}: !!! ERROR !!! could not
allocate memory at line number %d of %s file\\n", line_number, __FILE__);\\
exit(1);\\
}
.
I should probably drop support of FFTW2 altogether - I am not using it
and I see no good reason for it to stay in the code - FFTW3 appears to be
better from all points of view.
But let's first try the fixes.
Regards,
Sergei.
--
Visit my http://appsfromscratch.berlios.de/ open source project.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-user