Just to make sure that the fft of dmath is working I wrote the attached small project which syntesizes some input waves, performs the FFT and displays input and output data in charts. (The required dmath units are included in the project, therefore, it should compile even if you don't have dmath on your system). - The result looks reasonable (I did not care about normalization of the output wave amplitudes).
As for your issue: You pass your data to the analyses function in a very unusual way. Input comes as a string, but it does not seem to be an "ordinary" string of characters, but an array of 4-byte integers. Why don't you use a simple dynamic array or one of the "vector" types of dmath? But anyway, I rewrote the above-mentioned demo to handle data in this "string" way and to use much of your code -- and it works correctly. Therefore, I guess your problem is outside, in the routine which stuffs the original data into the string passed to the CalcSpec method.