; ********************************************************* ; * ; * DISTORTION/AMP routine ; * ; * ECX = buffer size ; * ESI = source/target buffer ; * ; ********************************************************* section .text bits 32 global _KZG_disto@0 _KZG_disto@0: %ifdef DEBUG mov ebp,_KZG_disto_paramstart %endif _KZG_disto_onesample: fld dword [esi] fmul dword [ebp+0] fdiv dword [ebp+4] ; fdiv dword [_KZG_disto_invpihalf] fld1 fpatan fmul dword [ebp+4] fmul dword [_KZG_disto_invpihalf] fstp dword [esi] add esi, byte 4 loop _KZG_disto_onesample ret section .data _KZG_disto_invpihalf dd 0.63661977236758134307553505349006 %ifdef DEBUG _KZG_disto_paramstart: global _KZG_disto_amp _KZG_disto_amp dd 100.0 global _KZG_disto_cliplevel _KZG_disto_cliplevel dd 0.5 %endif