Code: Select all

```
Procedure SincInterpolation(*buffer_audio_ptr, *sinc_table_ptr, *out_buffer_ptr, *dummy)
!XOR Ecx, Ecx
!XOR Edx, Edx
!MOV Ecx, [p.p_sinc_table_ptr]
!MOV Edx, [p.p_buffer_audio_ptr]
!SUB Edx, 2048
!PXOR xmm4, xmm4
!PXOR xmm5, xmm5
For i=0 To 256
!PXOR xmm3, xmm3 ; R
!PXOR xmm1, xmm1 ; L
!PXOR xmm0, xmm0 ; sinc
!MOVSD xmm0, [Ecx] ; sinc
!ADD Ecx, 8 ; sinc double table
!MOVSS xmm1, [Edx] ; L
!ADD Edx,4
!MOVSS xmm3, [Edx] ; R
!ADD Edx,12 ;
!CVTSS2SD xmm1, xmm1
!CVTSS2SD xmm3, xmm3
!mulpd xmm1, xmm0 ; sinc x L
!mulpd xmm3, xmm0 ; sinc x R
!ADDPD xmm4, xmm1 ; pcmdata2 L ++
!ADDPD xmm5, xmm3 ; pcmdata2 R ++
Next i
!CVTSD2SS xmm4, xmm4
!CVTSD2SS xmm5, xmm5
!XOR Edx, Edx
!MOV Edx, [p.p_out_buffer_ptr]
!MOVSS [Edx], xmm4
!MOVSS [Edx+4], xmm5
!XOR Ecx, Ecx
!XOR Edx, Edx
EndProcedure
```