NetRadioLoryaPhantomRecord : SuperBass netradio For HIGH END AUDIO [Windows]

Share your advanced PureBasic knowledge/code with the community.
User avatar
oryaaaaa
Addict
Addict
Posts: 825
Joined: Mon Jan 12, 2004 11:40 pm
Location: Okazaki, JAPAN

NetRadioLoryaPhantomRecord : SuperBass netradio For HIGH END AUDIO [Windows]

Post by oryaaaaa »

NetRadioLoryaPhantomRecord : SuperBass netradio For HIGH END AUDIO [Windows]
Support CPU: Core i7-13700 or Core i7-14700 Disabled E-cores Disable HT only

Code: Select all

; NetRadioLoryaPhantomRecord : SuperBass netradio For HIGH END AUDIO [Windows]
  
MessageRequester("End","Compiler options Executable Format Console And CPU With MMX") : End

;- "CopyMemoryMaya.pbi" Start (DLL: CPU with MMX)
; Macro CopyMemoryMace_Inside
;   !PSLLW mm1, mm0 ;1  Left 1bit shift
;   !PSLLW mm1, mm0 ;2  Left 1bit shift
;   !PSLLW mm1, mm0 ;3  Left 1bit shift
;   !PSLLW mm1, mm0 ;4  Left 1bit shift
;   !PSLLW mm1, mm0 ;5  Left 1bit shift
;   !PSLLW mm1, mm0 ;6  Left 1bit shift
;   !PSLLW mm1, mm0 ;7  Left 1bit shift
;   !PSLLW mm1, mm0 ;8  Left 1bit shift
;   !PSLLW mm1, mm0 ;9  Left 1bit shift
;   !PSLLW mm1, mm0 ;A  Left 1bit shift
;   !PSLLW mm1, mm0 ;B  Left 1bit shift
;   !PSLLW mm1, mm0 ;C  Left 1bit shift
;   !PSLLW mm1, mm0 ;D  Left 1bit shift
;   !PSLLW mm1, mm0 ;E  Left 1bit shift
;   !PSLLW mm1, mm0 ;F  Left 1bit shift
;   !PSLLW mm1, mm0 ;0  Left 1bit shift
;   !PSLLW mm2, mm0 ;1  Left 1bit shift
;   !PSLLW mm2, mm0 ;2  Left 1bit shift
;   !PSLLW mm2, mm0 ;3  Left 1bit shift
;   !PSLLW mm2, mm0 ;4  Left 1bit shift
;   !PSLLW mm2, mm0 ;5  Left 1bit shift
;   !PSLLW mm2, mm0 ;6  Left 1bit shift
;   !PSLLW mm2, mm0 ;7  Left 1bit shift
;   !PSLLW mm2, mm0 ;8  Left 1bit shift
;   !PSLLW mm2, mm0 ;9  Left 1bit shift
;   !PSLLW mm2, mm0 ;A  Left 1bit shift
;   !PSLLW mm2, mm0 ;B  Left 1bit shift
;   !PSLLW mm2, mm0 ;C  Left 1bit shift
;   !PSLLW mm2, mm0 ;D  Left 1bit shift
;   !PSLLW mm2, mm0 ;E  Left 1bit shift
;   !PSLLW mm2, mm0 ;F  Left 1bit shift
;   !PSLLW mm2, mm0 ;0  Left 1bit shift
;   !PSLLW mm3, mm0 ;1  Left 1bit shift
;   !PSLLW mm3, mm0 ;2  Left 1bit shift
;   !PSLLW mm3, mm0 ;3  Left 1bit shift
;   !PSLLW mm3, mm0 ;4  Left 1bit shift
;   !PSLLW mm3, mm0 ;5  Left 1bit shift
;   !PSLLW mm3, mm0 ;6  Left 1bit shift
;   !PSLLW mm3, mm0 ;7  Left 1bit shift
;   !PSLLW mm3, mm0 ;8  Left 1bit shift
;   !PSLLW mm3, mm0 ;9  Left 1bit shift
;   !PSLLW mm3, mm0 ;A  Left 1bit shift
;   !PSLLW mm3, mm0 ;B  Left 1bit shift
;   !PSLLW mm3, mm0 ;C  Left 1bit shift
;   !PSLLW mm3, mm0 ;D  Left 1bit shift
;   !PSLLW mm3, mm0 ;E  Left 1bit shift
;   !PSLLW mm3, mm0 ;F  Left 1bit shift
;   !PSLLW mm3, mm0 ;0  Left 1bit shift
;   !PSLLW mm4, mm0 ;1  Left 1bit shift
;   !PSLLW mm4, mm0 ;2  Left 1bit shift
;   !PSLLW mm4, mm0 ;3  Left 1bit shift
;   !PSLLW mm4, mm0 ;4  Left 1bit shift
;   !PSLLW mm4, mm0 ;5  Left 1bit shift
;   !PSLLW mm4, mm0 ;6  Left 1bit shift
;   !PSLLW mm4, mm0 ;7  Left 1bit shift
;   !PSLLW mm4, mm0 ;8  Left 1bit shift
;   !PSLLW mm4, mm0 ;9  Left 1bit shift
;   !PSLLW mm4, mm0 ;A  Left 1bit shift
;   !PSLLW mm4, mm0 ;B  Left 1bit shift
;   !PSLLW mm4, mm0 ;C  Left 1bit shift
;   !PSLLW mm4, mm0 ;D  Left 1bit shift
;   !PSLLW mm4, mm0 ;E  Left 1bit shift
;   !PSLLW mm4, mm0 ;F  Left 1bit shift
;   !PSLLW mm4, mm0 ;0  Left 1bit shift
;   !PSLLW mm5, mm0 ;1  Left 1bit shift
;   !PSLLW mm5, mm0 ;2  Left 1bit shift
;   !PSLLW mm5, mm0 ;3  Left 1bit shift
;   !PSLLW mm5, mm0 ;4  Left 1bit shift
;   !PSLLW mm5, mm0 ;5  Left 1bit shift
;   !PSLLW mm5, mm0 ;6  Left 1bit shift
;   !PSLLW mm5, mm0 ;7  Left 1bit shift
;   !PSLLW mm5, mm0 ;8  Left 1bit shift
;   !PSLLW mm5, mm0 ;9  Left 1bit shift
;   !PSLLW mm5, mm0 ;A  Left 1bit shift
;   !PSLLW mm5, mm0 ;B  Left 1bit shift
;   !PSLLW mm5, mm0 ;C  Left 1bit shift
;   !PSLLW mm5, mm0 ;D  Left 1bit shift
;   !PSLLW mm5, mm0 ;E  Left 1bit shift
;   !PSLLW mm5, mm0 ;F  Left 1bit shift
;   !PSLLW mm5, mm0 ;0  Left 1bit shift
;   !PSLLW mm6, mm0 ;1  Left 1bit shift
;   !PSLLW mm6, mm0 ;2  Left 1bit shift
;   !PSLLW mm6, mm0 ;3  Left 1bit shift
;   !PSLLW mm6, mm0 ;4  Left 1bit shift
;   !PSLLW mm6, mm0 ;5  Left 1bit shift
;   !PSLLW mm6, mm0 ;6  Left 1bit shift
;   !PSLLW mm6, mm0 ;7  Left 1bit shift
;   !PSLLW mm6, mm0 ;8  Left 1bit shift
;   !PSLLW mm6, mm0 ;9  Left 1bit shift
;   !PSLLW mm6, mm0 ;A  Left 1bit shift
;   !PSLLW mm6, mm0 ;B  Left 1bit shift
;   !PSLLW mm6, mm0 ;C  Left 1bit shift
;   !PSLLW mm6, mm0 ;D  Left 1bit shift
;   !PSLLW mm6, mm0 ;E  Left 1bit shift
;   !PSLLW mm6, mm0 ;F  Left 1bit shift
;   !PSLLW mm6, mm0 ;0  Left 1bit shift
;   !PSLLW mm7, mm0 ;1  Left 1bit shift
;   !PSLLW mm7, mm0 ;2  Left 1bit shift
;   !PSLLW mm7, mm0 ;3  Left 1bit shift
;   !PSLLW mm7, mm0 ;4  Left 1bit shift
;   !PSLLW mm7, mm0 ;5  Left 1bit shift
;   !PSLLW mm7, mm0 ;6  Left 1bit shift
;   !PSLLW mm7, mm0 ;7  Left 1bit shift
;   !PSLLW mm7, mm0 ;8  Left 1bit shift
;   !PSLLW mm7, mm0 ;9  Left 1bit shift
;   !PSLLW mm7, mm0 ;A  Left 1bit shift
;   !PSLLW mm7, mm0 ;B  Left 1bit shift
;   !PSLLW mm7, mm0 ;C  Left 1bit shift
;   !PSLLW mm7, mm0 ;D  Left 1bit shift
;   !PSLLW mm7, mm0 ;E  Left 1bit shift
;   !PSLLW mm7, mm0 ;F  Left 1bit shift
;   !PSLLW mm7, mm0 ;0  Left 1bit shift
;   !PSLLW mm1, mm0 ;1  Left 1bit shift
;   !PSLLW mm1, mm0 ;2  Left 1bit shift
;   !PSLLW mm2, mm0 ;1  Left 1bit shift
;   !PSLLW mm2, mm0 ;2  Left 1bit shift
;   !PSLLW mm3, mm0 ;1  Left 1bit shift
;   !PSLLW mm3, mm0 ;2  Left 1bit shift
;   !PSLLW mm4, mm0 ;1  Left 1bit shift
;   !PSLLW mm4, mm0 ;2  Left 1bit shift
;   !PSLLW mm5, mm0 ;1  Left 1bit shift
;   !PSLLW mm5, mm0 ;2  Left 1bit shift
;   !PSLLW mm6, mm0 ;1  Left 1bit shift
;   !PSLLW mm6, mm0 ;2  Left 1bit shift
;   !PSLLW mm7, mm0 ;1  Left 1bit shift
;   !PSLLW mm7, mm0 ;2  Left 1bit shift
; EndMacro
; 
; Macro CopyMemoryMace_InsideSetup
;   !MOV dl, cl
;   !SUB cl, dl
;   !MOVZX Rcx, cl
;   !INC cl
;   !MOVZX Rcx, cl
;   !MOVQ mm1, Rcx
;   !PSLLW mm0, mm1 ;1  Left 1bit shift
;   !PSLLW mm0, mm1 ;2  Left 1bit shift
;   !PSLLW mm0, mm1 ;3  Left 1bit shift
;   !PSLLW mm0, mm1 ;4  Left 1bit shift
;   !PSLLW mm0, mm1 ;5  Left 1bit shift
;   !PSLLW mm0, mm1 ;6  Left 1bit shift
;   !PSLLW mm0, mm1 ;7  Left 1bit shift
;   !PSLLW mm0, mm1 ;8  Left 1bit shift
;   !PSLLW mm0, mm1 ;9  Left 1bit shift
;   !PSLLW mm0, mm1 ;A  Left 1bit shift
;   !PSLLW mm0, mm1 ;B  Left 1bit shift
;   !PSLLW mm0, mm1 ;C  Left 1bit shift
;   !PSLLW mm0, mm1 ;D  Left 1bit shift
;   !PSLLW mm0, mm1 ;E  Left 1bit shift
;   !PSLLW mm0, mm1 ;F  Left 1bit shift
;   !PSLLW mm0, mm1 ;0  Left 1bit shift
;   !MOVQ mm0, mm1
; EndMacro
; 
; ProcedureDLL CopyMemoryMaya(dummyRcx.i,dummyRdx.i,dummyR8.i,dummyR9.i, CMM_length.i, *CMM_in, *CMM_out)
;   CopyMemoryMace_InsideSetup
;   CopyMemoryMace_Inside
;   Protected CMM_D48.i, CMM_D40.i, CMM_D32.i, CMM_D24.i, CMM_D16.i, CMM_D8.i
;   !SHL R8b,1
;   !SHL R8b,1
;   !SHL R8b,1
;   !SHL R8b,1
;   !SHL R8b,1
;   !SHL R8b,1
;   !SHL R8b,1
;   !SHL R8b,1
;   !MOVZX R8, R8b
;   !INC R8b
;   !INC R8b
;   !INC R8b
;   !INC R8b
;   !INC R8b
;   !INC R8b
;   !INC R8b
;   !INC R8b
;   !MOVZX R8, R8b
;   !MOVQ mm1, R8
;   !MOVNTQ QWORD [p.v_CMM_D8], mm1
;   !PADDQ mm2, mm1
;   !PADDQ mm2, mm1
;   !MOVNTQ QWORD [p.v_CMM_D16], mm2
;   !PADDQ mm3, mm1
;   !PADDQ mm3, mm1
;   !PADDQ mm3, mm1
;   !MOVNTQ QWORD [p.v_CMM_D24], mm3
;   !PADDQ mm4, mm1
;   !PADDQ mm4, mm1
;   !PADDQ mm4, mm1
;   !PADDQ mm4, mm1
;   !MOVNTQ QWORD [p.v_CMM_D32], mm4
;   !PADDQ mm5, mm1
;   !PADDQ mm5, mm1
;   !PADDQ mm5, mm1
;   !PADDQ mm5, mm1
;   !PADDQ mm5, mm1
;   !MOVNTQ QWORD [p.v_CMM_D40], mm5
;   !PADDQ mm6, mm1
;   !PADDQ mm6, mm1
;   !PADDQ mm6, mm1
;   !PADDQ mm6, mm1
;   !PADDQ mm6, mm1
;   !PADDQ mm6, mm1
;   !MOVNTQ QWORD [p.v_CMM_D48], mm6
;   ;
;   If dummyRcx=dummyRdx And dummyR8=dummyR9 And dummyRcx=dummyR8 And dummyRdx=dummyR9
;     !HLT
;   EndIf
;   CopyMemoryMace_Top:
;   If CMM_length>=CMM_D48
;     CMM_length - CMM_D48
;     CopyMemoryMace_InsideSetup
;     !LEA Rcx, [p.v_CMM_length]
;     !MOV R8, [p.p_CMM_in]
;     !MOV R9, [p.p_CMM_out]
;     !MOV Rax, [Rcx]
;     CopyMemoryMace_Inside
;     !MOVQ mm1, QWORD [R8+Rax]
;     !MOVQ mm2, QWORD [R8+Rax+$8]
;     !MOVQ mm3, QWORD [R8+Rax+$10]
;     !MOVQ mm4, QWORD [R8+Rax+$18]
;     !MOVQ mm5, QWORD [R8+Rax+$20]
;     !MOVQ mm6, QWORD [R8+Rax+$28]
;     !MOVNTQ QWORD [R9+Rax], mm1
;     !MOVNTQ QWORD [R9+Rax+$8], mm2
;     !MOVNTQ QWORD [R9+Rax+$10], mm3
;     !MOVNTQ QWORD [R9+Rax+$18], mm4
;     !MOVNTQ QWORD [R9+Rax+$20], mm5
;     !MOVNTQ QWORD [R9+Rax+$28], mm6
;     Goto CopyMemoryMace_Top
;   ElseIf CMM_length>=CMM_D40
;     CMM_length - CMM_D40
;     CopyMemoryMace_InsideSetup
;     !LEA Rcx, [p.v_CMM_length]
;     !MOV R8, [p.p_CMM_in]
;     !MOV R9, [p.p_CMM_out]
;     !MOV Rax, [Rcx]
;     CopyMemoryMace_Inside
;     !MOVQ mm1, QWORD [R8+Rax]
;     !MOVQ mm2, QWORD [R8+Rax+$8]
;     !MOVQ mm3, QWORD [R8+Rax+$10]
;     !MOVQ mm4, QWORD [R8+Rax+$18]
;     !MOVQ mm5, QWORD [R8+Rax+$20]
;     !MOVNTQ QWORD [R9+Rax], mm1
;     !MOVNTQ QWORD [R9+Rax+$8], mm2
;     !MOVNTQ QWORD [R9+Rax+$10], mm3
;     !MOVNTQ QWORD [R9+Rax+$18], mm4
;     !MOVNTQ QWORD [R9+Rax+$20], mm5
;     Goto CopyMemoryMace_Top
;   ElseIf CMM_length>=CMM_D32
;     CMM_length - CMM_D32
;     CopyMemoryMace_InsideSetup
;     !LEA Rcx, [p.v_CMM_length]
;     !MOV R8, [p.p_CMM_in]
;     !MOV R9, [p.p_CMM_out]
;     !MOV Rax, [Rcx]
;     CopyMemoryMace_Inside
;     !MOVQ mm1, QWORD [R8+Rax]
;     !MOVQ mm2, QWORD [R8+Rax+$8]
;     !MOVQ mm3, QWORD [R8+Rax+$10]
;     !MOVQ mm4, QWORD [R8+Rax+$18]
;     !MOVNTQ QWORD [R9+Rax], mm1
;     !MOVNTQ QWORD [R9+Rax+$8], mm2
;     !MOVNTQ QWORD [R9+Rax+$10], mm3
;     !MOVNTQ QWORD [R9+Rax+$18], mm4
;     Goto CopyMemoryMace_Top
;   ElseIf CMM_length>=CMM_D24
;     CMM_length - CMM_D24
;     CopyMemoryMace_InsideSetup
;     !MOV R8, [p.p_CMM_in]
;     !MOV R9, [p.p_CMM_out]
;     CopyMemoryMace_Inside
;     !MOVQ mm1, QWORD [R8]
;     !MOVQ mm2, QWORD [R8+$8]
;     !MOVQ mm3, QWORD [R8+$10]
;     !MOVNTQ QWORD [R9], mm1
;     !MOVNTQ QWORD [R9+$8], mm2
;     !MOVNTQ QWORD [R9+$10], mm3
;     Goto CopyMemoryMace_Top
;   ElseIf CMM_length>=CMM_D16
;     CMM_length - CMM_D16
;     CopyMemoryMace_InsideSetup
;     !MOV R8, [p.p_CMM_in]
;     !MOV R9, [p.p_CMM_out]
;     CopyMemoryMace_Inside
;     !MOVQ mm1, QWORD [R8]
;     !MOVQ mm2, QWORD [R8+$8]
;     !MOVNTQ QWORD [R9], mm1
;     !MOVNTQ QWORD [R9+$8], mm2
;     Goto CopyMemoryMace_Top
;   ElseIf CMM_length>=CMM_D8
;     CMM_length - CMM_D8
;     CopyMemoryMace_InsideSetup
;     !MOV R8, [p.p_CMM_in]
;     !MOV R9, [p.p_CMM_out]
;     CopyMemoryMace_Inside
;     !MOVQ mm1, QWORD [R8]
;     !MOVNTQ QWORD [R9], mm1
;     Goto CopyMemoryMace_Top
;   EndIf
;   !EMMS
; EndProcedure
; 
; ProcedureDLL ClearMemoryMaya(dummyRcx.i,dummyRdx.i,dummyR8.i,dummyR9.i, CMM_length.i, *CMM_in, *CMM_out)
;   CopyMemoryMace_Inside
;   Protected CMM_D48.i, CMM_D40.i, CMM_D32.i, CMM_D24.i, CMM_D16.i, CMM_D8.i
;   !SHL R8b,1
;   !SHL R8b,1
;   !SHL R8b,1
;   !SHL R8b,1
;   !SHL R8b,1
;   !SHL R8b,1
;   !SHL R8b,1
;   !SHL R8b,1
;   !MOVZX R8, R8b
;   !INC R8b
;   !INC R8b
;   !INC R8b
;   !INC R8b
;   !INC R8b
;   !INC R8b
;   !INC R8b
;   !INC R8b
;   !MOVZX R8, R8b
;   !MOVQ mm1, R8
;   !MOVNTQ QWORD [p.v_CMM_D8], mm1
;   !PADDQ mm2, mm1
;   !PADDQ mm2, mm1
;   !MOVNTQ QWORD [p.v_CMM_D16], mm2
;   !PADDQ mm3, mm1
;   !PADDQ mm3, mm1
;   !PADDQ mm3, mm1
;   !MOVNTQ QWORD [p.v_CMM_D24], mm3
;   !PADDQ mm4, mm1
;   !PADDQ mm4, mm1
;   !PADDQ mm4, mm1
;   !PADDQ mm4, mm1
;   !MOVNTQ QWORD [p.v_CMM_D32], mm4
;   !PADDQ mm5, mm1
;   !PADDQ mm5, mm1
;   !PADDQ mm5, mm1
;   !PADDQ mm5, mm1
;   !PADDQ mm5, mm1
;   !MOVNTQ QWORD [p.v_CMM_D40], mm5
;   !PADDQ mm6, mm1
;   !PADDQ mm6, mm1
;   !PADDQ mm6, mm1
;   !PADDQ mm6, mm1
;   !PADDQ mm6, mm1
;   !PADDQ mm6, mm1
;   !MOVNTQ QWORD [p.v_CMM_D48], mm6
;   If dummyRcx=dummyRdx And dummyR8=dummyR9 And dummyRcx=dummyR8 And dummyRdx=dummyR9
;     !HLT
;   EndIf
;   ClearMemoryMaya_Top:
;   If CMM_length>=CMM_D48
;     CMM_length - CMM_D48
;     CopyMemoryMace_InsideSetup
;     !LEA Rcx, [p.v_CMM_length]
;     !MOV R8, [p.p_CMM_in]
;     !MOV R9, [p.p_CMM_out]
;     !MOV Rax, [Rcx]
;     CopyMemoryMace_Inside
;     !MOVQ mm1, QWORD [R8]
;     !MOVQ mm2, QWORD [R8]
;     !MOVQ mm3, QWORD [R8]
;     !MOVQ mm4, QWORD [R8]
;     !MOVQ mm5, QWORD [R8]
;     !MOVQ mm6, QWORD [R8]
;     !MOVNTQ QWORD [R9+Rax], mm1
;     !MOVNTQ QWORD [R9+Rax+$8], mm2
;     !MOVNTQ QWORD [R9+Rax+$10], mm3
;     !MOVNTQ QWORD [R9+Rax+$18], mm4
;     !MOVNTQ QWORD [R9+Rax+$20], mm5
;     !MOVNTQ QWORD [R9+Rax+$28], mm6
;     Goto ClearMemoryMaya_Top
;   ElseIf CMM_length>=CMM_D40
;     CMM_length - CMM_D40
;     CopyMemoryMace_InsideSetup
;     !LEA Rcx, [p.v_CMM_length]
;     !MOV R8, [p.p_CMM_in]
;     !MOV R9, [p.p_CMM_out]
;     !MOV Rax, [Rcx]
;     CopyMemoryMace_Inside
;     !MOVQ mm1, QWORD [R8]
;     !MOVQ mm2, QWORD [R8]
;     !MOVQ mm3, QWORD [R8]
;     !MOVQ mm4, QWORD [R8]
;     !MOVQ mm5, QWORD [R8]
;     !MOVNTQ QWORD [R9+Rax], mm1
;     !MOVNTQ QWORD [R9+Rax+$8], mm2
;     !MOVNTQ QWORD [R9+Rax+$10], mm3
;     !MOVNTQ QWORD [R9+Rax+$18], mm4
;     !MOVNTQ QWORD [R9+Rax+$20], mm5
;     Goto ClearMemoryMaya_Top
;   ElseIf CMM_length>=CMM_D32
;     CMM_length - CMM_D32
;     CopyMemoryMace_InsideSetup
;     !LEA Rcx, [p.v_CMM_length]
;     !MOV R8, [p.p_CMM_in]
;     !MOV R9, [p.p_CMM_out]
;     !MOV Rax, [Rcx]
;     CopyMemoryMace_Inside
;     !MOVQ mm1, QWORD [R8]
;     !MOVQ mm2, QWORD [R8]
;     !MOVQ mm3, QWORD [R8]
;     !MOVQ mm4, QWORD [R8]
;     !MOVNTQ QWORD [R9+Rax], mm1
;     !MOVNTQ QWORD [R9+Rax+$8], mm2
;     !MOVNTQ QWORD [R9+Rax+$10], mm3
;     !MOVNTQ QWORD [R9+Rax+$18], mm4
;     Goto ClearMemoryMaya_Top
;   ElseIf CMM_length>=CMM_D24
;     CMM_length - CMM_D24
;     CopyMemoryMace_InsideSetup
;     !MOV R8, [p.p_CMM_in]
;     !MOV R9, [p.p_CMM_out]
;     CopyMemoryMace_Inside
;     !MOVQ mm1, QWORD [R8]
;     !MOVQ mm2, QWORD [R8]
;     !MOVQ mm3, QWORD [R8]
;     !MOVNTQ QWORD [R9], mm1
;     !MOVNTQ QWORD [R9+$8], mm2
;     !MOVNTQ QWORD [R9+$10], mm3
;     Goto ClearMemoryMaya_Top
;   ElseIf CMM_length>=CMM_D16
;     CMM_length - CMM_D16
;     CopyMemoryMace_InsideSetup
;     !MOV R8, [p.p_CMM_in]
;     !MOV R9, [p.p_CMM_out]
;     CopyMemoryMace_Inside
;     !MOVQ mm1, QWORD [R8]
;     !MOVQ mm2, QWORD [R8]
;     !MOVNTQ QWORD [R9], mm1
;     !MOVNTQ QWORD [R9+$8], mm2
;     Goto ClearMemoryMaya_Top
;   ElseIf CMM_length>=CMM_D8
;     CMM_length - CMM_D8
;     CopyMemoryMace_InsideSetup
;     !MOV R8, [p.p_CMM_in]
;     !MOV R9, [p.p_CMM_out]
;     CopyMemoryMace_Inside
;     !MOVQ mm1, QWORD [R8]
;     !MOVNTQ QWORD [R9], mm1
;     Goto ClearMemoryMaya_Top
;   EndIf
;   !EMMS
; EndProcedure
;- "CopyMemoryMaya.pbi" end

; IncludeFile "CopyMemoryMaya6.pbi"
Import "CopyMemoryMaya.lib"
  CopyMemoryMaya(dummyRcx.i,dummyRdx.i,dummyR8.i,dummyR9.i, CMM_length.i, *CMM_in, *CMM_out)
  ClearMemoryMaya(dummyRcx.i,dummyRdx.i,dummyR8.i,dummyR9.i, CMM_length.i, *CMM_in, *CMM_out)
EndImport
Global dummyRcx.i,dummyRdx.i,dummyR8.i,dummyR9.i
!MOV cl, R8b
!SUB R8b, cl
!MOVZX R8, R8b
!INC R8b
!MOVZX R8, R8b
!MOVNTI QWORD [v_dummyRcx], R8
!INC R8b
!MOVZX R8, R8b
!MOVNTI QWORD [v_dummyRdx], R8
!INC R8b
!MOVZX R8, R8b
!MOVNTI QWORD [v_dummyR8], R8
!INC R8b
!MOVZX R8, R8b
!MOVNTI QWORD [v_dummyR9], R8


Macro MOV_Rax_Rax_Up_Down
  !MOV al, al
  !MOV ah, ah
  !MOV ax, ax
  !MOV Rax, Rax
  !MOV ax, ax
  !MOV ah, ah
  !MOV al, al
EndMacro

Macro MOV_Rbx_Rbx_Up_Down
  !MOV bl, bl
  !MOV bh, bh
  !MOV bx, bx
  !MOV Rbx, Rbx
  !MOV bx, bx
  !MOV bh, bh
  !MOV bl, bl
EndMacro

Macro MOV_Rcx_Rcx_Up_Down
  !MOV cl, cl
  !MOV ch, ch
  !MOV cx, cx
  !MOV Rcx, Rcx
  !MOV cx, cx
  !MOV ch, ch
  !MOV cl, cl
EndMacro

Macro MOV_Rdx_Rdx_Up_Down
  !MOV dl, dl
  !MOV dh, dh
  !MOV dx, dx
  !MOV Rdx, Rdx
  !MOV dx, dx
  !MOV dh, dh
  !MOV dl, dl
EndMacro

Macro MOV_R8_R8_Up_Down
  !MOV R8b, R8b
  !MOV R8w, R8w
  !MOV R8, R8
  !MOV R8w, R8w
  !MOV R8b, R8b
EndMacro

Macro MOV_R9_R9_Up_Down
  !MOV R9b, R9b
  !MOV R9w, R9w
  !MOV R9, R9
  !MOV R9w, R9w
  !MOV R9b, R9b
EndMacro

Macro MOV_R10_R10_Up_Down
  !MOV R10b, R10b
  !MOV R10w, R10w
  !MOV R10, R10
  !MOV R10w, R10w
  !MOV R10b, R10b
EndMacro

Macro MOV_R11_R11_Up_Down
  !MOV R11b, R11b
  !MOV R11w, R11w
  !MOV R11, R11
  !MOV R11w, R11w
  !MOV R11b, R11b
EndMacro

Macro MOV_R12_R12_Up_Down
  !MOV R12b, R12b
  !MOV R12w, R12w
  !MOV R12, R12
  !MOV R12w, R12w
  !MOV R12b, R12b
EndMacro

Macro MOV_R13_R13_Up_Down
  !MOV R13b, R13b
  !MOV R13w, R13w
  !MOV R13, R13
  !MOV R13w, R13w
  !MOV R13b, R13b
EndMacro

Macro MOV_R14_R14_Up_Down
  !MOV R14b, R14b
  !MOV R14w, R14w
  !MOV R14, R14
  !MOV R14w, R14w
  !MOV R14b, R14b
EndMacro

Macro MOV_R15_R15_Up_Down
  !MOV R15b, R15b
  !MOV R15w, R15w
  !MOV R15, R15
  !MOV R15w, R15w
  !MOV R15b, R15b
EndMacro

Macro MOV_Rsp_Rsp_Up_Down
  !MOV spl, spl
  !MOV sp, sp
  !MOV Rsp, Rsp
  !MOV sp, sp
  !MOV spl, spl
EndMacro

Macro MOV_Rbp_Rbp_Up_Down
  !MOV bpl, bpl
  !MOV bp, bp
  !MOV Rbp, Rbp
  !MOV bp, bp
  !MOV bpl, bpl
EndMacro

Macro MOV_Rsi_Rsi_Up_Down
  !MOV sil, sil
  !MOV si, si
  !MOV Rsi, Rsi
  !MOV si, si
  !MOV sil, sil
EndMacro

Macro MOV_Rdi_Rdi_Up_Down
  !MOV dil, dil
  !MOV di, di
  !MOV Rdi, Rdi
  !MOV di, di
  !MOV dil, dil
EndMacro

Macro SIMPLE_MOVE_REGISTERS_Up_and_Down
  MOV_Rax_Rax_Up_Down
  MOV_Rdx_Rdx_Up_Down
  MOV_Rsp_Rsp_Up_Down
  MOV_Rsi_Rsi_Up_Down
  MOV_R8_R8_Up_Down
  MOV_R10_R10_Up_Down
  MOV_R12_R12_Up_Down
  MOV_R14_R14_Up_Down
  MOV_Rbx_Rbx_Up_Down
  MOV_Rcx_Rcx_Up_Down
  MOV_Rbp_Rbp_Up_Down
  MOV_Rdi_Rdi_Up_Down
  MOV_R9_R9_Up_Down
  MOV_R11_R11_Up_Down
  MOV_R13_R13_Up_Down
  MOV_R15_R15_Up_Down
EndMacro

Import "bass.lib"
  BASS_Init.l(device.l,Freq.l,flags.l,win.l,*dsguid)
  BASS_Free.l()
  BASS_StreamCreateURL.l(*url, offset.l, flags.l, *proc, *user);
  BASS_StreamFree.l(handle.l)
  BASS_ChannelGetAttribute.l(handle.l,attrib.l,*value)
  BASS_ChannelGetData.l(handle.l,*buffer,length.l)
  BASS_ChannelStop.l(handle.l)
  BASS_SetConfig.l(option.l, value.l)
EndImport

Structure BASS_ASIO_DEVICEINFO
  *name
  *driver
EndStructure

Import "bassasio.lib"
  BASS_ASIO_GetDeviceInfo.l(device.l, *info.BASS_ASIO_DEVICEINFO)
  BASS_ASIO_Init.l(device.l, flags.l)
  BASS_ASIO_Free.l()
  ;CALL CyberAttack = BASS_ASIO_ControlPanel.l() = Startup ControlPanel.exe
  BASS_ASIO_CheckRate.l(rate.d)
  BASS_ASIO_SetRate.l(rate.d)
  BASS_ASIO_Start.l(buflen.l, threads.l)
  BASS_ASIO_Stop.l()
  ;CALL DumpAudioAmplifier = BASS_ASIO_IsStarted.l(), then ASIOproc() return enable flag.
  BASS_ASIO_ChannelEnable.l(input.l, channel.l, *proc, *User)
  BASS_ASIO_ChannelJoin.l(input.l, channel.l, channel2.l)
  BASS_ASIO_ChannelSetFormat.l(input.l, channel.l, format.l)
  BASS_ASIO_ChannelSetVolume.l(input.l, channel.l, volume.f)
  BASS_ASIO_ErrorGetCode.l()
EndImport

#BASS_ASIO_THREAD = 1
Global PreferenceFile.s, Asio_Device_Global.i, WASAPI_device_format.i, ERRMES1A.s
PreferenceFile = GetPathPart(ProgramFilename())+"GetAsioDeviceName.txt"
If OpenPreferences(PreferenceFile)
  ExaminePreferenceKeys()
  While  NextPreferenceKey() ; While a key exists
    SIMPLE_MOVE_REGISTERS_Up_and_Down
    Asio_Device_Global = Val(PreferenceKeyValue())
    WASAPI_device_format = BASS_ASIO_Init(Asio_Device_Global, #BASS_ASIO_THREAD)
    If WASAPI_device_format And BASS_ASIO_CheckRate(44100.0)
      Global DRVSND.BASS_ASIO_DEVICEINFO
      BASS_ASIO_GetDeviceInfo(Asio_Device_Global, @DRVSND)
      Global DRVSND_DLL.i, *DRVSND_BUF, DRVSND_FILENAME.s
      DRVSND_FILENAME = PeekS(DRVSND\driver, -1, #PB_Ascii)
      ;c:\program files\singxer\usb audio device driver\x64\singxerusbaudioasio_x64.dll
      DRVSND_DLL = ReadFile(#PB_Any, DRVSND_FILENAME, #PB_File_NoBuffering)
      If DRVSND_DLL
        *DRVSND_BUF = AllocateMemory(Lof(DRVSND_DLL)+8192-Lof(DRVSND_DLL)%8192, #PB_Memory_NoClear)
        ReadData(DRVSND_DLL, *DRVSND_BUF, Lof(DRVSND_DLL) )
        CloseFile(DRVSND_DLL)
        Global *DRVSND_0F2B, *DRVSND_C5FDE7, *DRVSND_C5FE6F
        *DRVSND_0F2B = AllocateMemory(8192, #PB_Memory_NoClear)
        CopyMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, 8, ?DRVSND_0F2B_data, *DRVSND_0F2B)
        DataSection
          DRVSND_0F2B_data:
          Data.b $0F, $2B, $0, $0, $0, $0, $0, $0
        EndDataSection
        Debug Str(*DRVSND_0F2B) + " " + Str(*DRVSND_0F2B+8)
        *DRVSND_C5FDE7 = AllocateMemory(8192, #PB_Memory_NoClear)
        CopyMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, 8, ?DRVSND_C5FDE7_data, *DRVSND_C5FDE7)
        DataSection
          DRVSND_C5FDE7_data:
          Data.b $C5, $FD, $E7,  $0, $0, $0, $0, $0
        EndDataSection
        Debug Str(*DRVSND_C5FDE7) + " " + Str(*DRVSND_C5FDE7+8)
        *DRVSND_C5FE6F = AllocateMemory(8192, #PB_Memory_NoClear)
        CopyMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, 8, ?DRVSND_C5FE6F_data, *DRVSND_C5FE6F)
        DataSection
          DRVSND_C5FE6F_data:
          Data.b $C5, $FE, $6F,  $0, $0, $0, $0, $0
        EndDataSection
        Debug Str(*DRVSND_C5FE6F) + " " + Str(*DRVSND_C5FE6F+8)
        Global DRVSND_POS.i
        Global *DRVSND_CACHE
        Global NewList *DRVSND_CACHE_LIST()
        Debug "SSE"
        For DRVSND_POS = 0 To MemorySize(*DRVSND_BUF)
          If CompareMemory(*DRVSND_BUF+DRVSND_POS, *DRVSND_0F2B, 2)
            Debug Str(*DRVSND_BUF+DRVSND_POS) + " " + Str(*DRVSND_BUF+DRVSND_POS+8)
            AddElement(*DRVSND_CACHE_LIST())
            *DRVSND_CACHE_LIST() = *DRVSND_BUF+DRVSND_POS
          EndIf
        Next
        ; 0F2B
        ; ; 0000E7EB  C3                ret
        ; ; 0000E7EC  0F1F4000          nop dword [rax+0x0]
        ; ; 0000E7F0  0F2B01            movntps oword [rcx],xmm0
        ; ; 0000E7F3  0F2B4110          movntps oword [rcx+0x10],xmm0
        ; ; 0000E7F7  4881C180000000    add rcx,0x80
        ; ; 0000E7FE  0F2B41A0          movntps oword [rcx-0x60],xmm0
        ; ; 0000E802  0F2B41B0          movntps oword [rcx-0x50],xmm0
        ; ; 0000E806  49FFC9            dec r9
        ; ; 0000E809  0F2B41C0          movntps oword [rcx-0x40],xmm0
        ; ; 0000E80D  0F2B41D0          movntps oword [rcx-0x30],xmm0
        ; ; 0000E811  0F2B41E0          movntps oword [rcx-0x20],xmm0
        ; ; 0000E815  0F2B41F0          movntps oword [rcx-0x10],xmm0
        ; ; 0000E819  75D5              jnz 0xe7f0
        ; ; 0000E81B  0FAEF8            sfence
        Debug "AVX"
        For DRVSND_POS = 0 To MemorySize(*DRVSND_BUF)
          If CompareMemory(*DRVSND_BUF+DRVSND_POS, *DRVSND_C5FDE7, 3)
            Debug Str(*DRVSND_BUF+DRVSND_POS) + " " + Str(*DRVSND_BUF+DRVSND_POS+8)
            AddElement(*DRVSND_CACHE_LIST())
            *DRVSND_CACHE_LIST() = *DRVSND_BUF+DRVSND_POS
          EndIf
        Next
        For DRVSND_POS = 0 To MemorySize(*DRVSND_BUF)
          If CompareMemory(*DRVSND_BUF+DRVSND_POS, *DRVSND_C5FE6F, 3)
            Debug Str(*DRVSND_BUF+DRVSND_POS) + " " + Str(*DRVSND_BUF+DRVSND_POS+8)
            AddElement(*DRVSND_CACHE_LIST())
            *DRVSND_CACHE_LIST() = *DRVSND_BUF+DRVSND_POS
          EndIf
        Next
        ; C5FDE7
        ; ; 0000ED5D  C3                ret
        ; ; 0000ED5E  6690              xchg ax,ax
        ; ; 0000ED60  C5FE6F0A          vmovqqu ymm1,yword [rdx]
        ; ; 0000ED64  C5FE6F5220        vmovqqu ymm2,yword [rdx+0x20]
        ; ; 0000ED69  C5FE6F5A40        vmovqqu ymm3,yword [rdx+0x40]
        ; ; 0000ED6E  C5FE6F6260        vmovqqu ymm4,yword [rdx+0x60]
        ; ; 0000ED73  C5FDE709          vmovntqq yword [rcx],ymm1
        ; ; 0000ED77  C5FDE75120        vmovntqq yword [rcx+0x20],ymm2
        ; ; 0000ED7C  C5FDE75940        vmovntqq yword [rcx+0x40],ymm3
        ; ; 0000ED81  C5FDE76160        vmovntqq yword [rcx+0x60],ymm4
        ; ; 0000ED86  C5FE6F8A80000000  vmovqqu ymm1,yword [rdx+0x80]
        ; ; 0000ED8E  C5FE6F92A0000000  vmovqqu ymm2,yword [rdx+0xa0]
        ; ; 0000ED96  C5FE6F9AC0000000  vmovqqu ymm3,yword [rdx+0xc0]
        ; ; 0000ED9E  C5FE6FA2E0000000  vmovqqu ymm4,yword [rdx+0xe0]
        ; ; 0000EDA6  C5FDE78980000000  vmovntqq yword [rcx+0x80],ymm1
        ; ; 0000EDAE  C5FDE791A0000000  vmovntqq yword [rcx+0xa0],ymm2
        ; ; 0000EDB6  C5FDE799C0000000  vmovntqq yword [rcx+0xc0],ymm3
        ; ; 0000EDBE  C5FDE7A1E0000000  vmovntqq yword [rcx+0xe0],ymm4
        ; ; 0000EDC6  4881C100010000    add rcx,0x100
        ; ; 0000EDCD  4881C200010000    add rdx,0x100
        ; ; 0000EDD4  4981E800010000    sub r8,0x100
        ; ; 0000EDDB  4981F800010000    cmp r8,0x100
        ; ; 0000EDE2  0F8378FFFFFF      jnc qword 0xed60
      EndIf
      If ListSize(*DRVSND_CACHE_LIST())=0
        ClosePreferences()
        BASS_ASIO_Free()
        ERRMES1A= "The device is not support. Tested XMOS v5.30 only."+Chr(13)+Chr(10)+Chr(13)+Chr(10)
        !JMP ERROR_STARTUP_END
      EndIf
      ClosePreferences()
      Goto StartupProcess
    ElseIf WASAPI_device_format
      BASS_ASIO_Free()
    EndIf
  Wend
  ClosePreferences()
EndIf
Select BASS_ASIO_ErrorGetCode()
  Case 23 ; BASS_ERROR_DEVICE
    ERRMES1A="The device number specified is invalid. Retry GetAsioDeviceName."+Chr(13)+Chr(10)+Chr(13)+Chr(10)
  Case 14 ; BASS_ERROR_ALREADY
    ERRMES1A="The device has already been initialized. Re-Start Windows."+Chr(13)+Chr(10)+Chr(13)+Chr(10)
  Case 3 ; BASS_ERROR_DRIVER
    ERRMES1A="The driver could not be initialized. USB-DAC Power Refresh."+Chr(13)+Chr(10)+Chr(13)+Chr(10)
  Default
    ERRMES1A="Create GetAsioDeviceName.txt and Edit device list."+Chr(13)+Chr(10)+"Try GetAsioDeviceName. Setup 44.1kHz Latency 4 ms ( 256 samples )"+Chr(13)+Chr(10)+Chr(13)+Chr(10)
EndSelect
!JMP ERROR_STARTUP_END
StartupProcess:
Global Fd_44100.d
; v_Fd_44100 = 44100.0
!MOV cl, R8b
!SUB R8b, cl
!MOVZX R8, R8b
!MOV ch, cl
!SUB cl, ch
!MOVZX Rcx, cl
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVQ xmm14, R8
!MOVSD [v_Fd_44100], xmm14
BASS_ASIO_SetRate(Fd_44100)
; BASS_ASIO_ControlPanel()
BASS_ASIO_Free()
Global DRVcacheMax.i
DRVcacheMax = ListSize(*DRVSND_CACHE_LIST())
Global Dim *DRVSND_Cache(DRVcacheMax)
ForEach *DRVSND_CACHE_LIST()
  *DRVSND_Cache(ListIndex(*DRVSND_CACHE_LIST())) = *DRVSND_CACHE_LIST()
Next

DRVSND_FILENAME = ReverseString( ReverseString( GetFilePart(DRVSND_FILENAME) ) )

; void lowpass(float input[], float output[], int size, float samplerate, float freq, float q)
; rocedure lowpass(*output, size.i, samplerate.d)
Structure lowpass
  *buffer_in
  Length.i
  Freq_double.d
  ThreadID.i
EndStructure

Procedure lowpass(*param.lowpass)
  Protected *output, size.i, samplerate.d
  *output = *param\buffer_in
  size = *param\Length
  samplerate = *param\Freq_double
  Protected D4.i
  ; p.v_D4 = 4
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !INC cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !MOVNTI [p.v_D4], R8
  !NOP [Rip]
  !NOP [p.v_D4]
  
  Protected D8.i
  ; p.v_D8 = 8
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !INC cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !MOVNTI [p.v_D8], R8
  
  Protected D0.i
  ; p.v_D0 = 0
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !MOVNTI [p.v_D0], R8
  !NOP [Rip]
  !NOP [p.v_D0]
  
  Protected D1.i
  ; p.v_D1 = 1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !INC R8b
  !MOVNTI [p.v_D1], R8
  !NOP [Rip]
  !NOP [p.v_D1]
  ;
  Protected D9801.i
  ; p.v_D9801 = 9801
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !INC cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !MOVNTI [p.v_D9801], R8
  !NOP [Rip]
  !NOP [p.v_D9801]
  
  Protected F_2_0_d.d, F_1_0_d.d
  ;
  ; p.v_F_1_0_d = 1.0
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !INC cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !MOVQ xmm14, R8
  !MOVSD [p.v_F_1_0_d], xmm14
  !NOP [Rip]
  !NOP [p.v_F_1_0_d]
  ;
  ; p.v_F_2_0_d = 2.0
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !INC cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !MOVQ xmm14, R8
  !MOVSD [p.v_F_2_0_d], xmm14
  !NOP [Rip]
  !NOP [p.v_F_2_0_d]
  ;
  Protected in1.d, in2.d, out1.d, out2.d, pos.i
  Protected in3.d, in4.d, out3.d, out4.d, in1pre.d, in3pre.d
  Protected Freq_d1.d, Freq_d2.d, Freq_d3.d, Freq_d4.d
  ;
  ; // 1st 3.141592653
  !NOP QWORD [Rip]
  !NOP cx
  !NOP QWORD [Rip]
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !NOP QWORD [Rip]
  !NOP R8w
  !NOP QWORD [Rip]
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !INC cl
  !MOVZX Rcx, cl
  ; 100000000001001001000011111101101010100001011111110100100111000
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  ;
  !MOVQ xmm5, R8
  !MOVSD [p.v_Freq_d1], xmm5
  !NOP QWORD [Rip]
  !NOP QWORD [p.v_Freq_d1]
  ; // 1st 3.141592653 End
  ;
  ; // 2nd 589793
  !NOP QWORD [Rip]
  !NOP cx
  !NOP QWORD [Rip]
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !NOP QWORD [Rip]
  !NOP R9w
  !NOP QWORD [Rip]
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !MOVZX R9, R9b
  !INC cl
  !MOVZX Rcx, cl
  ; 11111000000100010000111101111111000100011110111011100100011001
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !MOVQ xmm5, R9
  !MOVSD [p.v_Freq_d2], xmm5
  !NOP QWORD [Rip]
  !NOP QWORD [p.v_Freq_d2]
  ; // 2nd 589793 End
  ;
  ; // 3rd 238462
  !NOP QWORD [Rip]
  !NOP cx
  !NOP QWORD [Rip]
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !NOP QWORD [Rip]
  !NOP R8w
  !NOP QWORD [Rip]
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !INC cl
  !MOVZX Rcx, cl
  ; 11110010110001001011101101100011110100110011000000010010000001
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !MOVQ xmm5, R8
  !MOVSD [p.v_Freq_d3], xmm5
  !NOP QWORD [Rip]
  !NOP QWORD [p.v_Freq_d3]
  ; //  3rd 238462 End
  ;
  ; // 4th 643383
  !NOP QWORD [Rip]
  !NOP cx
  !NOP QWORD [Rip]
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !NOP QWORD [Rip]
  !NOP R9w
  !NOP QWORD [Rip]
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !MOVZX R9, R9b
  !INC cl
  !MOVZX Rcx, cl
  ; 11101110001000010011100110101100100111000100000011010110110011
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !MOVQ xmm5, R9
  !MOVSD [p.v_Freq_d4], xmm5
  !NOP QWORD [Rip]
  !NOP QWORD [p.v_Freq_d4]
  ; // 4th 643383 End
  
  Macro omega
    F_2_0_d * Freq_d1 * D9801 / samplerate + F_2_0_d * Freq_d2 * D9801 / samplerate + F_2_0_d * Freq_d3 * D9801 / samplerate + F_2_0_d * Freq_d4 * D9801 / samplerate
  EndMacro
  
  Protected LPFcalcA.d, LPFcalcB.d, LPFcalcD.d, LPFcalcE.d
  ;
  LPFcalcA = ((F_1_0_d - Cos(omega)) / F_2_0_d)/(F_1_0_d + Sin(omega) / (F_2_0_d * Log10(D8)))
  LPFcalcB = (F_1_0_d - Cos(omega))/(F_1_0_d + Sin(omega) / (F_2_0_d * Log10(D8)))
  LPFcalcD = ( -F_2_0_d * Cos(omega))/(F_1_0_d + Sin(omega) / (F_2_0_d * Log10(D8)))
  LPFcalcE = (F_1_0_d - Sin(omega) / (F_2_0_d * Log10(D8)))/(F_1_0_d + Sin(omega) / (F_2_0_d * Log10(D8)))
  
  For pos=D0 To size-D1 Step 8
    in1pre = PeekF(*output+pos)
    PokeF(*output+pos, LPFcalcA * PeekF(*output+pos)+ LPFcalcB * in1 + LPFcalcA * in2 - LPFcalcD * out1 - LPFcalcE * out2)
    Swap in1, in2
    in1 = in1pre
    Swap out1, out2
    out1 = PeekF(*output+pos)
    
    in3pre = PeekF(*output+pos+D4)
    PokeF(*output+pos+D4, LPFcalcA * PeekF(*output+pos+D4)+ LPFcalcB * in3 + LPFcalcA *in4 - LPFcalcD * out3 - LPFcalcE * out4)
    Swap in3, in4
    in3 = in3pre
    Swap out3, out4
    out3 = PeekF(*output+pos+D4)
    
    !NOP QWORD [Rip]
    !NOP QWORD [Rip]
  Next
EndProcedure

Macro BassCache
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ASIO_ChannelEnable]
  !NOP QWORD [BASS_ASIO_ChannelEnable+8]
  !NOP QWORD [BASS_ASIO_ChannelEnable+16]
  !NOP QWORD [BASS_ASIO_ChannelEnable+24]
  !NOP QWORD [BASS_ASIO_ChannelEnable+32]
  !NOP QWORD [BASS_ASIO_ChannelEnable+40]
  !NOP QWORD [BASS_ASIO_ChannelEnable+48]
  !NOP QWORD [BASS_ASIO_ChannelEnable+56]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ASIO_ChannelJoin]
  !NOP QWORD [BASS_ASIO_ChannelJoin+8]
  !NOP QWORD [BASS_ASIO_ChannelJoin+16]
  !NOP QWORD [BASS_ASIO_ChannelJoin+24]
  !NOP QWORD [BASS_ASIO_ChannelJoin+32]
  !NOP QWORD [BASS_ASIO_ChannelJoin+40]
  !NOP QWORD [BASS_ASIO_ChannelJoin+48]
  !NOP QWORD [BASS_ASIO_ChannelJoin+56]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ASIO_ChannelSetFormat]
  !NOP QWORD [BASS_ASIO_ChannelSetFormat+8]
  !NOP QWORD [BASS_ASIO_ChannelSetFormat+16]
  !NOP QWORD [BASS_ASIO_ChannelSetFormat+24]
  !NOP QWORD [BASS_ASIO_ChannelSetFormat+32]
  !NOP QWORD [BASS_ASIO_ChannelSetFormat+40]
  !NOP QWORD [BASS_ASIO_ChannelSetFormat+48]
  !NOP QWORD [BASS_ASIO_ChannelSetFormat+56]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ASIO_ChannelSetVolume]
  !NOP QWORD [BASS_ASIO_ChannelSetVolume+8]
  !NOP QWORD [BASS_ASIO_ChannelSetVolume+16]
  !NOP QWORD [BASS_ASIO_ChannelSetVolume+24]
  !NOP QWORD [BASS_ASIO_ChannelSetVolume+32]
  !NOP QWORD [BASS_ASIO_ChannelSetVolume+40]
  !NOP QWORD [BASS_ASIO_ChannelSetVolume+48]
  !NOP QWORD [BASS_ASIO_ChannelSetVolume+56]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ASIO_CheckRate]
  !NOP QWORD [BASS_ASIO_CheckRate+8]
  !NOP QWORD [BASS_ASIO_CheckRate+16]
  !NOP QWORD [BASS_ASIO_CheckRate+24]
  !NOP QWORD [BASS_ASIO_CheckRate+32]
  !NOP QWORD [BASS_ASIO_CheckRate+40]
  !NOP QWORD [BASS_ASIO_CheckRate+48]
  !NOP QWORD [BASS_ASIO_CheckRate+56]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ASIO_Free]
  !NOP QWORD [BASS_ASIO_Free+8]
  !NOP QWORD [BASS_ASIO_Free+16]
  !NOP QWORD [BASS_ASIO_Free+24]
  !NOP QWORD [BASS_ASIO_Free+32]
  !NOP QWORD [BASS_ASIO_Free+40]
  !NOP QWORD [BASS_ASIO_Free+48]
  !NOP QWORD [BASS_ASIO_Free+56]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ASIO_GetDeviceInfo]
  !NOP QWORD [BASS_ASIO_GetDeviceInfo+8]
  !NOP QWORD [BASS_ASIO_GetDeviceInfo+16]
  !NOP QWORD [BASS_ASIO_GetDeviceInfo+24]
  !NOP QWORD [BASS_ASIO_GetDeviceInfo+32]
  !NOP QWORD [BASS_ASIO_GetDeviceInfo+40]
  !NOP QWORD [BASS_ASIO_GetDeviceInfo+48]
  !NOP QWORD [BASS_ASIO_GetDeviceInfo+56]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ASIO_Init]
  !NOP QWORD [BASS_ASIO_Init+8]
  !NOP QWORD [BASS_ASIO_Init+16]
  !NOP QWORD [BASS_ASIO_Init+24]
  !NOP QWORD [BASS_ASIO_Init+32]
  !NOP QWORD [BASS_ASIO_Init+40]
  !NOP QWORD [BASS_ASIO_Init+48]
  !NOP QWORD [BASS_ASIO_Init+56]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ASIO_SetRate]
  !NOP QWORD [BASS_ASIO_SetRate+8]
  !NOP QWORD [BASS_ASIO_SetRate+16]
  !NOP QWORD [BASS_ASIO_SetRate+24]
  !NOP QWORD [BASS_ASIO_SetRate+32]
  !NOP QWORD [BASS_ASIO_SetRate+40]
  !NOP QWORD [BASS_ASIO_SetRate+48]
  !NOP QWORD [BASS_ASIO_SetRate+56]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ASIO_Start]
  !NOP QWORD [BASS_ASIO_Start+8]
  !NOP QWORD [BASS_ASIO_Start+16]
  !NOP QWORD [BASS_ASIO_Start+24]
  !NOP QWORD [BASS_ASIO_Start+32]
  !NOP QWORD [BASS_ASIO_Start+40]
  !NOP QWORD [BASS_ASIO_Start+48]
  !NOP QWORD [BASS_ASIO_Start+56]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ASIO_Stop]
  !NOP QWORD [BASS_ASIO_Stop+8]
  !NOP QWORD [BASS_ASIO_Stop+16]
  !NOP QWORD [BASS_ASIO_Stop+24]
  !NOP QWORD [BASS_ASIO_Stop+32]
  !NOP QWORD [BASS_ASIO_Stop+40]
  !NOP QWORD [BASS_ASIO_Stop+48]
  !NOP QWORD [BASS_ASIO_Stop+56]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ChannelGetAttribute]
  !NOP QWORD [BASS_ChannelGetAttribute+8]
  !NOP QWORD [BASS_ChannelGetAttribute+16]
  !NOP QWORD [BASS_ChannelGetAttribute+24]
  !NOP QWORD [BASS_ChannelGetAttribute+32]
  !NOP QWORD [BASS_ChannelGetAttribute+40]
  !NOP QWORD [BASS_ChannelGetAttribute+48]
  !NOP QWORD [BASS_ChannelGetAttribute+56]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ChannelGetData]
  !NOP QWORD [BASS_ChannelGetData+8]
  !NOP QWORD [BASS_ChannelGetData+16]
  !NOP QWORD [BASS_ChannelGetData+24]
  !NOP QWORD [BASS_ChannelGetData+32]
  !NOP QWORD [BASS_ChannelGetData+40]
  !NOP QWORD [BASS_ChannelGetData+48]
  !NOP QWORD [BASS_ChannelGetData+56]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ChannelStop]
  !NOP QWORD [BASS_ChannelStop+8]
  !NOP QWORD [BASS_ChannelStop+16]
  !NOP QWORD [BASS_ChannelStop+24]
  !NOP QWORD [BASS_ChannelStop+32]
  !NOP QWORD [BASS_ChannelStop+40]
  !NOP QWORD [BASS_ChannelStop+48]
  !NOP QWORD [BASS_ChannelStop+56]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_Free]
  !NOP QWORD [BASS_Free+8]
  !NOP QWORD [BASS_Free+16]
  !NOP QWORD [BASS_Free+24]
  !NOP QWORD [BASS_Free+32]
  !NOP QWORD [BASS_Free+40]
  !NOP QWORD [BASS_Free+48]
  !NOP QWORD [BASS_Free+56]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_Init]
  !NOP QWORD [BASS_Init+8]
  !NOP QWORD [BASS_Init+16]
  !NOP QWORD [BASS_Init+24]
  !NOP QWORD [BASS_Init+32]
  !NOP QWORD [BASS_Init+40]
  !NOP QWORD [BASS_Init+48]
  !NOP QWORD [BASS_Init+56]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_SetConfig]
  !NOP QWORD [BASS_SetConfig+8]
  !NOP QWORD [BASS_SetConfig+16]
  !NOP QWORD [BASS_SetConfig+24]
  !NOP QWORD [BASS_SetConfig+32]
  !NOP QWORD [BASS_SetConfig+40]
  !NOP QWORD [BASS_SetConfig+48]
  !NOP QWORD [BASS_SetConfig+56]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_StreamCreateURL]
  !NOP QWORD [BASS_StreamCreateURL+8]
  !NOP QWORD [BASS_StreamCreateURL+16]
  !NOP QWORD [BASS_StreamCreateURL+24]
  !NOP QWORD [BASS_StreamCreateURL+32]
  !NOP QWORD [BASS_StreamCreateURL+40]
  !NOP QWORD [BASS_StreamCreateURL+48]
  !NOP QWORD [BASS_StreamCreateURL+56]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_StreamFree]
  !NOP QWORD [BASS_StreamFree+8]
  !NOP QWORD [BASS_StreamFree+16]
  !NOP QWORD [BASS_StreamFree+24]
  !NOP QWORD [BASS_StreamFree+32]
  !NOP QWORD [BASS_StreamFree+40]
  !NOP QWORD [BASS_StreamFree+48]
  !NOP QWORD [BASS_StreamFree+56]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
EndMacro

Macro SoundDriversCache
  For AsioDRVcache=AsioD0 To AsioDRVcacheMax
    *AsioDRVcacheTarget = *DRVSND_AsioCache(AsioDRVcache)
    !MOV R8, QWORD [p.p_AsioDRVcacheTarget]
    !NOP QWORD [Rip]
    !NOP QWORD [Rip]
    !NOP QWORD [R8]
    !NOP QWORD [R8+8]
    !NOP QWORD [R8+16]
    !NOP QWORD [R8+24]
    !NOP QWORD [R8+32]
    !NOP QWORD [R8+40]
    !NOP QWORD [R8+48]
    !NOP QWORD [R8+56]
    !NOP QWORD [Rip]
    !NOP QWORD [Rip]
  Next
  !MOV R8, QWORD [p.p_AsioDRVcacheTarget]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [R8+64]
  !NOP QWORD [R8+72]
  !NOP QWORD [R8+80]
  !NOP QWORD [R8+88]
  !NOP QWORD [R8+96]
  !NOP QWORD [R8+104]
  !NOP QWORD [R8+112]
  !NOP QWORD [R8+120]
  !NOP QWORD [R8+128]
  !NOP QWORD [R8+136]
  !NOP QWORD [R8+144]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PureBasicStart]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
EndMacro

Macro CLR_Rcx_R8_x64
  !MOV cl, R8b
  !SUB R8b, cl
  !MOVZX R8, R8b
  !MOV ch, cl
  !SUB cl, ch
  !MOVZX Rcx, cl
EndMacro

Global F_1_0_d.d
; p.v_F_1_0_d = 1.0
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVQ xmm0, R8
!MOVSD [v_F_1_0_d], xmm0

Global C_PB_Event_Gadget.i, C_PB_Event_CloseWindow.i
; p.v_C_PB_Event_Gadget = 13100
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_C_PB_Event_Gadget], R8
;
; p.v_C_PB_Event_CloseWindow = 13116
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_C_PB_Event_CloseWindow], R8
;
Global *CurrentProcess = Val(ReverseString(ReverseString(Str( GetCurrentProcess_() ) ) ) )
;- Global D1 C_PB
Global D7.i, D522.i, D500.i, D50.i, D5.i, D40.i, D37.i, D330.i, D250.i
Global D19.i, D15.i, D120.i, D100.i, D10.i, D0.i, H_FFFFFF.i, H_E6D8AD.i
Global D31752000.i, D16384.i, D1.i, D2.i, DM1.i, D44100.i, D32.i
Global H_90B0EE.i, H_00EE00.i, H_005500.i, H_0000EE.i, H_000055.i, C_PB_Window_TitleBar.i
Global C_PB_Window_SystemMenu.i, C_PB_Window_ScreenCentered.i
Global C_PB_Window_BorderLess.i, C_PB_Tree_AlwaysShowSelection.i, C_PB_Ignore.i
Global C_PB_Gadget_BackColor.i, C_PB_Default.i, C_PB_Any.i, C_PB_2DDrawing_Gradient.i
Global C_PB_StatusBar_BorderLess.i, C_PB_Font_HighQuality.i
Global D524288.i, H_C0C0C0.i, H_FACE87.i, C_PB_Button_Toggle.i
Global D8193.i, D32769.i, D27.i, D7938000.i, D4097.i, D2048.i, C_ABOVE_NORMAL_PRIORITY_CLASS.i
;
; p.v_D7 = 7
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_D7], R8
;
; p.v_D522 = 522
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!MOVNTI QWORD [v_D522], R8
;
; p.v_D500 = 500
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_D500], R8
;
; p.v_D50 = 50
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!MOVNTI QWORD [v_D50], R8
;
; p.v_D5 = 5
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_D5], R8
;
; p.v_D40 = 40
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_D40], R8
;
; p.v_D37 = 37
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_D37], R8
;
; p.v_D330 = 330
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!MOVNTI QWORD [v_D330], R8
;
; p.v_D250 = 250
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!MOVNTI QWORD [v_D250], R8
;
; p.v_D19 = 19
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_D19], R8
;
; p.v_D15 = 15
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_D15], R8
;
; p.v_D120 = 120
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_D120], R8
;
; p.v_D100 = 100
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_D100], R8
;
; p.v_D10 = 10
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!MOVNTI QWORD [v_D10], R8
;
; p.v_D0 = 0
CLR_Rcx_R8_x64
!INC cl
!SHL R8, cl
!MOVNTI QWORD [v_D0], R8
;
; p.v_D44100 = 44100
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_D44100], R8
;
; p.v_D32 = 32
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_D32], R8
!NOP QWORD [Rip]
!NOP QWORD [v_D32]
;
; p.v_H_FFFFFF = 16777215
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_H_FFFFFF], R8
;
; p.v_H_E6D8AD = 15128749
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_H_E6D8AD], R8
;
; p.v_H_90B0EE = 9482478
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!MOVNTI QWORD [v_H_90B0EE], R8
;
; p.v_H_00EE00 = 60928
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_H_00EE00], R8
;
; p.v_H_005500 = 21760
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_H_005500], R8
;
; p.v_H_0000EE = 238
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!MOVNTI QWORD [v_H_0000EE], R8
;
; p.v_H_000055 = 85
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_H_000055], R8
;
; p.v_C_PB_Window_TitleBar = 12582912
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_C_PB_Window_TitleBar], R8
;
; p.v_C_PB_Window_SystemMenu = 13107200
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_C_PB_Window_SystemMenu], R8
;
; p.v_C_PB_Window_ScreenCentered = 1
CLR_Rcx_R8_x64
!INC cl
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_C_PB_Window_ScreenCentered], R8
!MOVNTI QWORD [v_D1], R8
!INC R8b
!MOVNTI QWORD [v_D2], R8
;
; p.v_C_PB_Window_BorderLess = 2147483648
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_C_PB_Window_BorderLess], R8
;
; p.v_C_PB_Tree_AlwaysShowSelection = 32
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_C_PB_Tree_AlwaysShowSelection], R8
;
; p.v_C_PB_Ignore = -65535
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_C_PB_Ignore], R8
;
; p.v_C_PB_Gadget_BackColor = 2
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!MOVNTI QWORD [v_C_PB_Gadget_BackColor], R8
!MOVNTI QWORD [v_C_PB_StatusBar_BorderLess], R8
;
Last edited by oryaaaaa on Sun Apr 20, 2025 1:28 am, edited 1 time in total.
User avatar
oryaaaaa
Addict
Addict
Posts: 825
Joined: Mon Jan 12, 2004 11:40 pm
Location: Okazaki, JAPAN

Re: NetRadioLoryaPhantomRecord : SuperBass netradio For HIGH END AUDIO [Windows]

Post by oryaaaaa »

Code: Select all

; p.v_C_PB_Default = -1
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_C_PB_Default], R8
!MOVNTI QWORD [v_C_PB_Any], R8
!MOVNTI QWORD [v_DM1], R8
;
; p.v_C_PB_2DDrawing_Gradient = 64
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_C_PB_2DDrawing_Gradient], R8
;
; p.v_C_PB_Font_HighQuality = 16
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_C_PB_Font_HighQuality], R8
;
; p.v_D31752000 = 31752000
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_D31752000], R8
;
; p.v_D16384 = 16384
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_D16384], R8
;
; p.v_D524288 = 524288 = 16384 * 8 * 4
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_D524288], R8
;
; p.v_C0C0C0 = 16760799
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_H_C0C0C0], R8
;
; p.v_H_FACE87 = 16436871
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_H_FACE87], R8
;
; p.v_D8193 = 8193
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_D8193], R8
;
; p.v_D32769 = 32769
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_D32769], R8
;
; p.v_D27 = 27
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_D27], R8
;
; p.v_D7938000 = 7938000
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_D7938000], R8
;
; p.v_D4097 = 4097
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_D4097], R8
;
; p.v_D2048 = 2048
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_D2048], R8
;
; p.v_C_ABOVE_NORMAL_PRIORITY_CLASS = 32768
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_C_ABOVE_NORMAL_PRIORITY_CLASS], R8
;
; p.v_C_PB_Button_Toggle = 4099
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_C_PB_Button_Toggle], R8

Global N_BASS_SAMPLE_FLOAT.i, N_BASS_CONFIG_NET_BUFFER.i
Global N_BASS_UNICODE.i, N_BASS_STREAM_DECODE.i

; v_N_BASS_SAMPLE_FLOAT = 256
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_N_BASS_SAMPLE_FLOAT], R8
;
; v_N_BASS_UNICODE = 2147483648
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_N_BASS_UNICODE], R8
;
; v_N_BASS_STREAM_DECODE = 2097152
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_N_BASS_STREAM_DECODE], R8
;

Global chan.l, *OutBufferInit, *OutBufferInitB, *OutBuffer, *OutBufferMax, *sinc_table_set, *sinc_table_set2
Global Get_Buffer_Semaphore.i, Get_Buffer_Thread.i, *SINC_BufferA, *SINC_BufferB
Global *Get_BufferA, *Get_BufferB, *Get_Buffer_InBuf, Get_Buffer_InBufSize.i, Get_BufferSize.i
Global Get_BufferSizeHalf.i

;- AllocateMemory
; 90 seconds * 44100 samples * 8 bytes = 31752000
; C 1024 + O 512 = 2048 * 8
; #PB_Memory_NoClear = 1
*Get_BufferA = AllocateMemory(D31752000+D524288, D1)
*Get_BufferB = AllocateMemory(D31752000+D524288, D1)
*OutBufferInit = AllocateMemory(D31752000+D524288, D1)
*OutBufferInitB = AllocateMemory(D31752000+D524288, D1)
*SINC_BufferA = AllocateMemory(D31752000+D524288, D1)
*SINC_BufferB = AllocateMemory(D31752000+D524288, D1)
*sinc_table_set = AllocateMemory(D524288, D1)
*sinc_table_set2 = AllocateMemory(D524288, D1)
Get_BufferSize = D31752000
*OutBuffer = *OutBufferInit
*OutBufferMax = *OutBufferInit + Get_BufferSize
;
*Get_Buffer_InBuf = AllocateMemory(D524288, D1)
Get_Buffer_InBufSize = D524288
Get_BufferSizeHalf = D7938000

Global MayaZero.i
!SHL R8b,1
!SHL R8b,1
!SHL R8b,1
!SHL R8b,1
!SHL R8b,1
!SHL R8b,1
!SHL R8b,1
!SHL R8b,1
!MOVZX R8, R8b
!MOVQ mm5, R8
!MOVNTQ QWORD [v_MayaZero], mm5
!EMMS
ClearMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, D31752000+D524288, @MayaZero, *Get_BufferA)
ClearMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, D31752000+D524288, @MayaZero, *Get_BufferB)
ClearMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, D31752000+D524288, @MayaZero, *OutBufferInit)
ClearMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, D31752000+D524288, @MayaZero, *OutBufferInitB)
ClearMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, D31752000+D524288, @MayaZero, *SINC_BufferA)
ClearMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, D31752000+D524288, @MayaZero, *SINC_BufferB)
ClearMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, D524288, @MayaZero, *sinc_table_set)
ClearMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, D524288, @MayaZero, *sinc_table_set2)
ClearMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, D524288, @MayaZero, *Get_Buffer_InBuf)

#NRVer = "Phantom record Maya"

Global Enum_Window_NROrya.i, Enum_StatusBar.i, Enum_Tree_PlayList.i, Enum_Image_OnAir.i
Global Enum_ButtonImage_GetPlayList.i, Enum_ButtonImage_GetPlayList2.i
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!MOVNTI QWORD [v_Enum_Window_NROrya], R8
!SHL R8, cl
!MOVNTI QWORD [v_Enum_StatusBar], R8
!SHL R8, cl
!MOVNTI QWORD [v_Enum_Tree_PlayList], R8
!SHL R8, cl
!MOVNTI QWORD [v_Enum_Image_OnAir], R8
!SHL R8, cl
!MOVNTI QWORD [v_Enum_ButtonImage_GetPlayList], R8
!SHL R8, cl
!MOVNTI QWORD [v_Enum_ButtonImage_GetPlayList2], R8

Macro MacroMakeFloat
  !MOV dl, cl
  !SUB cl, dl
  !INC cl
  !MOVZX Rcx, cl
  !MOVQ mm5, Rcx
  !PSLLW mm1, mm5 ;1  Left 1bit shift
  !PSLLW mm1, mm5 ;2  Left 1bit shift
  !PSLLW mm1, mm5 ;3  Left 1bit shift
  !PSLLW mm1, mm5 ;4  Left 1bit shift
  !PSLLW mm1, mm5 ;5  Left 1bit shift
  !PSLLW mm1, mm5 ;6  Left 1bit shift
  !PSLLW mm1, mm5 ;7  Left 1bit shift
  !PSLLW mm1, mm5 ;8  Left 1bit shift
  !PSLLW mm1, mm5 ;9  Left 1bit shift
  !PSLLW mm1, mm5 ;A  Left 1bit shift
  !PSLLW mm1, mm5 ;B  Left 1bit shift
  !PSLLW mm1, mm5 ;C  Left 1bit shift
  !PSLLW mm1, mm5 ;D  Left 1bit shift
  !PSLLW mm1, mm5 ;E  Left 1bit shift
  !PSLLW mm1, mm5 ;F  Left 1bit shift
  !PSLLW mm1, mm5 ;0  Left 1bit shift
  !MOVQ mm1, Rcx
  !PSLLW mm5, mm1 ;1  Left 1bit shift
  !PSLLW mm5, mm1 ;2  Left 1bit shift
  !PSLLW mm5, mm1 ;3  Left 1bit shift
  !PSLLW mm5, mm1 ;4  Left 1bit shift
  !PSLLW mm5, mm1 ;5  Left 1bit shift
  !PSLLW mm5, mm1 ;6  Left 1bit shift
  !PSLLW mm5, mm1 ;7  Left 1bit shift
  !PSLLW mm5, mm1 ;8  Left 1bit shift
  !PSLLW mm5, mm1 ;9  Left 1bit shift
  !PSLLW mm5, mm1 ;A  Left 1bit shift
  !PSLLW mm5, mm1 ;B  Left 1bit shift
  !PSLLW mm5, mm1 ;C  Left 1bit shift
  !PSLLW mm5, mm1 ;D  Left 1bit shift
  !PSLLW mm5, mm1 ;E  Left 1bit shift
  !PSLLW mm5, mm1 ;F  Left 1bit shift
  !PSLLW mm5, mm1 ;0  Left 1bit shift
  ; mm5 = 0000 , mm1 = 001
  ;
  ;1 = SHL R8, cl + INC R8b
  ;PSLLQ mm5, mm1
  ;PADDQ mm5, mm1
  ;
  ;0 = SHL R8, cl
  ;PSLLQ mm5, mm1
  ;
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
EndMacro

Macro MacroMakeFloatFF
  !MOV dl, cl
  !SUB cl, dl
  !INC cl
  !MOVZX Rcx, cl
  !MOVQ mm5, Rcx
  !PSLLW mm1, mm5 ;1  Left 1bit shift
  !PSLLW mm1, mm5 ;2  Left 1bit shift
  !PSLLW mm1, mm5 ;3  Left 1bit shift
  !PSLLW mm1, mm5 ;4  Left 1bit shift
  !PSLLW mm1, mm5 ;5  Left 1bit shift
  !PSLLW mm1, mm5 ;6  Left 1bit shift
  !PSLLW mm1, mm5 ;7  Left 1bit shift
  !PSLLW mm1, mm5 ;8  Left 1bit shift
  !PSLLW mm1, mm5 ;9  Left 1bit shift
  !PSLLW mm1, mm5 ;A  Left 1bit shift
  !PSLLW mm1, mm5 ;B  Left 1bit shift
  !PSLLW mm1, mm5 ;C  Left 1bit shift
  !PSLLW mm1, mm5 ;D  Left 1bit shift
  !PSLLW mm1, mm5 ;E  Left 1bit shift
  !PSLLW mm1, mm5 ;F  Left 1bit shift
  !PSLLW mm1, mm5 ;0  Left 1bit shift
  !MOVQ mm1, Rcx
  !PSLLW mm5, mm1 ;1  Left 1bit shift
  !PSLLW mm5, mm1 ;2  Left 1bit shift
  !PSLLW mm5, mm1 ;3  Left 1bit shift
  !PSLLW mm5, mm1 ;4  Left 1bit shift
  !PSLLW mm5, mm1 ;5  Left 1bit shift
  !PSLLW mm5, mm1 ;6  Left 1bit shift
  !PSLLW mm5, mm1 ;7  Left 1bit shift
  !PSLLW mm5, mm1 ;8  Left 1bit shift
  !PSLLW mm5, mm1 ;9  Left 1bit shift
  !PSLLW mm5, mm1 ;A  Left 1bit shift
  !PSLLW mm5, mm1 ;B  Left 1bit shift
  !PSLLW mm5, mm1 ;C  Left 1bit shift
  !PSLLW mm5, mm1 ;D  Left 1bit shift
  !PSLLW mm5, mm1 ;E  Left 1bit shift
  !PSLLW mm5, mm1 ;F  Left 1bit shift
  !PSLLW mm5, mm1 ;0  Left 1bit shift
  ; mm5 = 0000 , mm1 = 001
  ;
  ;1 = SHL R8, cl + INC R8b
  ;PSLLQ mm5, mm1
  ;PADDQ mm5, mm1
  ;
  ;0 = SHL R8, cl
  ;PSLLQ mm5, mm1
  ;
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
EndMacro

Macro ASIO_ChannelSetVolume_Stabilizer
  ;
  ;BASS_ASIO_ChannelSetVolume(False, DM1, NFloat_1_000)
  MacroMakeFloatFF
  !MOVQ2DQ xmm2, mm5
  !MOVSS xmm2, xmm2
  !EMMS
  !MOV cl, dl
  !SUB dl, cl
  !MOVZX Ecx, dl
  !MOVZX Edx, dl
  !NOT Edx
  !MOV dl, dl
  !MOV dh, dh
  !MOV dx, dx
  !MOV Edx, Edx
  !CALL QWORD BASS_ASIO_ChannelSetVolume
  ;
  ;BASS_ASIO_ChannelSetVolume(False, DM1, NFloat_1_000)
  MacroMakeFloatFF
  !MOVQ2DQ xmm2, mm5
  !MOVSS xmm2, xmm2
  !EMMS
  !MOV cl, dl
  !SUB dl, cl
  !MOVZX Ecx, dl
  !MOVZX Edx, dl
  !NOT Edx
  !MOV dl, dl
  !MOV dh, dh
  !MOV dx, dx
  !MOV Edx, Edx
  !CALL QWORD BASS_ASIO_ChannelSetVolume
  ;
  ;BASS_ASIO_ChannelSetVolume(False, DM1, Float_1_000)
  MacroMakeFloat
  !MOVQ2DQ xmm2, mm5
  !MOVSS xmm2, xmm2
  !EMMS
  !MOV cl, dl
  !SUB dl, cl
  !MOVZX Ecx, dl
  !MOVZX Edx, dl
  !NOT Edx
  !MOV dl, dl
  !MOV dh, dh
  !MOV dx, dx
  !MOV Edx, Edx
  !CALL QWORD BASS_ASIO_ChannelSetVolume
  ;
  ;BASS_ASIO_ChannelSetVolume(False, DM1, NFloat_1_000)
  MacroMakeFloatFF
  !MOVQ2DQ xmm2, mm5
  !MOVSS xmm2, xmm2
  !EMMS
  !MOV cl, dl
  !SUB dl, cl
  !MOVZX Ecx, dl
  !MOVZX Edx, dl
  !NOT Edx
  !MOV dl, dl
  !MOV dh, dh
  !MOV dx, dx
  !MOV Edx, Edx
  !CALL QWORD BASS_ASIO_ChannelSetVolume
  ;
  ;BASS_ASIO_ChannelSetVolume(False, DM1, Float_1_000)
  MacroMakeFloat
  !MOVQ2DQ xmm2, mm5
  !MOVSS xmm2, xmm2
  !EMMS
  !MOV cl, dl
  !SUB dl, cl
  !MOVZX Ecx, dl
  !MOVZX Edx, dl
  !NOT Edx
  !MOV dl, dl
  !MOV dh, dh
  !MOV dx, dx
  !MOV Edx, Edx
  !CALL QWORD BASS_ASIO_ChannelSetVolume
  
  ;BASS_ASIO_ChannelSetVolume(False, DM1, NFloat_1_000)
  MacroMakeFloatFF
  !MOVQ2DQ xmm2, mm5
  !MOVSS xmm2, xmm2
  !EMMS
  !MOV cl, dl
  !SUB dl, cl
  !MOVZX Ecx, dl
  !MOVZX Edx, dl
  !NOT Edx
  !MOV dl, dl
  !MOV dh, dh
  !MOV dx, dx
  !MOV Edx, Edx
  !CALL QWORD BASS_ASIO_ChannelSetVolume
  ;
  ;BASS_ASIO_ChannelSetVolume(False, DM1, Float_1_000)
  MacroMakeFloat
  !MOVQ2DQ xmm2, mm5
  !MOVSS xmm2, xmm2
  !EMMS
  !MOV cl, dl
  !SUB dl, cl
  !MOVZX Ecx, dl
  !MOVZX Edx, dl
  !NOT Edx
  !MOV dl, dl
  !MOV dh, dh
  !MOV dx, dx
  !MOV Edx, Edx
  !CALL QWORD BASS_ASIO_ChannelSetVolume
EndMacro

Macro SincCalc_A
  (Freq_d1 * I + k * Freq_d2 / kfreq + Freq_d2 * I + k * Freq_d1 / kfreq ) + (Freq_d3 * I + k * Freq_d4 / kfreq + Freq_d4 * I + k * Freq_d3 / kfreq )
EndMacro

Macro SincCalc_B
  (Freq_d2 * k / kfreq + I * Freq_d1 + Freq_d1 * k / kfreq + I * Freq_d2) + (Freq_d4 * k / kfreq + I * Freq_d3 + Freq_d3 * k / kfreq + I * Freq_d4)
EndMacro

Procedure CreateSincTable(dummy1.i, dummy2.i, sample.i)
  !PXOR mm1, mm1
  !PXOR mm3, mm3
  !PXOR mm5, mm5
  !MOVQ mm3, QWORD [p_sinc_table_set]
  !MOVNTQ QWORD [p_sinc_table_set], mm5
  !MOVQ mm1, mm3
  !MOVQ mm5, mm1
  !MOVNTQ QWORD [p_sinc_table_set], mm5
  !EMMS
  Protected I.i, k.d, kk.d, CST_D0.i, CST_D4.i, CST_D8.i, CST_D25.i
  Protected D1764.i, kfreq.d
  
  Protected Freq_d1.d, Freq_d2.d, Freq_d3.d, Freq_d4.d
  ;
  ; // 1st 3.141592653
  !NOP QWORD [Rip]
  !NOP cx
  !NOP QWORD [Rip]
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !NOP QWORD [Rip]
  !NOP R8w
  !NOP QWORD [Rip]
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !INC cl
  !MOVZX Rcx, cl
  ; 100000000001001001000011111101101010100001011111110100100111000
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  ;
  !MOVQ xmm5, R8
  !MOVSD [p.v_Freq_d1], xmm5
  !NOP QWORD [Rip]
  !NOP QWORD [p.v_Freq_d1]
  ; // 1st 3.141592653 End
  ;
  ; // 2nd 589793
  !NOP QWORD [Rip]
  !NOP cx
  !NOP QWORD [Rip]
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !NOP QWORD [Rip]
  !NOP R9w
  !NOP QWORD [Rip]
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !MOVZX R9, R9b
  !INC cl
  !MOVZX Rcx, cl
  ; 11111000000100010000111101111111000100011110111011100100011001
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !MOVQ xmm5, R9
  !MOVSD [p.v_Freq_d2], xmm5
  !NOP QWORD [Rip]
  !NOP QWORD [p.v_Freq_d2]
  ; // 2nd 589793 End
  ;
  ; // 3rd 238462
  !NOP QWORD [Rip]
  !NOP cx
  !NOP QWORD [Rip]
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !NOP QWORD [Rip]
  !NOP R8w
  !NOP QWORD [Rip]
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !INC cl
  !MOVZX Rcx, cl
  ; 11110010110001001011101101100011110100110011000000010010000001
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !MOVQ xmm5, R8
  !MOVSD [p.v_Freq_d3], xmm5
  !NOP QWORD [Rip]
  !NOP QWORD [p.v_Freq_d3]
  ; //  3rd 238462 End
  ;
  ; // 4th 643383
  !NOP QWORD [Rip]
  !NOP cx
  !NOP QWORD [Rip]
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !NOP QWORD [Rip]
  !NOP R9w
  !NOP QWORD [Rip]
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !MOVZX R9, R9b
  !INC cl
  !MOVZX Rcx, cl
  ; 11101110001000010011100110101100100111000100000011010110110011
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !MOVQ xmm5, R9
  !MOVSD [p.v_Freq_d4], xmm5
  !NOP QWORD [Rip]
  !NOP QWORD [p.v_Freq_d4]
  ; // 4th 643383 End
  
  !MOV ah, al
  !SUB al, ah
  !MOVZX Rax, al
  !MOV R8, Rax
  !MOVNTI QWORD [p.v_CST_D0], R8
  !INC R8b
  !INC R8b
  !INC R8b
  !INC R8b
  !MOVNTI QWORD [p.v_CST_D4], R8
  !INC R8b
  !INC R8b
  !INC R8b
  !INC R8b
  !MOVNTI QWORD [p.v_CST_D8], R8
  CLR_Rcx_R8_x64
  !INC R8b
  !INC cl
  !SHL R8b, cl
  !INC R8b
  !SHL R8b, cl
  !SHL R8b, cl
  !SHL R8b, cl
  !INC R8b
  !MOVNTI QWORD [p.v_CST_D25], R8
  ;
  ; p.v_D1764 = 1764
  CLR_Rcx_R8_x64
  !INC cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !MOVNTI QWORD [p.v_D1764], R8
  ;#Set_inFreq = D1764
  I = CST_D0
  ;   k = 100/480; CST_D25 / (CST_D25*CST_D4)
  k = F_1_0_d *CST_D25*CST_D4
  kfreq = F_1_0_d * D1764
  kk = (CST_D25*CST_D4) / (CST_D25*CST_D4)
  For I=-sample To sample
    ;     If I = CST_D0
    ;       PokeD(*sinc_table_set+(I+sample)*CST_D8, kk)
    ;     Else
    !XCHG Rdx, Rcx ; nandoku-ka!!
    PokeD(*sinc_table_set+I*CST_D8+CST_D8*sample, Sin(SincCalc_A)/SincCalc_B)
    ;     EndIf
  Next
  Debug sample*CST_D8+CST_D8*sample
EndProcedure

Procedure SincInterpolation128(*buffer_audio_ptr, *sinc_table_ptr, *out_buffer_ptr, sinc_table_size.i, buf_length.i)
  ;/ http://forum.purebasic.com/english/viewtopic.php?f=35&t=47679
  ; Thanks "Wilbert in Netherlands"
  !PXOR xmm4, xmm4
  !PXOR xmm5, xmm5
  !PXOR xmm6, xmm6
  !PXOR xmm7, xmm7
  !MOV ah, al
  !SUB al, ah
  !MOVZX Rax, al
  !MOV dh, dl
  !SUB dl, dh
  !MOVZX Rdx, dl
  !MOV R9b, R9b
  !MOVZX R9, R9b
  ;
  !MOV bh, bl
  !SUB bl, bh
  !MOVZX Rbx, bl
  !INC bl
  !INC bl
  !INC bl
  !INC bl ;4
  !INC bl
  !INC bl
  !INC bl
  !INC bl ;8
  !MOVZX Rbx, bl
  !PXOR mm7, mm7
  !MOVQ mm7, Rbx;8
  !MOV ch, cl
  !SUB cl, ch
  !MOVZX Rcx, cl
  !MOV R8b, R8b
  !MOVZX R8, R8b
  !PXOR mm1, mm1
  !PXOR mm3, mm3
  !PXOR mm5, mm5
  !MOVQ mm3, QWORD [p.v_buf_length]
  !MOVQ mm1, mm3
  !MOVQ mm5, mm1
  !MOVQ Rax, mm5 ; [p.v_buf_length]
  ;
  !PXOR mm1, mm1
  !PXOR mm3, mm3
  !PXOR mm5, mm5
  !MOVQ mm3, QWORD [p.p_buffer_audio_ptr]
  !MOVQ mm1, mm3
  !MOVQ mm5, mm1
  !MOVQ R9, mm5 ; [p.p_buffer_audio_ptr]
  !PXOR mm1, mm1
  !PXOR mm3, mm3
  !PXOR mm5, mm5
  !MOVQ mm3, QWORD [p.p_sinc_table_ptr]
  !MOVQ mm1, mm3
  !MOVQ mm5, mm1
  !MOVQ R8, mm5 ; [p.p_sinc_table_ptr]
  !PXOR mm1, mm1
  !PXOR mm3, mm3
  !PXOR mm5, mm5
  !MOVQ mm3, QWORD [p.v_sinc_table_size]
  !MOVQ mm1, mm3
  !MOVQ mm5, mm1
  !MOVQ Rcx, mm5 ; [p.v_sinc_table_size]
  !PXOR xmm6, xmm6
  !JMP SincInterpolation128_Loop
  
  !XCHG spl, bpl
  !XCHG Rsp, Rsp
  !XCHG Rbp, Rbp
  !XCHG bpl, spl
  !NOP QWORD [Rip]
  !SincInterpolation128_Start:
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !MOVQ mm3, QWORD [p.p_buffer_audio_ptr]
  !MOVQ mm5, QWORD [p.p_sinc_table_ptr]
  !MOVQ mm1, QWORD [p.v_sinc_table_size]
  !MOVQ Rbx, mm7 ; Set 8
  !ADD Rdx, Rbx ;8
  !MOV ch, cl
  !SUB cl, ch
  !MOVZX Rcx, cl
  !MOV R8b, R8b
  !MOVZX R8, R8b
  !MOV R9b, R9b
  !MOVZX R9, R9b
  !MOVQ Rcx, mm1 ; [p.v_sinc_table_size]
  !MOVQ R9, mm3 ; [p.p_buffer_audio_ptr]
  !MOVQ R8, mm5 ; [p.p_sinc_table_ptr]
  !NOP QWORD [R8]
  !ADD R9, Rdx
  !NOP QWORD [R9]
  ;
  !XCHG spl, bpl
  !XCHG Rsp, Rsp
  !XCHG Rbp, Rbp
  !XCHG bpl, spl
  !NOP QWORD [Rip]
  !SincInterpolation128_Loop:
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !MOVQ mm3, QWORD [R8] ; sinc
  !MOVQ mm5, QWORD [R9] ; L + R
  !MOVQ Rbx, mm7 ; Set 8
  !ADD R8, Rbx ;8
  !MOVQ Rbx, mm7 ; Set 64
  !ADD R9, Rbx ;64 7 sample skip (8)
  !MOVQ2DQ xmm7, mm5 ; L + R
  !cvtps2pd xmm5, xmm7 ; L + R R9
  !MOVQ2DQ xmm4, mm3 ; sinc R8
  !movlhps xmm4, xmm4
  !mulpd xmm5, xmm4
  !ADDPD xmm6, xmm5
  !DEC Rcx
  !JNZ SincInterpolation128_Loop ; DEC Rcx
  ;
  !cvtpd2ps xmm6, xmm6
  !MOV R8b, R8b
  !MOVZX R8, R8b
  !MOVQ mm5, QWORD [p.p_out_buffer_ptr]
  !MOVQ R8, mm5 ; [p.p_out_buffer_ptr]
  !ADD R8, Rdx
  !MOVDQ2Q mm3, xmm6
  !MOVQ mm1, mm3
  !MOVQ mm5, mm1
  !NOP QWORD [Rip]
  !MOVNTQ QWORD [R8], mm5
  !PXOR xmm4, xmm4
  !PXOR xmm5, xmm5
  !PXOR xmm6, xmm6
  !PXOR xmm7, xmm7
  !MOVQ Rbx, mm7 ; Set 8
  !SUB Rax, Rbx ; -8
  !NOP QWORD [Rip] ; [12.10 - 2.97]
  !NOP QWORD [Rip] ; [12.10 - 2.97]
  !JNZ SincInterpolation128_Start
  !XCHG ah, al
  !XCHG al, ah
  !EMMS
EndProcedure

Procedure BackupProcess(selected.i)
  Shared *BackupProcessA_1, *BackupProcessA_2, *BackupProcessA_3, BackupProcessA_4.i, BackupProcessA_5.i
  Shared *BackupProcessB_1, *BackupProcessB_2, *BackupProcessB_3, BackupProcessB_4.i, BackupProcessB_5.i
  Shared *BackupProcessC_1, *BackupProcessC_2, *BackupProcessC_3, BackupProcessC_4.i, BackupProcessC_5.i
  Shared *BackupProcessD_1, *BackupProcessD_2, *BackupProcessD_3, BackupProcessD_4.i, BackupProcessD_5.i
  Protected BDP_D2.i, BDP_D4.i, BDP_D8.i, BDP_D16.i
  !MOV ch, cl
  !SUB cl, ch
  !MOVZX Rcx, cl
  !INC cl
  !INC cl
  !MOVZX Rcx, cl
  !MOVNTI QWORD [p.v_BDP_D2], Rcx
  !INC cl
  !INC cl
  !MOVZX Rcx, cl
  !MOVNTI QWORD [p.v_BDP_D4], Rcx
  !INC cl
  !INC cl
  !INC cl
  !INC cl
  !MOVZX Rcx, cl
  !MOVNTI QWORD [p.v_BDP_D8], Rcx
  !INC cl
  !INC cl
  !INC cl
  !INC cl
  !INC cl
  !INC cl
  !INC cl
  !INC cl
  !MOVZX Rcx, cl
  !MOVNTI QWORD [p.v_BDP_D16], Rcx
  If selected=BDP_D2
    SincInterpolation128(*BackupProcessA_1, *BackupProcessA_2, *BackupProcessA_3, BackupProcessA_4, BackupProcessA_5)
    If SincFlags
      *BackupProcessA_2 = *sinc_table_set2
      BackupProcessA_4 = D4097
      SincInterpolation128(*BackupProcessA_1, *BackupProcessA_2, *BackupProcessA_3, BackupProcessA_4, BackupProcessA_5)
    EndIf
  ElseIf selected=BDP_D4
    SincInterpolation128(*BackupProcessB_1, *BackupProcessB_2, *BackupProcessB_3, BackupProcessB_4, BackupProcessB_5)
    If SincFlags
      *BackupProcessB_2 = *sinc_table_set2
      BackupProcessB_4 = D4097
      SincInterpolation128(*BackupProcessB_1, *BackupProcessB_2, *BackupProcessB_3, BackupProcessB_4, BackupProcessB_5)
    EndIf
  ElseIf selected=BDP_D8
    SincInterpolation128(*BackupProcessC_1, *BackupProcessC_2, *BackupProcessC_3, BackupProcessC_4, BackupProcessC_5)
    If SincFlags
      *BackupProcessC_2 = *sinc_table_set2
      BackupProcessC_4 = D4097
      SincInterpolation128(*BackupProcessC_1, *BackupProcessC_2, *BackupProcessC_3, BackupProcessC_4, BackupProcessC_5)
    EndIf
  ElseIf selected=BDP_D16
    SincInterpolation128(*BackupProcessD_1, *BackupProcessD_2, *BackupProcessD_3, BackupProcessD_4, BackupProcessD_5)
    If SincFlags
      *BackupProcessD_2 = *sinc_table_set2
      BackupProcessD_4 = D4097
      SincInterpolation128(*BackupProcessD_1, *BackupProcessD_2, *BackupProcessD_3, BackupProcessD_4, BackupProcessD_5)
    EndIf
  EndIf
EndProcedure

Procedure Get_Buffer(*dummy) ; right !
  Shared *BackupProcessA_1, *BackupProcessA_2, *BackupProcessA_3, BackupProcessA_4.i, BackupProcessA_5.i
  Shared *BackupProcessB_1, *BackupProcessB_2, *BackupProcessB_3, BackupProcessB_4.i, BackupProcessB_5.i
  Shared *BackupProcessC_1, *BackupProcessC_2, *BackupProcessC_3, BackupProcessC_4.i, BackupProcessC_5.i
  Shared *BackupProcessD_1, *BackupProcessD_2, *BackupProcessD_3, BackupProcessD_4.i, BackupProcessD_5.i
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  Get_Buffer_TOP:
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  Protected D0.i, k.i, BackupProcess_ThreadA.i, BackupProcess_ThreadB.i, BackupProcess_ThreadC.i, BackupProcess_ThreadD.i
  Protected lowpassVal.lowpass
  ;
  ; p.v_D0 = 0
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !MOVNTI QWORD [p.v_D0], R8
  !MOVNTI QWORD [p.v_k], R8
  ;
  Protected BDP_D2.i, BDP_D4.i, BDP_D8.i, BDP_D16.i
  !MOV ch, cl
  !SUB cl, ch
  !MOVZX Rcx, cl
  !INC cl
  !INC cl
  !MOVZX Rcx, cl
  !MOVNTI QWORD [p.v_BDP_D2], Rcx
  !INC cl
  !INC cl
  !MOVZX Rcx, cl
  !MOVNTI QWORD [p.v_BDP_D4], Rcx
  !INC cl
  !INC cl
  !INC cl
  !INC cl
  !MOVZX Rcx, cl
  !MOVNTI QWORD [p.v_BDP_D8], Rcx
  !INC cl
  !INC cl
  !INC cl
  !INC cl
  !INC cl
  !INC cl
  !INC cl
  !INC cl
  !MOVZX Rcx, cl
  !MOVNTI QWORD [p.v_BDP_D16], Rcx
  ;
  ThreadPriority(Get_Buffer_Thread, D32)
  CopyMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, Get_Buffer_InBufSize, *Get_Buffer_InBuf, *Get_BufferA) : pdiv = D0
  ;
  
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeBeginPeriod]
  !NOP QWORD [timeBeginPeriod+8]
  !NOP QWORD [timeBeginPeriod+16]
  !NOP QWORD [timeBeginPeriod+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeEndPeriod]
  !NOP QWORD [timeEndPeriod+8]
  !NOP QWORD [timeEndPeriod+16]
  !NOP QWORD [timeEndPeriod+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetTime]
  !NOP QWORD [timeGetTime+8]
  !NOP QWORD [timeGetTime+16]
  !NOP QWORD [timeGetTime+24]
  
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetDevCaps]
  !NOP QWORD [timeGetDevCaps+8]
  !NOP QWORD [timeGetDevCaps+16]
  !NOP QWORD [timeGetDevCaps+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetSystemTime]
  !NOP QWORD [timeGetSystemTime+8]
  !NOP QWORD [timeGetSystemTime+16]
  !NOP QWORD [timeGetSystemTime+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [QueryPerformanceCounter]
  !NOP QWORD [QueryPerformanceCounter+8]
  !NOP QWORD [QueryPerformanceCounter+16]
  !NOP QWORD [QueryPerformanceCounter+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [QueryPerformanceFrequency]
  !NOP QWORD [QueryPerformanceFrequency+8]
  !NOP QWORD [QueryPerformanceFrequency+16]
  !NOP QWORD [QueryPerformanceFrequency+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PureBasicStart]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  ;
  k = BASS_ChannelGetData(chan, *Get_BufferA+Get_Buffer_InBufSize, Get_BufferSize)
  If k=>D0
    pdiv = k
    StatusBarProgress(Enum_StatusBar, D0, pdiv, C_PB_StatusBar_BorderLess, D0, Get_BufferSize)
  EndIf
  
  If pdiv<Get_BufferSize
    Repeat
      
      !NOP QWORD [Rip]
      !NOP QWORD [Rip]
      !NOP QWORD [timeBeginPeriod]
      !NOP QWORD [timeBeginPeriod+8]
      !NOP QWORD [timeBeginPeriod+16]
      !NOP QWORD [timeBeginPeriod+24]
      !NOP QWORD [Rip]
      !NOP QWORD [Rip]
      !NOP QWORD [timeEndPeriod]
      !NOP QWORD [timeEndPeriod+8]
      !NOP QWORD [timeEndPeriod+16]
      !NOP QWORD [timeEndPeriod+24]
      !NOP QWORD [Rip]
      !NOP QWORD [Rip]
      !NOP QWORD [timeGetTime]
      !NOP QWORD [timeGetTime+8]
      !NOP QWORD [timeGetTime+16]
      !NOP QWORD [timeGetTime+24]
      !NOP QWORD [Rip]
      !NOP QWORD [Rip]
      !NOP QWORD [timeGetDevCaps]
      !NOP QWORD [timeGetDevCaps+8]
      !NOP QWORD [timeGetDevCaps+16]
      !NOP QWORD [timeGetDevCaps+24]
      !NOP QWORD [Rip]
      !NOP QWORD [Rip]
      !NOP QWORD [timeGetSystemTime]
      !NOP QWORD [timeGetSystemTime+8]
      !NOP QWORD [timeGetSystemTime+16]
      !NOP QWORD [timeGetSystemTime+24]
      !NOP QWORD [Rip]
      !NOP QWORD [Rip]
      !NOP QWORD [QueryPerformanceCounter]
      !NOP QWORD [QueryPerformanceCounter+8]
      !NOP QWORD [QueryPerformanceCounter+16]
      !NOP QWORD [QueryPerformanceCounter+24]
      !NOP QWORD [Rip]
      !NOP QWORD [Rip]
      !NOP QWORD [QueryPerformanceFrequency]
      !NOP QWORD [QueryPerformanceFrequency+8]
      !NOP QWORD [QueryPerformanceFrequency+16]
      !NOP QWORD [QueryPerformanceFrequency+24]
      !NOP QWORD [Rip]
      !NOP QWORD [Rip]
      !NOP QWORD [PureBasicStart]
      !NOP QWORD [Rip]
      !NOP QWORD [Rip]
      ;
      k = BASS_ChannelGetData(chan, *Get_BufferA+pdiv+Get_Buffer_InBufSize, Get_BufferSize-pdiv)
      If k>=D0
        pdiv + k
        StatusBarProgress(Enum_StatusBar, D0, pdiv, C_PB_StatusBar_BorderLess, D0, Get_BufferSize)
      Else
        ProcedureReturn
      EndIf
    Until pdiv=>Get_BufferSize
  EndIf
  CopyMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, Get_Buffer_InBufSize,*Get_BufferA+pdiv,*Get_Buffer_InBuf)
  CopyMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, Get_BufferSize+Get_Buffer_InBufSize, *Get_BufferA, *SINC_BufferA)
  ClearMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, Get_BufferSize+Get_Buffer_InBufSize, @MayaZero, *Get_BufferA)
  *BackupProcessA_1 = *SINC_BufferA
  *BackupProcessA_2 = *sinc_table_set
  *BackupProcessA_3 = *SINC_BufferB
  BackupProcessA_4 = D32769
  BackupProcessA_5 = Get_BufferSizeHalf
  BackupProcess_ThreadA = CreateThread(@BackupProcess(), BDP_D2)
  ThreadPriority(BackupProcess_ThreadA, D27)
  *BackupProcessB_1 = *SINC_BufferA + Get_BufferSizeHalf
  *BackupProcessB_2 = *sinc_table_set
  *BackupProcessB_3 = *SINC_BufferB + Get_BufferSizeHalf
  BackupProcessB_4 = D32769
  BackupProcessB_5 = Get_BufferSizeHalf
  BackupProcess_ThreadB = CreateThread(@BackupProcess(), BDP_D4)
  ThreadPriority(BackupProcess_ThreadB, D27)
  *BackupProcessC_1 = *SINC_BufferA + Get_BufferSizeHalf + Get_BufferSizeHalf
  *BackupProcessC_2 = *sinc_table_set
  *BackupProcessC_3 = *SINC_BufferB + Get_BufferSizeHalf + Get_BufferSizeHalf
  BackupProcessC_4 = D32769
  BackupProcessC_5 = Get_BufferSizeHalf
  BackupProcess_ThreadC = CreateThread(@BackupProcess(), BDP_D8)
  ThreadPriority(BackupProcess_ThreadC, D27)
  *BackupProcessD_1 = *SINC_BufferA + Get_BufferSizeHalf + Get_BufferSizeHalf + Get_BufferSizeHalf
  *BackupProcessD_2 = *sinc_table_set
  *BackupProcessD_3 = *SINC_BufferB + Get_BufferSizeHalf + Get_BufferSizeHalf + Get_BufferSizeHalf
  BackupProcessD_4 = D32769
  BackupProcessD_5 = Get_BufferSizeHalf
  BackupProcess_ThreadD = CreateThread(@BackupProcess(), BDP_D16)
  ThreadPriority(BackupProcess_ThreadD, D27)
  WaitThread(BackupProcess_ThreadA)
  WaitThread(BackupProcess_ThreadB)
  WaitThread(BackupProcess_ThreadC)
  WaitThread(BackupProcess_ThreadD)
  CopyMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, Get_BufferSize, *SINC_BufferB, *SINC_BufferB)
  CopyMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, Get_BufferSize, *SINC_BufferB, *Get_BufferA)
  InitializeStructure(@lowpassVal, lowpass)
  CopyMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9,  Get_BufferSize, *Get_BufferA, *Get_BufferA)
  lowpassVal\buffer_in = *Get_BufferA
  lowpassVal\Length = Get_BufferSize + Get_Buffer_InBufSize
  lowpassVal\Freq_double = F_1_0_d * D44100
  lowpass(@lowpassVal)
  CopyMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, Get_BufferSize, *Get_BufferA, *OutBufferInitB)
  Swap *Get_BufferA, *Get_BufferB
  ClearMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, D31752000+D524288, @MayaZero, *Get_BufferA)
  ClearMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, D31752000+D524288, @MayaZero, *SINC_BufferA)
  ClearMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, D31752000+D524288, @MayaZero, *SINC_BufferB)
  ThreadPriority(Get_Buffer_Thread, D15)
  
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeBeginPeriod]
  !NOP QWORD [timeBeginPeriod+8]
  !NOP QWORD [timeBeginPeriod+16]
  !NOP QWORD [timeBeginPeriod+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeEndPeriod]
  !NOP QWORD [timeEndPeriod+8]
  !NOP QWORD [timeEndPeriod+16]
  !NOP QWORD [timeEndPeriod+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetTime]
  !NOP QWORD [timeGetTime+8]
  !NOP QWORD [timeGetTime+16]
  !NOP QWORD [timeGetTime+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetDevCaps]
  !NOP QWORD [timeGetDevCaps+8]
  !NOP QWORD [timeGetDevCaps+16]
  !NOP QWORD [timeGetDevCaps+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetSystemTime]
  !NOP QWORD [timeGetSystemTime+8]
  !NOP QWORD [timeGetSystemTime+16]
  !NOP QWORD [timeGetSystemTime+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [QueryPerformanceCounter]
  !NOP QWORD [QueryPerformanceCounter+8]
  !NOP QWORD [QueryPerformanceCounter+16]
  !NOP QWORD [QueryPerformanceCounter+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [QueryPerformanceFrequency]
  !NOP QWORD [QueryPerformanceFrequency+8]
  !NOP QWORD [QueryPerformanceFrequency+16]
  !NOP QWORD [QueryPerformanceFrequency+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PureBasicStart]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_WaitSemaphore]
  !NOP QWORD [PB_WaitSemaphore+8]
  !NOP QWORD [PB_WaitSemaphore+16]
  !NOP QWORD [PB_WaitSemaphore+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  WaitSemaphore(Get_Buffer_Semaphore)
  ;Get_Buffer_Semaphore + D32
  ClearMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, Get_BufferSize+Get_Buffer_InBufSize, @MayaZero, *OutBufferInitB)
  Goto Get_Buffer_TOP
EndProcedure

Macro CLR_Rax_x64
  !MOV ah, al
  !SUB al, ah
  !MOVZX Rax, al
EndMacro

Procedure.l AsioProc(input.b, channel.l, *buffer, length.l, *User)
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [ClearMemoryMaya]
  !NOP QWORD [ClearMemoryMaya+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  ClearMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, length, @MayaZero, *buffer)
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_CopyArray]
  !NOP QWORD [PB_CopyArray+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [CopyMemoryMaya]
  !NOP QWORD [CopyMemoryMaya+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  Protected AsioDRVcacheMax.i = DRVcacheMax
  Protected Dim *DRVSND_AsioCache(AsioDRVcacheMax)
  CopyArray(*DRVSND_Cache(), *DRVSND_AsioCache() )
  Protected AsioDRVcache.i, *AsioDRVcacheTarget
  Protected *AsioProcBuffer ; = *buffer
  Protected AsioProcLength.i; = length
  Protected AsioD0.i, AsioD8.i
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !MOVNTI QWORD [p.v_AsioD0], R8
  !INC R8b
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !MOVNTI QWORD [p.v_AsioD8], R8
  ClearMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, AsioD8, @MayaZero, @*AsioProcBuffer)
  ClearMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, AsioD8, @MayaZero, @AsioProcLength)
  CopyMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, AsioD8, @*buffer, @*AsioProcBuffer)
  CopyMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, AsioD8, @length, @AsioProcLength)
  CopyMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, AsioD8, @AsioProcLength, @AsioProcLength)
  ClearMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, AsioProcLength, @MayaZero, *AsioProcBuffer)
  ;
  If *OutBufferMax < ( *OutBuffer + AsioProcLength )
    Goto AsioProcMemoryCopyA
  ElseIf *OutBufferMax = ( *OutBuffer + AsioProcLength )
    Goto AsioProcMemoryCopyB
  Else
    Goto AsioProcMemoryCopyC
  EndIf
  ;
  AsioProcMemoryCopyA:
  CopyMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, (*OutBufferMax-*OutBuffer), *OutBuffer, *AsioProcBuffer)
  Swap *OutBufferInit, *OutBufferInitB
  !NOP QWORD [Rip]
  !NOP QWORD [PB_SignalSemaphore]
  !NOP QWORD [PB_SignalSemaphore+8]
  !NOP QWORD [PB_SignalSemaphore+16]
  !NOP QWORD [PB_SignalSemaphore+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  SignalSemaphore(Get_Buffer_Semaphore)
  ;Get_Buffer_Semaphore = MayaZero
  *OutBufferMax = *OutBufferInit + Get_BufferSize
  *OutBuffer = *OutBufferInit
  CopyMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, AsioProcLength-(*OutBufferMax-*OutBuffer), *OutBuffer, *AsioProcBuffer+(*OutBufferMax-*OutBuffer))
  
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeBeginPeriod]
  !NOP QWORD [timeBeginPeriod+8]
  !NOP QWORD [timeBeginPeriod+16]
  !NOP QWORD [timeBeginPeriod+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeEndPeriod]
  !NOP QWORD [timeEndPeriod+8]
  !NOP QWORD [timeEndPeriod+16]
  !NOP QWORD [timeEndPeriod+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetTime]
  !NOP QWORD [timeGetTime+8]
  !NOP QWORD [timeGetTime+16]
  !NOP QWORD [timeGetTime+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetDevCaps]
  !NOP QWORD [timeGetDevCaps+8]
  !NOP QWORD [timeGetDevCaps+16]
  !NOP QWORD [timeGetDevCaps+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetSystemTime]
  !NOP QWORD [timeGetSystemTime+8]
  !NOP QWORD [timeGetSystemTime+16]
  !NOP QWORD [timeGetSystemTime+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [QueryPerformanceCounter]
  !NOP QWORD [QueryPerformanceCounter+8]
  !NOP QWORD [QueryPerformanceCounter+16]
  !NOP QWORD [QueryPerformanceCounter+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [QueryPerformanceFrequency]
  !NOP QWORD [QueryPerformanceFrequency+8]
  !NOP QWORD [QueryPerformanceFrequency+16]
  !NOP QWORD [QueryPerformanceFrequency+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PureBasicStart]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  CopyMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, AsioProcLength, *AsioProcBuffer, *AsioProcBuffer)
  SoundDriversCache
  CLR_Rax_x64
  ProcedureReturn AsioProcLength
  ;
  AsioProcMemoryCopyB:
  CopyMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, AsioProcLength, *OutBuffer, *AsioProcBuffer)
  Swap *OutBufferInit, *OutBufferInitB
  !NOP QWORD [Rip]
  !NOP QWORD [PB_SignalSemaphore]
  !NOP QWORD [PB_SignalSemaphore+8]
  !NOP QWORD [PB_SignalSemaphore+16]
  !NOP QWORD [PB_SignalSemaphore+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  SignalSemaphore(Get_Buffer_Semaphore)
  ;Get_Buffer_Semaphore = MayaZero
  *OutBufferMax = *OutBufferInit + Get_BufferSize
  *OutBuffer = *OutBufferInit
  
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeBeginPeriod]
  !NOP QWORD [timeBeginPeriod+8]
  !NOP QWORD [timeBeginPeriod+16]
  !NOP QWORD [timeBeginPeriod+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeEndPeriod]
  !NOP QWORD [timeEndPeriod+8]
  !NOP QWORD [timeEndPeriod+16]
  !NOP QWORD [timeEndPeriod+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetTime]
  !NOP QWORD [timeGetTime+8]
  !NOP QWORD [timeGetTime+16]
  !NOP QWORD [timeGetTime+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetDevCaps]
  !NOP QWORD [timeGetDevCaps+8]
  !NOP QWORD [timeGetDevCaps+16]
  !NOP QWORD [timeGetDevCaps+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetSystemTime]
  !NOP QWORD [timeGetSystemTime+8]
  !NOP QWORD [timeGetSystemTime+16]
  !NOP QWORD [timeGetSystemTime+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [QueryPerformanceCounter]
  !NOP QWORD [QueryPerformanceCounter+8]
  !NOP QWORD [QueryPerformanceCounter+16]
  !NOP QWORD [QueryPerformanceCounter+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [QueryPerformanceFrequency]
  !NOP QWORD [QueryPerformanceFrequency+8]
  !NOP QWORD [QueryPerformanceFrequency+16]
  !NOP QWORD [QueryPerformanceFrequency+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PureBasicStart]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  CopyMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, AsioProcLength, *AsioProcBuffer, *AsioProcBuffer)
  SoundDriversCache
  CLR_Rax_x64
  ProcedureReturn AsioProcLength
  ;
  AsioProcMemoryCopyC:
  CopyMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, AsioProcLength, *OutBuffer, *AsioProcBuffer)
  *OutBuffer + AsioProcLength
  
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeBeginPeriod]
  !NOP QWORD [timeBeginPeriod+8]
  !NOP QWORD [timeBeginPeriod+16]
  !NOP QWORD [timeBeginPeriod+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeEndPeriod]
  !NOP QWORD [timeEndPeriod+8]
  !NOP QWORD [timeEndPeriod+16]
  !NOP QWORD [timeEndPeriod+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetTime]
  !NOP QWORD [timeGetTime+8]
  !NOP QWORD [timeGetTime+16]
  !NOP QWORD [timeGetTime+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetDevCaps]
  !NOP QWORD [timeGetDevCaps+8]
  !NOP QWORD [timeGetDevCaps+16]
  !NOP QWORD [timeGetDevCaps+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetSystemTime]
  !NOP QWORD [timeGetSystemTime+8]
  !NOP QWORD [timeGetSystemTime+16]
  !NOP QWORD [timeGetSystemTime+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [QueryPerformanceCounter]
  !NOP QWORD [QueryPerformanceCounter+8]
  !NOP QWORD [QueryPerformanceCounter+16]
  !NOP QWORD [QueryPerformanceCounter+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [QueryPerformanceFrequency]
  !NOP QWORD [QueryPerformanceFrequency+8]
  !NOP QWORD [QueryPerformanceFrequency+16]
  !NOP QWORD [QueryPerformanceFrequency+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PureBasicStart]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  CopyMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, AsioProcLength, *AsioProcBuffer, *AsioProcBuffer)
  SoundDriversCache
  CLR_Rax_x64
  ProcedureReturn AsioProcLength
EndProcedure

Global ButtonImage_OnAir.i
ButtonImage_OnAir = CreateImage(C_PB_Any, D37, D37)
StartDrawing(ImageOutput(ButtonImage_OnAir))
Box(D0, D0, D37, D37, H_FFFFFF)
DrawingMode(C_PB_2DDrawing_Gradient)
BackColor(H_00EE00)
FrontColor(H_005500)
BoxedGradient(D0, D0, D37, D37)
Circle(D19, D19, D100)
StopDrawing()

Global ButtonImage_OffAir.i
ButtonImage_OffAir = CreateImage(C_PB_Any, D37, D37)
StartDrawing(ImageOutput(ButtonImage_OffAir))
Box(D0, D0, D37, D37, H_FFFFFF)
DrawingMode(C_PB_2DDrawing_Gradient)
BackColor(H_0000EE)
FrontColor(H_000055)
BoxedGradient(D0, D0, D37, D37)
Circle(D19, D19, D100)
StopDrawing()

Global GadgetFont.i
GadgetFont = LoadFont(C_PB_Any, "Arial", D15, C_PB_Font_HighQuality)
If GadgetFont
  SetGadgetFont(C_PB_Default, FontID(GadgetFont))
EndIf

If OpenWindow(Enum_Window_NROrya, D0, D0, D522, D330, "NetRadio Lorya "+#NRVer, C_PB_Window_SystemMenu | C_PB_Window_TitleBar| C_PB_Window_ScreenCentered | C_PB_Window_BorderLess)
  SetWindowColor(Enum_Window_NROrya, H_FACE87)
  TreeGadget(Enum_Tree_PlayList, D10, D50, D500, D250, C_PB_Tree_AlwaysShowSelection )
  SetGadgetColor(Enum_Tree_PlayList, C_PB_Gadget_BackColor, H_C0C0C0)
  ButtonGadget(Enum_ButtonImage_GetPlayList, D10, D5, D100, D40, "PLAY")
  ButtonGadget(Enum_ButtonImage_GetPlayList2, D330, D5, D100, D40, "PlusRS", C_PB_Button_Toggle)
  ImageGadget(Enum_Image_OnAir, D120, D7, D37, D37, ImageID(ButtonImage_OffAir))
Else
  End
EndIf

Structure radio
  title.s
  url.s
  text.s
EndStructure

Global NewList PLS.radio()
Global FileNo.i, FileReadLoop.i, FileReadLoopNo.i, FileBufStr.s

FileNo = ReadFile(C_PB_Any, GetPathPart(ProgramFilename())+"DI.FM - Favorites.pls")
If FileNo=D0
  FileNo = ReadFile(C_PB_Any, GetPathPart(ProgramFilename())+"My radio - Favorites.pls")
EndIf
If FileNo>D0
  If ReadString(FileNo)="[playlist]"
    FileReadLoop = Val(StringField(ReadString(FileNo),D2, "=") )
    For FileReadLoopNo=D1 To FileReadLoop
      AddElement(PLS())
      PLS()\url =  StringField(ReadString(FileNo),D2, "=")
      PLS()\title = StringField(ReadString(FileNo),D2, "=")
      PLS()\text = GetURLPart(PLS()\url, #PB_URL_Site)+ " - " + GetURLPart(PLS()\url, #PB_URL_Path)
      FileBufStr = StringField(ReadString(FileNo),D2, "=")
    Next
  EndIf
  CloseFile(FileNo)
Else
  ERRMES1A="I can't find favorites playlist."+Chr(D10+D2+D1)+Chr(D10)+Chr(D10+D2+D1)+Chr(D10)
  !JMP ERROR_STARTUP_END
EndIf

ForEach PLS()
  AddGadgetItem( Enum_Tree_PlayList, DM1, PLS()\title, D0, D0)
  AddGadgetItem( Enum_Tree_PlayList, DM1, PLS()\text, D0, D1)
Next

Global WindowEventVar.i, PostRadioStationA.s, PostRadioStationB.s, PostRadioStationC.s
Global SincFlags.i

SelectRadioStation:
SetGadgetState(Enum_Image_OnAir, ImageID(ButtonImage_OffAir))
Repeat
  WindowEventVar = WaitWindowEvent()
  If WindowEventVar = C_PB_Event_Gadget
    If EventGadget() = Enum_ButtonImage_GetPlayList
      FileBufStr = GetGadgetText( Enum_Tree_PlayList )
      ClearMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, D31752000+D524288, *Get_BufferA, *Get_BufferA)
      ClearMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, D31752000+D524288, *Get_BufferB, *Get_BufferB)
      ClearMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, D31752000+D524288, *OutBufferInit, *OutBufferInit)
      ClearMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, D31752000+D524288, *OutBufferInitB, *OutBufferInitB)
      ClearMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, D31752000+D524288, @MayaZero, *SINC_BufferA)
      ClearMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, D31752000+D524288, @MayaZero, *SINC_BufferB)
      ClearMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, D524288, @MayaZero, *sinc_table_set)
      ClearMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, D524288, @MayaZero, *sinc_table_set2)
      ClearMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, D524288, *Get_Buffer_InBuf, *Get_Buffer_InBuf)
      ForEach PLS()
        If FileBufStr=PLS()\text Or FileBufStr=PLS()\title
          PostRadioStationA = PLS()\url
          PostRadioStationB = DRVSND_FILENAME + " : " + PLS()\title
          PostRadioStationC = PLS()\text
          Break 2
        EndIf
      Next
    EndIf
  ElseIf WindowEventVar = C_PB_Event_CloseWindow
    ERRMES1A="This radio software output Max volume, Please use USB-DAC."+Chr(D10+D2+D1)+Chr(D10)+Chr(D10+D2+D1)+Chr(D10)
    !JMP ERROR_STARTUP_END
  EndIf
ForEver

BassCache
N_BASS_CONFIG_NET_BUFFER	= D10 + D2
BASS_Init( D0, D44100, D0, D0, D0)
BASS_SetConfig(N_BASS_CONFIG_NET_BUFFER, Val(ReverseString(ReverseString(Str( (D50+D40)*D50*D10*D2 ) ) ) ) )

If Len(PostRadioStationA)>D0
  BassCache
  chan = BASS_StreamCreateURL(@PostRadioStationA, D0, N_BASS_UNICODE | N_BASS_STREAM_DECODE | N_BASS_SAMPLE_FLOAT , D0,  D0)
  If chan=D0
    BASS_Free()
    Goto SelectRadioStation
  EndIf
Else
  BASS_Free()
  Goto SelectRadioStation
EndIf
SetGadgetState(Enum_Image_OnAir, ImageID(ButtonImage_OnAir))

; #BASS_ATTRIB_FREQ	 = 1
Global FreqFloat.f, Freq.i
If BASS_ChannelGetAttribute(chan, D1, @FreqFloat)
  Freq = IntQ(FreqFloat)
Else
  BASS_Free()
  ERRMES1A="I can't use this sound device."+Chr(D10+D2+D1)+Chr(D10)+Chr(D10+D2+D1)+Chr(D10)
  !JMP ERROR_STARTUP_END
EndIf

*DRVSND_Cache(DRVcacheMax) = Val(ReverseString(ReverseString(Str( @AsioProc() ) ) ) )

CreateSincTable(D0, D0, D2048)
Swap *sinc_table_set, *sinc_table_set2
CreateSincTable(D0, D0, D16384)

SincFlags = D0
If GetGadgetState(Enum_ButtonImage_GetPlayList2)
  SincFlags = D2
EndIf
FreeGadget(Enum_ButtonImage_GetPlayList)
FreeGadget(Enum_ButtonImage_GetPlayList2)
FreeGadget(Enum_Image_OnAir)
FreeGadget(Enum_Tree_PlayList)
FreeImage(ButtonImage_OnAir)
FreeImage(ButtonImage_OffAir)
ResizeWindow(Enum_Window_NROrya, C_PB_Ignore, C_PB_Ignore, C_PB_Ignore, D50)
SetWindowTitle(Enum_Window_NROrya, PostRadioStationB)
CreateStatusBar(Enum_StatusBar, WindowID(Enum_Window_NROrya))
AddStatusBarField(C_PB_Ignore)

SIMPLE_MOVE_REGISTERS_Up_and_Down
AddElement(*DRVSND_CACHE_LIST()) : *DRVSND_CACHE_LIST() = Val(ReverseString(ReverseString(Str(@BackupProcess() ) ) ) )
AddElement(*DRVSND_CACHE_LIST()) : *DRVSND_CACHE_LIST() = Val(ReverseString(ReverseString(Str(@SincInterpolation128() ) ) ) )
AddElement(*DRVSND_CACHE_LIST()) : *DRVSND_CACHE_LIST() = Val(ReverseString(ReverseString(Str(@AsioProc() ) ) ) )

DRVcacheMax = ListSize(*DRVSND_CACHE_LIST()) - D1
ReDim *DRVSND_Cache(DRVcacheMax)
ForEach *DRVSND_CACHE_LIST()
  *DRVSND_Cache(ListIndex(*DRVSND_CACHE_LIST())) = *DRVSND_CACHE_LIST()
Next

Get_Buffer_Semaphore = Val(ReverseString(ReverseString(Str( CreateSemaphore() ) ) ) )
; Global Get_Buffer_SemaphoreEnd.i
; Get_Buffer_SemaphoreEnd = CreateSemaphore()
Get_Buffer_Thread = CreateThread(Val(ReverseString(ReverseString(Str( @Get_Buffer() ) ) ) ), D0)

; CallDebugger
; WaitSemaphore(Get_Buffer_Semaphore)
; CallDebugger

Procedure PreProcess(*dummy)
  SincInterpolation128(*SINC_BufferA, *sinc_table_set, *SINC_BufferB, D8193, Get_BufferSize)
EndProcedure

SetPriorityClass_(*CurrentProcess, C_ABOVE_NORMAL_PRIORITY_CLASS)
PreProcess_Thread.i = CreateThread(Val(ReverseString(ReverseString(Str( @PreProcess() ) ) ) ), D0)
While IsThread(PreProcess_Thread) : WaitWindowEvent(D100) : Wend

Global WasapiStop.i, MusicStarted.i
; #BASS_ASIO_THREAD = 1
; #BASS_ASIO_FORMAT_FLOAT =19
SIMPLE_MOVE_REGISTERS_Up_and_Down
BassCache
If BASS_ASIO_Init(Asio_Device_Global, D1) And BASS_ASIO_CheckRate(Freq)
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !INC R8b
  !MOVNTI QWORD [v_WasapiStop], R8
  BASS_ASIO_SetRate(Freq)
  BASS_ASIO_ChannelEnable(D0,D0, *DRVSND_Cache(DRVcacheMax), D0)
  BASS_ASIO_ChannelJoin(D0,D1,D0)
  BASS_ASIO_ChannelSetFormat(D0,D0,D19)
  ASIO_ChannelSetVolume_Stabilizer
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !INC R8b
  !INC R8b
  !MOVNTI QWORD [v_MusicStarted], R8
  BASS_ASIO_Start(D0, D0)
  Repeat
    !NOP QWORD [Rip]
    !NOP QWORD [Rip]
    WindowEventVar = WaitWindowEvent(D250)
    If WindowEventVar = C_PB_Event_CloseWindow
      If IsThread(Get_Buffer_Thread)
        KillThread(Get_Buffer_Thread)
      EndIf
      Break
    EndIf
  ForEver
  BASS_ASIO_Stop()
EndIf
BASS_ASIO_Free()
BASS_ChannelStop(chan)
BASS_StreamFree(chan)
BASS_Free()

End

; p.v_C_PB_MessageRequester_Ok = 0
; p.v_C_PB_MessageRequester_Error = 16

!ERROR_STARTUP_END:
#ERRMES2="NetRadio Lorya "+#NRVer+Chr(13)+Chr(10)+"Low pass filter 9801Hz slow accurated pi 27 digit."+Chr(13)+Chr(10)
#ERRMES3="Required DI.FM - Favorites.pls or My radio - Favorites.pls"+Chr(13)+Chr(10)
#ERRMES2A="Developer Hiroyuki Yokota (oryaaaaa) Okazaki 444-3174"+Chr(13)+Chr(10)+Chr(13)+Chr(10)
#ERRMES6="PureBasic 6.02 LTS "+Chr(13)+Chr(10)
#ERRMES7="Copyright (c) 1998-2023 Fantaisie Software"+Chr(13)+Chr(10)+Chr(13)+Chr(10)
#ERRMES8="flat assembler  version 1.73"+Chr(13)+Chr(10)
#ERRMES9="Copyright (c) 1999-2021, Tomasz Grysztar"+Chr(13)+Chr(10)+Chr(13)+Chr(10)
#ERRMES4="BASS 2.4.14 Shareware / BASSASIO 1.3.1 Shareware"+Chr(13)+Chr(10)
#ERRMES5="Copyright (c) 1999-2019 Un4seen Developments Ltd. "+Chr(13)+Chr(10)+Chr(13)+Chr(10)
MessageRequester("ERROR",ERRMES1A+#ERRMES2+#ERRMES3+#ERRMES2A+#ERRMES6+#ERRMES7+#ERRMES8+#ERRMES9+#ERRMES4+#ERRMES5, D15+D1)
End
!RET
Macro CPUcache_timeGetTime_Sentence
  timeBeginPeriod_(0)
  timeEndPeriod_(0)
  timeGetTime_()
  timeGetDevCaps_(0,0)
  timeGetSystemTime_(0,0)
  QueryPerformanceCounter_(0)
  QueryPerformanceFrequency_(0)
EndMacro
CPUcache_timeGetTime_Sentence
BASS_ASIO_ChannelSetVolume(0, -1, 1.0)
User avatar
oryaaaaa
Addict
Addict
Posts: 825
Joined: Mon Jan 12, 2004 11:40 pm
Location: Okazaki, JAPAN

Re: NetRadioLoryaPhantomRecord : SuperBass netradio For HIGH END AUDIO [Windows]

Post by oryaaaaa »

GetAsioDeviceName.txt

Code: Select all

; Get asio device name - ANSI access
; Date of survey Y=2025, M= 04, D=18
; Please select only use the device you want to output. Delete lines.
; 
Gustard USB Audio Device = 1
USB DAC ASIO = 4
My radio - Favorites.pls

Code: Select all

[playlist]
NumberOfEntries=3
File1= nightcore_hi
Title1=DI.FM - Nightcore
Length1=0
File2= darkpsytrance_hi
Title2=DI.FM - Dark PsyTrance
Length2=0
File3= darkdnb_hi
Title3=DI.FM - Dark DnB
Length3=0
Version=2
XMOS Sound driver ASIO setup
44.1kHz 32bits Latency 4ms ( 256 samples )

Support CPU
Intel Core i7-13700 i7-14700 (RapterLake P-8cores E-8cores Cache 30MB TB5.1GHz)
BIOS setup E-cores disable, HyperThread disable, this software use P-8cores TB5.1GHz

SuperBass how to:
S32768 + LPF 9801Hz Slow
PlusRS: RS32768 + RS4096 + LPF 9801Hz Slow
RS4096: General Studio frequency band 5Hz - 22kHz

I don't tell this audio solutions for general peoples in JAPAN.

I release this executables package. My homepage here.
https://www.mics.ne.jp/~ai_closed_mynet/

USB-DAC S.M.S.L M300SE CS43131 FL5 (NOS)
Headphone audio-technica ATH-AVA500 : M300SE VOL.18-22
PC (User reported):
ASUS S5 SFF (S501SER) Core i7-14700 RAM 32GB DDR5-4400 Wi-Fi 6E Intel B760
User avatar
oryaaaaa
Addict
Addict
Posts: 825
Joined: Mon Jan 12, 2004 11:40 pm
Location: Okazaki, JAPAN

Re: NetRadioLoryaPhantomRecord : SuperBass netradio For HIGH END AUDIO [Windows]

Post by oryaaaaa »

Updated today.

Code: Select all

; 
; ProcedureDLL TransMemoryLorya(dummyRcx.i,dummyRdx.i,dummyR8.i,dummyR9.i, CMM_length.i, *CMM_in, *CMM_out)
;   CopyMemoryMace_Inside
;   Protected CMM_D8.i
;   !SHL R8b,1
;   !SHL R8b,1
;   !SHL R8b,1
;   !SHL R8b,1
;   !SHL R8b,1
;   !SHL R8b,1
;   !SHL R8b,1
;   !SHL R8b,1
;   !MOVZX R8, R8b
;   !INC R8b
;   !INC R8b
;   !INC R8b
;   !INC R8b
;   !INC R8b
;   !INC R8b
;   !INC R8b
;   !INC R8b
;   !MOVZX R8, R8b
;   !MOVQ mm1, R8
;   !MOVNTQ QWORD [p.v_CMM_D8], mm1
;   If dummyRcx=dummyRdx And dummyR8=dummyR9 And dummyRcx=dummyR8 And dummyRdx=dummyR9
;     !HLT
;   EndIf
;   TransMemoryLorya_Top:
;   If CMM_length>=CMM_D8
;     CMM_length - CMM_D8
;     CopyMemoryMace_InsideSetup
;     !LEA Rcx, [p.v_CMM_length]
;     !MOV R8, [p.p_CMM_in]
;     !MOV R9, [p.p_CMM_out]
;     !MOV Rax, [Rcx]
;     CopyMemoryMace_Inside
;     !MOVQ mm1, QWORD [R8+Rax]
;     !MOVQ mm7, mm1
;     !MOVQ mm2, mm7
;     !MOVQ mm6, mm2
;     !MOVQ mm4, mm6
;     !MOVQ mm3, mm4
;     !MOVQ mm5, mm3
;     !MOVNTQ QWORD [R9+Rax], mm5
;     Goto TransMemoryLorya_Top
;   EndIf
;   !EMMS
; EndProcedure

; IncludeFile "CopyMemoryMaya9.pbi"
Import "CopyMemoryMaya.lib"
  CopyMemoryMaya(dummyRcx.i,dummyRdx.i,dummyR8.i,dummyR9.i, CMM_length.i, *CMM_in, *CMM_out)
  ClearMemoryMaya(dummyRcx.i,dummyRdx.i,dummyR8.i,dummyR9.i, CMM_length.i, *CMM_in, *CMM_out)
  TransMemoryLorya(dummyRcx.i,dummyRdx.i,dummyR8.i,dummyR9.i, CMM_length.i, *CMM_in, *CMM_out)
EndImport

#NRVer = "Phantom record Blade Maya"

  CopyMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, Get_Buffer_InBufSize,*Get_BufferA+pdiv,*Get_Buffer_InBuf)
  TransMemoryLorya(dummyRcx,dummyRdx, dummyR8,dummyR9, Get_BufferSize+Get_Buffer_InBufSize, *Get_BufferA, *SINC_BufferA)
  ClearMemoryMaya(dummyRcx, dummyRdx, dummyR8, dummyR9, Get_BufferSize+Get_Buffer_InBufSize, @MayaZero, *Get_BufferA)
User avatar
oryaaaaa
Addict
Addict
Posts: 825
Joined: Mon Jan 12, 2004 11:40 pm
Location: Okazaki, JAPAN

Re: NetRadioLoryaPhantomRecord : SuperBass netradio For HIGH END AUDIO [Windows]

Post by oryaaaaa »

Latest version : Lines 1 - 3124

Code: Select all

MessageRequester("End","Compiler options Executable Format Console And CPU With MMX") : End

Macro BassCache
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_NewList]
  !NOP QWORD [PB_NewList+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_AddElement]
  !NOP QWORD [PB_AddElement+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_AddGadgetItem3]
  !NOP QWORD [PB_AddGadgetItem3+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_AddStatusBarField]
  !NOP QWORD [PB_AddStatusBarField+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_AllocateMemory2]
  !NOP QWORD [PB_AllocateMemory2+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_BackColor_THREAD]
  !NOP QWORD [PB_BackColor_THREAD+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_Box2_THREAD]
  !NOP QWORD [PB_Box2_THREAD+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_BoxedGradient_THREAD]
  !NOP QWORD [PB_BoxedGradient_THREAD+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_ButtonGadget]
  !NOP QWORD [PB_ButtonGadget+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_Chr]
  !NOP QWORD [PB_Chr+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_Circle_THREAD]
  !NOP QWORD [PB_Circle_THREAD+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_CloseFile]
  !NOP QWORD [PB_CloseFile+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_ClosePreferences]
  !NOP QWORD [PB_ClosePreferences+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_CompareMemory]
  !NOP QWORD [PB_CompareMemory+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_CopyArray]
  !NOP QWORD [PB_CopyArray+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_Cos_DOUBLE]
  !NOP QWORD [PB_Cos_DOUBLE+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_CreateImage]
  !NOP QWORD [PB_CreateImage+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_CreateSemaphore]
  !NOP QWORD [PB_CreateSemaphore+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_CreateStatusBar]
  !NOP QWORD [PB_CreateStatusBar+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_CreateThread_THREAD]
  !NOP QWORD [PB_CreateThread_THREAD+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_DrawingMode_THREAD]
  !NOP QWORD [PB_DrawingMode_THREAD+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_EndAlphaImage]
  !NOP QWORD [PB_EndAlphaImage+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_EndThread]
  !NOP QWORD [PB_EndThread+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_EndVectorDrawing]
  !NOP QWORD [PB_EndVectorDrawing+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_Event_Free]
  !NOP QWORD [PB_Event_Free+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_Event_Init]
  !NOP QWORD [PB_Event_Init+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_EventGadget]
  !NOP QWORD [PB_EventGadget+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_ExaminePreferenceKeys]
  !NOP QWORD [PB_ExaminePreferenceKeys+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_FontID]
  !NOP QWORD [PB_FontID+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_FreeDesktops]
  !NOP QWORD [PB_FreeDesktops+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_FreeFiles]
  !NOP QWORD [PB_FreeFiles+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_FreeFileSystem]
  !NOP QWORD [PB_FreeFileSystem+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_FreeFont]
  !NOP QWORD [PB_FreeFont+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_FreeFonts]
  !NOP QWORD [PB_FreeFonts+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_FreeGadget]
  !NOP QWORD [PB_FreeGadget+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_FreeGadgets]
  !NOP QWORD [PB_FreeGadgets+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_FreeImages]
  !NOP QWORD [PB_FreeImages+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_FreeList]
  !NOP QWORD [PB_FreeList+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_FreeMemorys]
  !NOP QWORD [PB_FreeMemorys+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_FreeNetworks]
  !NOP QWORD [PB_FreeNetworks+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_FreeObjects]
  !NOP QWORD [PB_FreeObjects+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_FreePreferences]
  !NOP QWORD [PB_FreePreferences+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_FreeWindows]
  !NOP QWORD [PB_FreeWindows+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_FrontColor_THREAD]
  !NOP QWORD [PB_FrontColor_THREAD+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_GadgetToolTip]
  !NOP QWORD [PB_GadgetToolTip+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_GetFilePart]
  !NOP QWORD [PB_GetFilePart+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_GetGadgetState]
  !NOP QWORD [PB_GetGadgetState+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_GetGadgetText]
  !NOP QWORD [PB_GetGadgetText+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_GetPathPart]
  !NOP QWORD [PB_GetPathPart+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_GetURLPart]
  !NOP QWORD [PB_GetURLPart+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_ImageOutput]
  !NOP QWORD [PB_ImageOutput+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_Init2DDrawing]
  !NOP QWORD [PB_Init2DDrawing+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_InitAlphaImage]
  !NOP QWORD [PB_InitAlphaImage+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_InitArray]
  !NOP QWORD [PB_InitArray+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_InitBMPImagePlugin]
  !NOP QWORD [PB_InitBMPImagePlugin+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_InitDesktop]
  !NOP QWORD [PB_InitDesktop+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_InitFile]
  !NOP QWORD [PB_InitFile+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_InitFont]
  !NOP QWORD [PB_InitFont+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_InitGadget]
  !NOP QWORD [PB_InitGadget+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_InitHTTP]
  !NOP QWORD [PB_InitHTTP+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_InitializeStructure]
  !NOP QWORD [PB_InitializeStructure+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_InitImage]
  !NOP QWORD [PB_InitImage+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_InitImageDecoder]
  !NOP QWORD [PB_InitImageDecoder+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_InitList]
  !NOP QWORD [PB_InitList+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_InitMap]
  !NOP QWORD [PB_InitMap+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_InitMemory]
  !NOP QWORD [PB_InitMemory+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_InitNetworkInternal]
  !NOP QWORD [PB_InitNetworkInternal+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_InitPreferences]
  !NOP QWORD [PB_InitPreferences+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_InitProcess]
  !NOP QWORD [PB_InitProcess+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_InitRequester]
  !NOP QWORD [PB_InitRequester+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_InitStatusBar]
  !NOP QWORD [PB_InitStatusBar+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_InitThread]
  !NOP QWORD [PB_InitThread+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_InitVectorDrawing]
  !NOP QWORD [PB_InitVectorDrawing+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_InitWindow]
  !NOP QWORD [PB_InitWindow+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_IntQ]
  !NOP QWORD [PB_IntQ+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_IsThread]
  !NOP QWORD [PB_IsThread+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_KillThread]
  !NOP QWORD [PB_KillThread+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_Len]
  !NOP QWORD [PB_Len+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_ListIndex]
  !NOP QWORD [PB_ListIndex+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_ListSize]
  !NOP QWORD [PB_ListSize+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_LoadFont2]
  !NOP QWORD [PB_LoadFont2+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_Lof]
  !NOP QWORD [PB_Lof+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_Log10_DOUBLE]
  !NOP QWORD [PB_Log10_DOUBLE+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_MemorySize]
  !NOP QWORD [PB_MemorySize+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_MessageRequester2]
  !NOP QWORD [PB_MessageRequester2+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_NextElement]
  !NOP QWORD [PB_NextElement+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_NextPreferenceKey]
  !NOP QWORD [PB_NextPreferenceKey+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_OpenPreferences]
  !NOP QWORD [PB_OpenPreferences+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_OpenWindow2]
  !NOP QWORD [PB_OpenWindow2+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_OptionGadget]
  !NOP QWORD [PB_OptionGadget+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_PeekF]
  !NOP QWORD [PB_PeekF+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_PeekS3]
  !NOP QWORD [PB_PeekS3+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_PokeD]
  !NOP QWORD [PB_PokeD+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_PokeF]
  !NOP QWORD [PB_PokeF+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_PreferenceKeyValue]
  !NOP QWORD [PB_PreferenceKeyValue+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_ProgramFilename]
  !NOP QWORD [PB_ProgramFilename+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_ReadData]
  !NOP QWORD [PB_ReadData+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_ReadFile]
  !NOP QWORD [PB_ReadFile+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_ReadFile2]
  !NOP QWORD [PB_ReadFile2+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_ReadString]
  !NOP QWORD [PB_ReadString+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_ResetList]
  !NOP QWORD [PB_ResetList+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_ResizeWindow]
  !NOP QWORD [PB_ResizeWindow+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_ReverseString]
  !NOP QWORD [PB_ReverseString+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_SetGadgetColor]
  !NOP QWORD [PB_SetGadgetColor+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_SetGadgetFont]
  !NOP QWORD [PB_SetGadgetFont+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_SetWindowColor]
  !NOP QWORD [PB_SetWindowColor+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_SetWindowTitle]
  !NOP QWORD [PB_SetWindowTitle+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_SignalSemaphore]
  !NOP QWORD [PB_SignalSemaphore+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_Sin_DOUBLE]
  !NOP QWORD [PB_Sin_DOUBLE+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_SmartWindowRefresh]
  !NOP QWORD [PB_SmartWindowRefresh+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_StartDrawing_THREAD]
  !NOP QWORD [PB_StartDrawing_THREAD+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_StatusBarProgress3]
  !NOP QWORD [PB_StatusBarProgress3+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_StopDrawing_THREAD]
  !NOP QWORD [PB_StopDrawing_THREAD+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_Str]
  !NOP QWORD [PB_Str+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_StringField]
  !NOP QWORD [PB_StringField+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_ThreadPriority]
  !NOP QWORD [PB_ThreadPriority+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_TreeGadget2]
  !NOP QWORD [PB_TreeGadget2+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_Val]
  !NOP QWORD [PB_Val+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_WaitSemaphore]
  !NOP QWORD [PB_WaitSemaphore+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_WaitThread]
  !NOP QWORD [PB_WaitThread+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_WaitWindowEvent]
  !NOP QWORD [PB_WaitWindowEvent+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_WaitWindowEvent2]
  !NOP QWORD [PB_WaitWindowEvent2+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_WindowID]
  !NOP QWORD [PB_WindowID+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ASIO_ChannelEnable]
  !NOP QWORD [BASS_ASIO_ChannelEnable+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ASIO_ChannelJoin]
  !NOP QWORD [BASS_ASIO_ChannelJoin+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ASIO_ChannelSetFormat]
  !NOP QWORD [BASS_ASIO_ChannelSetFormat+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ASIO_ChannelSetVolume]
  !NOP QWORD [BASS_ASIO_ChannelSetVolume+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ASIO_CheckRate]
  !NOP QWORD [BASS_ASIO_CheckRate+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ASIO_ErrorGetCode]
  !NOP QWORD [BASS_ASIO_ErrorGetCode+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ASIO_Free]
  !NOP QWORD [BASS_ASIO_Free+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ASIO_GetDeviceInfo]
  !NOP QWORD [BASS_ASIO_GetDeviceInfo+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ASIO_Init]
  !NOP QWORD [BASS_ASIO_Init+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ASIO_SetRate]
  !NOP QWORD [BASS_ASIO_SetRate+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ASIO_Start]
  !NOP QWORD [BASS_ASIO_Start+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ASIO_Stop]
  !NOP QWORD [BASS_ASIO_Stop+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ChannelGetAttribute]
  !NOP QWORD [BASS_ChannelGetAttribute+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ChannelGetData]
  !NOP QWORD [BASS_ChannelGetData+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_ChannelStop]
  !NOP QWORD [BASS_ChannelStop+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_Free]
  !NOP QWORD [BASS_Free+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_Init]
  !NOP QWORD [BASS_Init+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_SetConfig]
  !NOP QWORD [BASS_SetConfig+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_StreamCreateURL]
  !NOP QWORD [BASS_StreamCreateURL+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [BASS_StreamFree]
  !NOP QWORD [BASS_StreamFree+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [ClearMemoryMaya]
  !NOP QWORD [ClearMemoryMaya+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [CopyMemoryMaya]
  !NOP QWORD [CopyMemoryMaya+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [ExitProcess]
  !NOP QWORD [ExitProcess+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [GetCurrentProcess]
  !NOP QWORD [GetCurrentProcess+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [GetModuleHandleW]
  !NOP QWORD [GetModuleHandleW+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [HeapCreate]
  !NOP QWORD [HeapCreate+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [HeapDestroy]
  !NOP QWORD [HeapDestroy+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [QueryPerformanceCounter]
  !NOP QWORD [QueryPerformanceCounter+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [QueryPerformanceFrequency]
  !NOP QWORD [QueryPerformanceFrequency+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [SetPriorityClass]
  !NOP QWORD [SetPriorityClass+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [TransMemoryLorya]
  !NOP QWORD [TransMemoryLorya+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [memset]
  !NOP QWORD [memset+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeBeginPeriod]
  !NOP QWORD [timeBeginPeriod+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeEndPeriod]
  !NOP QWORD [timeEndPeriod+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetDevCaps]
  !NOP QWORD [timeGetDevCaps+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetSystemTime]
  !NOP QWORD [timeGetSystemTime+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetTime]
  !NOP QWORD [timeGetTime+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [SYS_CopyString]
  !NOP QWORD [SYS_CopyString+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [SYS_CheckStringBuffer]
  !NOP QWORD [SYS_CheckStringBuffer+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [SYS_FreeArray]
  !NOP QWORD [SYS_FreeArray+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [SYS_StringEqual]
  !NOP QWORD [SYS_StringEqual+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [SYS_AllocateString4]
  !NOP QWORD [SYS_AllocateString4+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [SYS_FastAllocateStringFree4]
  !NOP QWORD [SYS_FastAllocateStringFree4+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [SYS_AllocateArray]
  !NOP QWORD [SYS_AllocateArray+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [SYS_ReAllocateArray]
  !NOP QWORD [SYS_ReAllocateArray+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [SYS_InitString]
  !NOP QWORD [SYS_InitString+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [SYS_FreeStrings]
  !NOP QWORD [SYS_FreeStrings+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PureBasicStart]
  !NOP QWORD [PureBasicStart+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]  
EndMacro

BassCache

; IncludeFile "CopyMemoryMaya10.pbi"
Import "CopyMemoryMaya.lib"
  CopyMemoryMaya(dummyRcx.i, CMM_length.i, *CMM_in, *CMM_out)
  ClearMemoryMaya(dummyRcx.i, CMM_length.i, *CMM_in, *CMM_out)
  TransMemoryLorya(dummyRcx.i, CMM_length.i, *CMM_in, *CMM_out)
EndImport
Global dummyRcx.i
!MOV cl, R8b
!SUB R8b, cl
!MOVZX R8, R8b
!MOVNTI QWORD [v_dummyRcx], R8

Macro MOV_Rax_Rax_Up_Down
  !MOV al, al
  !MOV ah, ah
  !MOV ax, ax
  !MOV Rax, Rax
  !MOV ax, ax
  !MOV ah, ah
  !MOV al, al
EndMacro

Macro MOV_Rbx_Rbx_Up_Down
  !MOV bl, bl
  !MOV bh, bh
  !MOV bx, bx
  !MOV Rbx, Rbx
  !MOV bx, bx
  !MOV bh, bh
  !MOV bl, bl
EndMacro

Macro MOV_Rcx_Rcx_Up_Down
  !MOV cl, cl
  !MOV ch, ch
  !MOV cx, cx
  !MOV Rcx, Rcx
  !MOV cx, cx
  !MOV ch, ch
  !MOV cl, cl
EndMacro

Macro MOV_Rdx_Rdx_Up_Down
  !MOV dl, dl
  !MOV dh, dh
  !MOV dx, dx
  !MOV Rdx, Rdx
  !MOV dx, dx
  !MOV dh, dh
  !MOV dl, dl
EndMacro

Macro MOV_R8_R8_Up_Down
  !MOV R8b, R8b
  !MOV R8w, R8w
  !MOV R8, R8
  !MOV R8w, R8w
  !MOV R8b, R8b
EndMacro

Macro MOV_R9_R9_Up_Down
  !MOV R9b, R9b
  !MOV R9w, R9w
  !MOV R9, R9
  !MOV R9w, R9w
  !MOV R9b, R9b
EndMacro

Macro MOV_R10_R10_Up_Down
  !MOV R10b, R10b
  !MOV R10w, R10w
  !MOV R10, R10
  !MOV R10w, R10w
  !MOV R10b, R10b
EndMacro

Macro MOV_R11_R11_Up_Down
  !MOV R11b, R11b
  !MOV R11w, R11w
  !MOV R11, R11
  !MOV R11w, R11w
  !MOV R11b, R11b
EndMacro

Macro MOV_R12_R12_Up_Down
  !MOV R12b, R12b
  !MOV R12w, R12w
  !MOV R12, R12
  !MOV R12w, R12w
  !MOV R12b, R12b
EndMacro

Macro MOV_R13_R13_Up_Down
  !MOV R13b, R13b
  !MOV R13w, R13w
  !MOV R13, R13
  !MOV R13w, R13w
  !MOV R13b, R13b
EndMacro

Macro MOV_R14_R14_Up_Down
  !MOV R14b, R14b
  !MOV R14w, R14w
  !MOV R14, R14
  !MOV R14w, R14w
  !MOV R14b, R14b
EndMacro

Macro MOV_R15_R15_Up_Down
  !MOV R15b, R15b
  !MOV R15w, R15w
  !MOV R15, R15
  !MOV R15w, R15w
  !MOV R15b, R15b
EndMacro

Macro MOV_Rsp_Rsp_Up_Down
  !MOV spl, spl
  !MOV sp, sp
  !MOV Rsp, Rsp
  !MOV sp, sp
  !MOV spl, spl
EndMacro

Macro MOV_Rbp_Rbp_Up_Down
  !MOV bpl, bpl
  !MOV bp, bp
  !MOV Rbp, Rbp
  !MOV bp, bp
  !MOV bpl, bpl
EndMacro

Macro MOV_Rsi_Rsi_Up_Down
  !MOV sil, sil
  !MOV si, si
  !MOV Rsi, Rsi
  !MOV si, si
  !MOV sil, sil
EndMacro

Macro MOV_Rdi_Rdi_Up_Down
  !MOV dil, dil
  !MOV di, di
  !MOV Rdi, Rdi
  !MOV di, di
  !MOV dil, dil
EndMacro

Macro SIMPLE_MOVE_REGISTERS_Up_and_Down
  MOV_Rax_Rax_Up_Down
  MOV_Rdx_Rdx_Up_Down
  MOV_Rsp_Rsp_Up_Down
  MOV_Rsi_Rsi_Up_Down
  MOV_R8_R8_Up_Down
  MOV_R10_R10_Up_Down
  MOV_R12_R12_Up_Down
  MOV_R14_R14_Up_Down
  MOV_Rbx_Rbx_Up_Down
  MOV_Rcx_Rcx_Up_Down
  MOV_Rbp_Rbp_Up_Down
  MOV_Rdi_Rdi_Up_Down
  MOV_R9_R9_Up_Down
  MOV_R11_R11_Up_Down
  MOV_R13_R13_Up_Down
  MOV_R15_R15_Up_Down
EndMacro

Import "bass.lib"
  BASS_Init.l(device.l,Freq.l,flags.l,win.l,*dsguid)
  BASS_Free.l()
  BASS_StreamCreateURL.l(*url, offset.l, flags.l, *proc, *user);
  BASS_StreamFree.l(handle.l)
  BASS_ChannelGetAttribute.l(handle.l,attrib.l,*value)
  BASS_ChannelGetData.l(handle.l,*buffer,length.l)
  BASS_ChannelStop.l(handle.l)
  BASS_SetConfig.l(option.l, value.l)
EndImport

Structure BASS_ASIO_DEVICEINFO
  *name
  *driver
EndStructure

Import "bassasio.lib"
  BASS_ASIO_GetDeviceInfo.l(device.l, *info.BASS_ASIO_DEVICEINFO)
  BASS_ASIO_Init.l(device.l, flags.l)
  BASS_ASIO_Free.l()
  ;CALL CyberAttack = BASS_ASIO_ControlPanel.l() = Startup ControlPanel.exe
  BASS_ASIO_CheckRate.l(rate.d)
  BASS_ASIO_SetRate.l(rate.d)
  BASS_ASIO_Start.l(buflen.l, threads.l)
  BASS_ASIO_Stop.l()
  ;CALL DumpAuidoAmplifier = BASS_ASIO_IsStarted.l(), then ASIOproc() return enable flag.
  BASS_ASIO_ChannelEnable.l(input.l, channel.l, *proc, *User)
  BASS_ASIO_ChannelJoin.l(input.l, channel.l, channel2.l)
  BASS_ASIO_ChannelSetFormat.l(input.l, channel.l, format.l)
  BASS_ASIO_ChannelSetVolume.l(input.l, channel.l, volume.f)
  BASS_ASIO_ErrorGetCode.l()
EndImport

#BASS_ASIO_THREAD = 1
Global PreferenceFile.s, Asio_Device_Global.i, WASAPI_device_format.i, ERRMES1A.s
PreferenceFile = GetPathPart(ProgramFilename())+"GetAsioDeviceName.txt"
If OpenPreferences(PreferenceFile)
  ExaminePreferenceKeys()
  While  NextPreferenceKey() ; While a key exists
    SIMPLE_MOVE_REGISTERS_Up_and_Down
    Asio_Device_Global = Val(PreferenceKeyValue())
    WASAPI_device_format = BASS_ASIO_Init(Asio_Device_Global, #BASS_ASIO_THREAD)
    If WASAPI_device_format And BASS_ASIO_CheckRate(44100.0)
      Global DRVSND.BASS_ASIO_DEVICEINFO
      BASS_ASIO_GetDeviceInfo(Asio_Device_Global, @DRVSND)
      Global DRVSND_DLL.i, *DRVSND_BUF, DRVSND_FILENAME.s
      DRVSND_FILENAME = PeekS(DRVSND\driver, -1, #PB_Ascii)
      ;c:\program files\singxer\usb audio device driver\x64\singxerusbaudioasio_x64.dll
      DRVSND_DLL = ReadFile(#PB_Any, DRVSND_FILENAME, #PB_File_NoBuffering)
      If DRVSND_DLL
        *DRVSND_BUF = AllocateMemory(Lof(DRVSND_DLL)+8192-Lof(DRVSND_DLL)%8192, #PB_Memory_NoClear)
        ReadData(DRVSND_DLL, *DRVSND_BUF, Lof(DRVSND_DLL) )
        CloseFile(DRVSND_DLL)
        Global *DRVSND_0F2B, *DRVSND_C5FDE7, *DRVSND_C5FE6F
        *DRVSND_0F2B = AllocateMemory(8192, #PB_Memory_NoClear)
        CopyMemoryMaya(dummyRcx, 8, ?DRVSND_0F2B_data, *DRVSND_0F2B)
        DataSection
          DRVSND_0F2B_data:
          Data.b $0F, $2B, $0, $0, $0, $0, $0, $0
        EndDataSection
        Debug Str(*DRVSND_0F2B) + " " + Str(*DRVSND_0F2B+8)
        *DRVSND_C5FDE7 = AllocateMemory(8192, #PB_Memory_NoClear)
        CopyMemoryMaya(dummyRcx, 8, ?DRVSND_C5FDE7_data, *DRVSND_C5FDE7)
        DataSection
          DRVSND_C5FDE7_data:
          Data.b $C5, $FD, $E7,  $0, $0, $0, $0, $0
        EndDataSection
        Debug Str(*DRVSND_C5FDE7) + " " + Str(*DRVSND_C5FDE7+8)
        *DRVSND_C5FE6F = AllocateMemory(8192, #PB_Memory_NoClear)
        CopyMemoryMaya(dummyRcx, 8, ?DRVSND_C5FE6F_data, *DRVSND_C5FE6F)
        DataSection
          DRVSND_C5FE6F_data:
          Data.b $C5, $FE, $6F,  $0, $0, $0, $0, $0
        EndDataSection
        Debug Str(*DRVSND_C5FE6F) + " " + Str(*DRVSND_C5FE6F+8)
        Global DRVSND_POS.i
        Global *DRVSND_CACHE
        Global NewList *DRVSND_CACHE_LIST()
        Debug "SSE"
        For DRVSND_POS = 0 To MemorySize(*DRVSND_BUF)
          If CompareMemory(*DRVSND_BUF+DRVSND_POS, *DRVSND_0F2B, 2)
            Debug Str(*DRVSND_BUF+DRVSND_POS) + " " + Str(*DRVSND_BUF+DRVSND_POS+8)
            AddElement(*DRVSND_CACHE_LIST())
            *DRVSND_CACHE_LIST() = *DRVSND_BUF+DRVSND_POS
          EndIf
        Next
        ; 0F2B
        ; ; 0000E7EB  C3                ret
        ; ; 0000E7EC  0F1F4000          nop dword [rax+0x0]
        ; ; 0000E7F0  0F2B01            movntps oword [rcx],xmm0
        ; ; 0000E7F3  0F2B4110          movntps oword [rcx+0x10],xmm0
        ; ; 0000E7F7  4881C180000000    add rcx,0x80
        ; ; 0000E7FE  0F2B41A0          movntps oword [rcx-0x60],xmm0
        ; ; 0000E802  0F2B41B0          movntps oword [rcx-0x50],xmm0
        ; ; 0000E806  49FFC9            dec r9
        ; ; 0000E809  0F2B41C0          movntps oword [rcx-0x40],xmm0
        ; ; 0000E80D  0F2B41D0          movntps oword [rcx-0x30],xmm0
        ; ; 0000E811  0F2B41E0          movntps oword [rcx-0x20],xmm0
        ; ; 0000E815  0F2B41F0          movntps oword [rcx-0x10],xmm0
        ; ; 0000E819  75D5              jnz 0xe7f0
        ; ; 0000E81B  0FAEF8            sfence
        Debug "AVX"
        For DRVSND_POS = 0 To MemorySize(*DRVSND_BUF)
          If CompareMemory(*DRVSND_BUF+DRVSND_POS, *DRVSND_C5FDE7, 3)
            Debug Str(*DRVSND_BUF+DRVSND_POS) + " " + Str(*DRVSND_BUF+DRVSND_POS+8)
            AddElement(*DRVSND_CACHE_LIST())
            *DRVSND_CACHE_LIST() = *DRVSND_BUF+DRVSND_POS
          EndIf
        Next
        For DRVSND_POS = 0 To MemorySize(*DRVSND_BUF)
          If CompareMemory(*DRVSND_BUF+DRVSND_POS, *DRVSND_C5FE6F, 3)
            Debug Str(*DRVSND_BUF+DRVSND_POS) + " " + Str(*DRVSND_BUF+DRVSND_POS+8)
            AddElement(*DRVSND_CACHE_LIST())
            *DRVSND_CACHE_LIST() = *DRVSND_BUF+DRVSND_POS
          EndIf
        Next
        ; C5FDE7
        ; ; 0000ED5D  C3                ret
        ; ; 0000ED5E  6690              xchg ax,ax
        ; ; 0000ED60  C5FE6F0A          vmovqqu ymm1,yword [rdx]
        ; ; 0000ED64  C5FE6F5220        vmovqqu ymm2,yword [rdx+0x20]
        ; ; 0000ED69  C5FE6F5A40        vmovqqu ymm3,yword [rdx+0x40]
        ; ; 0000ED6E  C5FE6F6260        vmovqqu ymm4,yword [rdx+0x60]
        ; ; 0000ED73  C5FDE709          vmovntqq yword [rcx],ymm1
        ; ; 0000ED77  C5FDE75120        vmovntqq yword [rcx+0x20],ymm2
        ; ; 0000ED7C  C5FDE75940        vmovntqq yword [rcx+0x40],ymm3
        ; ; 0000ED81  C5FDE76160        vmovntqq yword [rcx+0x60],ymm4
        ; ; 0000ED86  C5FE6F8A80000000  vmovqqu ymm1,yword [rdx+0x80]
        ; ; 0000ED8E  C5FE6F92A0000000  vmovqqu ymm2,yword [rdx+0xa0]
        ; ; 0000ED96  C5FE6F9AC0000000  vmovqqu ymm3,yword [rdx+0xc0]
        ; ; 0000ED9E  C5FE6FA2E0000000  vmovqqu ymm4,yword [rdx+0xe0]
        ; ; 0000EDA6  C5FDE78980000000  vmovntqq yword [rcx+0x80],ymm1
        ; ; 0000EDAE  C5FDE791A0000000  vmovntqq yword [rcx+0xa0],ymm2
        ; ; 0000EDB6  C5FDE799C0000000  vmovntqq yword [rcx+0xc0],ymm3
        ; ; 0000EDBE  C5FDE7A1E0000000  vmovntqq yword [rcx+0xe0],ymm4
        ; ; 0000EDC6  4881C100010000    add rcx,0x100
        ; ; 0000EDCD  4881C200010000    add rdx,0x100
        ; ; 0000EDD4  4981E800010000    sub r8,0x100
        ; ; 0000EDDB  4981F800010000    cmp r8,0x100
        ; ; 0000EDE2  0F8378FFFFFF      jnc qword 0xed60
      EndIf
      If ListSize(*DRVSND_CACHE_LIST())=0
        ClosePreferences()
        BASS_ASIO_Free()
        ERRMES1A= "The device is not support. Tested XMOS v5.30 only."+Chr(13)+Chr(10)+Chr(13)+Chr(10)
        !JMP ERROR_STARTUP_END
      EndIf
      ClosePreferences()
      Goto StartupProcess
    ElseIf WASAPI_device_format
      BASS_ASIO_Free()
    EndIf
  Wend
  ClosePreferences()
EndIf
Select BASS_ASIO_ErrorGetCode()
  Case 23 ; BASS_ERROR_DEVICE
    ERRMES1A="The device number specified is invalid. Retry GetAsioDeviceName."+Chr(13)+Chr(10)+Chr(13)+Chr(10)
  Case 14 ; BASS_ERROR_ALREADY
    ERRMES1A="The device has already been initialized. Re-Start Windows."+Chr(13)+Chr(10)+Chr(13)+Chr(10)
  Case 3 ; BASS_ERROR_DRIVER
    ERRMES1A="The driver could not be initialized. USB-DAC Power Refresh."+Chr(13)+Chr(10)+Chr(13)+Chr(10)
  Default
    ERRMES1A="Create GetAsioDeviceName.txt and Edit device list."+Chr(13)+Chr(10)+"Try GetAsioDeviceName. Setup 44.1kHz Latency 4 ms ( 256 samples )"+Chr(13)+Chr(10)+Chr(13)+Chr(10)
EndSelect
!JMP ERROR_STARTUP_END
StartupProcess:
Global Fd_44100.d
; v_Fd_44100 = 44100.0
!MOV cl, R8b
!SUB R8b, cl
!MOVZX R8, R8b
!MOV ch, cl
!SUB cl, ch
!MOVZX Rcx, cl
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVQ xmm14, R8
!MOVSD [v_Fd_44100], xmm14
BASS_ASIO_SetRate(Fd_44100*2)
; BASS_ASIO_ControlPanel()
BASS_ASIO_Free()
Global DRVcacheMax.i
DRVcacheMax = ListSize(*DRVSND_CACHE_LIST())
Global Dim *DRVSND_Cache(DRVcacheMax)
ForEach *DRVSND_CACHE_LIST()
  *DRVSND_Cache(ListIndex(*DRVSND_CACHE_LIST())) = *DRVSND_CACHE_LIST()
Next

DRVSND_FILENAME = ReverseString( ReverseString( GetFilePart(DRVSND_FILENAME) ) )

; void lowpass(float input[], float output[], int size, float samplerate, float freq, float q)
; rocedure lowpass(*output, size.i, samplerate.d)
Structure lowpass
  *buffer_in
  Length.i
  Freq_double.d
  ThreadID.i
EndStructure

Procedure lowpass(*param.lowpass)
  Protected *output, size.i, samplerate.d
  *output = *param\buffer_in
  size = *param\Length
  samplerate = *param\Freq_double
  Protected D4.i
  ; p.v_D4 = 4
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !INC cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !MOVNTI [p.v_D4], R8
  !NOP [Rip]
  !NOP [p.v_D4]
  
  Protected D8.i
  ; p.v_D8 = 8
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !INC cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !MOVNTI [p.v_D8], R8
  
  Protected D0.i
  ; p.v_D0 = 0
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !MOVNTI [p.v_D0], R8
  !NOP [Rip]
  !NOP [p.v_D0]
  
  Protected D1.i
  ; p.v_D1 = 1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !INC R8b
  !MOVNTI [p.v_D1], R8
  !NOP [Rip]
  !NOP [p.v_D1]
  ;
  Protected D9801.i
  ; p.v_D9801 = 9801
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !INC cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !MOVNTI [p.v_D9801], R8
  !NOP [Rip]
  !NOP [p.v_D9801]
  
  Protected F_2_0_d.d, F_1_0_d.d
  ;
  ; p.v_F_1_0_d = 1.0
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !INC cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !MOVQ xmm14, R8
  !MOVSD [p.v_F_1_0_d], xmm14
  !NOP [Rip]
  !NOP [p.v_F_1_0_d]
  ;
  ; p.v_F_2_0_d = 2.0
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !INC cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !MOVQ xmm14, R8
  !MOVSD [p.v_F_2_0_d], xmm14
  !NOP [Rip]
  !NOP [p.v_F_2_0_d]
  ;
  Protected in1.d, in2.d, out1.d, out2.d, pos.i
  Protected in3.d, in4.d, out3.d, out4.d, in1pre.d, in3pre.d
  Protected Freq_d1.d, Freq_d2.d, Freq_d3.d, Freq_d4.d
  ;
  ; // 1st 3.141592653
  !NOP QWORD [Rip]
  !NOP cx
  !NOP QWORD [Rip]
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !NOP QWORD [Rip]
  !NOP R8w
  !NOP QWORD [Rip]
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !INC cl
  !MOVZX Rcx, cl
  ; 100000000001001001000011111101101010100001011111110100100111000
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  ;
  !MOVQ xmm5, R8
  !MOVSD [p.v_Freq_d1], xmm5
  !NOP QWORD [Rip]
  !NOP QWORD [p.v_Freq_d1]
  ; // 1st 3.141592653 End
  ;
  ; // 2nd 589793
  !NOP QWORD [Rip]
  !NOP cx
  !NOP QWORD [Rip]
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !NOP QWORD [Rip]
  !NOP R9w
  !NOP QWORD [Rip]
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !MOVZX R9, R9b
  !INC cl
  !MOVZX Rcx, cl
  ; 11111000000100010000111101111111000100011110111011100100011001
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !MOVQ xmm5, R9
  !MOVSD [p.v_Freq_d2], xmm5
  !NOP QWORD [Rip]
  !NOP QWORD [p.v_Freq_d2]
  ; // 2nd 589793 End
  ;
  ; // 3rd 238462
  !NOP QWORD [Rip]
  !NOP cx
  !NOP QWORD [Rip]
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !NOP QWORD [Rip]
  !NOP R8w
  !NOP QWORD [Rip]
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !INC cl
  !MOVZX Rcx, cl
  ; 11110010110001001011101101100011110100110011000000010010000001
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !MOVQ xmm5, R8
  !MOVSD [p.v_Freq_d3], xmm5
  !NOP QWORD [Rip]
  !NOP QWORD [p.v_Freq_d3]
  ; //  3rd 238462 End
  ;
  ; // 4th 643383
  !NOP QWORD [Rip]
  !NOP cx
  !NOP QWORD [Rip]
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !NOP QWORD [Rip]
  !NOP R9w
  !NOP QWORD [Rip]
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !MOVZX R9, R9b
  !INC cl
  !MOVZX Rcx, cl
  ; 11101110001000010011100110101100100111000100000011010110110011
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !MOVQ xmm5, R9
  !MOVSD [p.v_Freq_d4], xmm5
  !NOP QWORD [Rip]
  !NOP QWORD [p.v_Freq_d4]
  ; // 4th 643383 End
  
  Macro omega
    F_2_0_d * Freq_d1 * D9801 / samplerate + F_2_0_d * Freq_d2 * D9801 / samplerate + F_2_0_d * Freq_d3 * D9801 / samplerate + F_2_0_d * Freq_d4 * D9801 / samplerate
  EndMacro
  
  Protected LPFcalcA.d, LPFcalcB.d, LPFcalcD.d, LPFcalcE.d
  ;
  LPFcalcA = ((F_1_0_d - Cos(omega)) / F_2_0_d)/(F_1_0_d + Sin(omega) / (F_2_0_d * Log10(D8)))
  LPFcalcB = (F_1_0_d - Cos(omega))/(F_1_0_d + Sin(omega) / (F_2_0_d * Log10(D8)))
  LPFcalcD = ( -F_2_0_d * Cos(omega))/(F_1_0_d + Sin(omega) / (F_2_0_d * Log10(D8)))
  LPFcalcE = (F_1_0_d - Sin(omega) / (F_2_0_d * Log10(D8)))/(F_1_0_d + Sin(omega) / (F_2_0_d * Log10(D8)))
  
  For pos=D0 To size-D1 Step 8
    in1pre = PeekF(*output+pos)
    PokeF(*output+pos, LPFcalcA * PeekF(*output+pos)+ LPFcalcB * in1 + LPFcalcA * in2 - LPFcalcD * out1 - LPFcalcE * out2)
    Swap in1, in2
    in1 = in1pre
    Swap out1, out2
    out1 = PeekF(*output+pos)
    
    in3pre = PeekF(*output+pos+D4)
    PokeF(*output+pos+D4, LPFcalcA * PeekF(*output+pos+D4)+ LPFcalcB * in3 + LPFcalcA *in4 - LPFcalcD * out3 - LPFcalcE * out4)
    Swap in3, in4
    in3 = in3pre
    Swap out3, out4
    out3 = PeekF(*output+pos+D4)
    
    !NOP QWORD [Rip]
    !NOP QWORD [Rip]
  Next
EndProcedure

Procedure ChannelStrip(*inbuf, length.i)
  Protected D8.i, D4.i, D0.i
  ;
  ; p.v_D8 = 8
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !INC cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !MOVNTI [p.v_D8], R8
  ;
  ; p.v_D4 = 4
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !INC cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !MOVNTI [p.v_D4], R8
  ;
  ; p.v_D0 = 0
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !INC cl
  !SHL R8, cl
  !MOVNTI [p.v_D0], R8
  
  Protected CT_pos.i, CT_Rand.d
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_Log10_DOUBLE]
  !NOP QWORD [PB_Log10_DOUBLE+8]
  !NOP QWORD [PB_Log10_DOUBLE+16]
  !NOP QWORD [PB_PeekF]
  !NOP QWORD [PB_PeekF+8]
  !NOP QWORD [PB_PeekF+16]
  !NOP QWORD [PB_PokeF]
  !NOP QWORD [PB_PokeF+8]
  !NOP QWORD [PB_PokeF+16]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  CT_Rand = Log10(D8)
  For CT_pos=D0 To length Step 16
    PokeF(*inbuf+CT_pos, PeekF(*inbuf+CT_pos) * CT_Rand)
    PokeF(*inbuf+CT_pos+D4, PeekF(*inbuf+CT_pos+D4) * CT_Rand)
  Next
EndProcedure

Macro SoundDriversCache
  For AsioDRVcache=AsioD0 To AsioDRVcacheMax
    *AsioDRVcacheTarget = *DRVSND_AsioCache(AsioDRVcache)
    !MOV R8, QWORD [p.p_AsioDRVcacheTarget]
    !NOP QWORD [Rip]
    !NOP QWORD [Rip]
    !NOP QWORD [R8]
    !NOP QWORD [R8+8]
    !NOP QWORD [R8+16]
    !NOP QWORD [R8+24]
    !NOP QWORD [R8+32]
    !NOP QWORD [R8+40]
    !NOP QWORD [R8+48]
    !NOP QWORD [R8+56]
    !NOP QWORD [Rip]
    !NOP QWORD [Rip]
  Next
  !MOV R8, QWORD [p.p_AsioDRVcacheTarget]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [R8+64]
  !NOP QWORD [R8+72]
  !NOP QWORD [R8+80]
  !NOP QWORD [R8+88]
  !NOP QWORD [R8+96]
  !NOP QWORD [R8+104]
  !NOP QWORD [R8+112]
  !NOP QWORD [R8+120]
  !NOP QWORD [R8+128]
  !NOP QWORD [R8+136]
  !NOP QWORD [R8+144]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PureBasicStart]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
EndMacro

Macro CLR_Rcx_R8_x64
  !MOV cl, R8b
  !SUB R8b, cl
  !MOVZX R8, R8b
  !MOV ch, cl
  !SUB cl, ch
  !MOVZX Rcx, cl
EndMacro

Global F_1_0_d.d
; p.v_F_1_0_d = 1.0
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVQ xmm0, R8
!MOVSD [v_F_1_0_d], xmm0

Global C_PB_Event_Gadget.i, C_PB_Event_CloseWindow.i
; p.v_C_PB_Event_Gadget = 13100
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_C_PB_Event_Gadget], R8
;
; p.v_C_PB_Event_CloseWindow = 13116
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_C_PB_Event_CloseWindow], R8
;
Global *CurrentProcess = Val(ReverseString(ReverseString(Str( GetCurrentProcess_() ) ) ) )
;- Global D1 C_PB
Global D7.i, D522.i, D500.i, D50.i, D5.i, D40.i, D37.i, D330.i, D250.i
Global D19.i, D15.i, D120.i, D100.i, D10.i, D0.i, H_FFFFFF.i, H_E6D8AD.i
Global D31752000.i, D16384.i, D1.i, D2.i, DM1.i, D44100.i, D32.i
Global H_90B0EE.i, H_00EE00.i, H_005500.i, H_0000EE.i, H_000055.i, C_PB_Window_TitleBar.i
Global C_PB_Window_SystemMenu.i, C_PB_Window_ScreenCentered.i
Global C_PB_Window_BorderLess.i, C_PB_Tree_AlwaysShowSelection.i, C_PB_Ignore.i
Global C_PB_Gadget_BackColor.i, C_PB_Default.i, C_PB_Any.i, C_PB_2DDrawing_Gradient.i
Global C_PB_StatusBar_BorderLess.i, C_PB_Font_HighQuality.i
Global D524288.i, H_908070.i, H_FACE86.i, C_PB_Button_Toggle.i, Samples.i
Global D27.i, D7938000.i, D1024.i, C_ABOVE_NORMAL_PRIORITY_CLASS.i
Global FreqFloat.f, Freq.i
;
; p.v_D7 = 7
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_D7], R8
;
; p.v_D522 = 522
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!MOVNTI QWORD [v_D522], R8
;
; p.v_D500 = 500
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_D500], R8
;
; p.v_D50 = 50
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!MOVNTI QWORD [v_D50], R8
;
; p.v_D5 = 5
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_D5], R8
;
; p.v_D40 = 40
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_D40], R8
;
; p.v_D37 = 37
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_D37], R8
;
; p.v_D330 = 330
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!MOVNTI QWORD [v_D330], R8
;
; p.v_D250 = 250
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!MOVNTI QWORD [v_D250], R8
;
; p.v_D19 = 19
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_D19], R8
;
; p.v_D15 = 15
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_D15], R8
;
; p.v_D120 = 120
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_D120], R8
;
; p.v_D100 = 100
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_D100], R8
;
; p.v_D10 = 10
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!MOVNTI QWORD [v_D10], R8
;
; p.v_D0 = 0
CLR_Rcx_R8_x64
!INC cl
!SHL R8, cl
!MOVNTI QWORD [v_D0], R8
;
; p.v_D44100 = 44100
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_D44100], R8
;
; p.v_D32 = 32
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_D32], R8
!NOP QWORD [Rip]
!NOP QWORD [v_D32]
;
; p.v_H_FFFFFF = 16777215
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_H_FFFFFF], R8
;
; p.v_H_E6D8AD = 15128749
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_H_E6D8AD], R8
;
; p.v_H_90B0EE = 9482478
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!MOVNTI QWORD [v_H_90B0EE], R8
;
; p.v_H_00EE00 = 60928
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_H_00EE00], R8
;
; p.v_H_005500 = 21760
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_H_005500], R8
;
; p.v_H_0000EE = 238
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!MOVNTI QWORD [v_H_0000EE], R8
;
; p.v_H_000055 = 85
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_H_000055], R8
;
; p.v_C_PB_Window_TitleBar = 12582912
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_C_PB_Window_TitleBar], R8
;
; p.v_C_PB_Window_SystemMenu = 13107200
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_C_PB_Window_SystemMenu], R8
;
; p.v_C_PB_Window_ScreenCentered = 1
CLR_Rcx_R8_x64
!INC cl
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_C_PB_Window_ScreenCentered], R8
!MOVNTI QWORD [v_D1], R8
!INC R8b
!MOVNTI QWORD [v_D2], R8
;
; p.v_C_PB_Window_BorderLess = 2147483648
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_C_PB_Window_BorderLess], R8
;
; p.v_C_PB_Tree_AlwaysShowSelection = 32
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_C_PB_Tree_AlwaysShowSelection], R8
;
; p.v_C_PB_Ignore = -65535
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_C_PB_Ignore], R8
;
; p.v_C_PB_Gadget_BackColor = 2
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!MOVNTI QWORD [v_C_PB_Gadget_BackColor], R8
!MOVNTI QWORD [v_C_PB_StatusBar_BorderLess], R8
;
; p.v_C_PB_Default = -1
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_C_PB_Default], R8
!MOVNTI QWORD [v_C_PB_Any], R8
!MOVNTI QWORD [v_DM1], R8
;
; p.v_C_PB_2DDrawing_Gradient = 64
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_C_PB_2DDrawing_Gradient], R8
;
User avatar
oryaaaaa
Addict
Addict
Posts: 825
Joined: Mon Jan 12, 2004 11:40 pm
Location: Okazaki, JAPAN

Re: NetRadioLoryaPhantomRecord : SuperBass netradio For HIGH END AUDIO [Windows]

Post by oryaaaaa »

Latest version : Lines 3125 - 5645

Code: Select all

; p.v_C_PB_Font_HighQuality = 16
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_C_PB_Font_HighQuality], R8
;
; p.v_D31752000 = 31752000
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_D31752000], R8
;
; p.v_D16384 = 16384
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_D16384], R8
;
; p.v_D524288 = 524288 = 16384 * 8 * 4
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_D524288], R8
;
; p.v_H_908070 = 9470064
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_H_908070], R8
;
; p.v_H_FACE86 = 16436870
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!MOVNTI QWORD [v_H_FACE86], R8
;
; p.v_D27 = 27
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_D27], R8
;
; p.v_D7938000 = 7938000
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_D7938000], R8
;
; p.v_D1024 = 1024
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_D1024], R8
;
; p.v_C_ABOVE_NORMAL_PRIORITY_CLASS = 32768
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_C_ABOVE_NORMAL_PRIORITY_CLASS], R8
;
; p.v_C_PB_Button_Toggle = 4099
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!INC R8b
!SHL R8, cl
!INC R8b
!MOVNTI QWORD [v_C_PB_Button_Toggle], R8

Global N_BASS_SAMPLE_FLOAT.i, N_BASS_CONFIG_NET_BUFFER.i
Global N_BASS_UNICODE.i, N_BASS_STREAM_DECODE.i

; v_N_BASS_SAMPLE_FLOAT = 256
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_N_BASS_SAMPLE_FLOAT], R8
;
; v_N_BASS_UNICODE = 2147483648
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_N_BASS_UNICODE], R8
;
; v_N_BASS_STREAM_DECODE = 2097152
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!SHL R8, cl
!MOVNTI QWORD [v_N_BASS_STREAM_DECODE], R8
;

Global chan.l, *OutBufferInit, *OutBufferInitB, *OutBuffer, *OutBufferMax, *sinc_table_set, *sinc_table_set2
Global Get_Buffer_Semaphore.i, Get_Buffer_Thread.i, *SINC_BufferA, *SINC_BufferB
Global *Get_BufferA, *Get_BufferB, *Get_Buffer_InBuf, Get_Buffer_InBufSize.i, Get_BufferSize.i
Global Get_BufferSizeHalf.i

;- AllocateMemory
; 90 seconds * 44100 samples * 8 bytes = 31752000
; C 1024 + O 512 = 2048 * 8
; #PB_Memory_NoClear = 1
*Get_BufferA = AllocateMemory(D31752000*D2+D524288, D1)
*Get_BufferB = AllocateMemory(D31752000*D2+D524288, D1)
*OutBufferInit = AllocateMemory(D31752000*D2+D524288, D1)
*OutBufferInitB = AllocateMemory(D31752000*D2+D524288, D1)
*SINC_BufferA = AllocateMemory(D31752000*D2+D524288, D1)
*SINC_BufferB = AllocateMemory(D31752000*D2+D524288, D1)
*sinc_table_set = AllocateMemory(D524288, D1)
Get_BufferSize = D31752000
*OutBuffer = *OutBufferInit
*OutBufferMax = *OutBufferInit + Get_BufferSize * D2
;
*Get_Buffer_InBuf = AllocateMemory(D524288, D1)
Get_Buffer_InBufSize = D524288
Get_BufferSizeHalf = D7938000

Global MayaZero.i
!MOV dl, cl
!SUB cl, dl
!INC cl
!MOVZX Rcx, cl
!MOVQ mm5, Rcx
!PSLLW mm1, mm5 ;1  Left 1bit shift
!PSLLW mm1, mm5 ;2  Left 1bit shift
!PSLLW mm1, mm5 ;3  Left 1bit shift
!PSLLW mm1, mm5 ;4  Left 1bit shift
!PSLLW mm1, mm5 ;5  Left 1bit shift
!PSLLW mm1, mm5 ;6  Left 1bit shift
!PSLLW mm1, mm5 ;7  Left 1bit shift
!PSLLW mm1, mm5 ;8  Left 1bit shift
!PSLLW mm1, mm5 ;9  Left 1bit shift
!PSLLW mm1, mm5 ;A  Left 1bit shift
!PSLLW mm1, mm5 ;B  Left 1bit shift
!PSLLW mm1, mm5 ;C  Left 1bit shift
!PSLLW mm1, mm5 ;D  Left 1bit shift
!PSLLW mm1, mm5 ;E  Left 1bit shift
!PSLLW mm1, mm5 ;F  Left 1bit shift
!PSLLW mm1, mm5 ;0  Left 1bit shift
!MOVQ mm1, Rcx
!PSLLW mm5, mm1 ;1  Left 1bit shift
!PSLLW mm5, mm1 ;2  Left 1bit shift
!PSLLW mm5, mm1 ;3  Left 1bit shift
!PSLLW mm5, mm1 ;4  Left 1bit shift
!PSLLW mm5, mm1 ;5  Left 1bit shift
!PSLLW mm5, mm1 ;6  Left 1bit shift
!PSLLW mm5, mm1 ;7  Left 1bit shift
!PSLLW mm5, mm1 ;8  Left 1bit shift
!PSLLW mm5, mm1 ;9  Left 1bit shift
!PSLLW mm5, mm1 ;A  Left 1bit shift
!PSLLW mm5, mm1 ;B  Left 1bit shift
!PSLLW mm5, mm1 ;C  Left 1bit shift
!PSLLW mm5, mm1 ;D  Left 1bit shift
!PSLLW mm5, mm1 ;E  Left 1bit shift
!PSLLW mm5, mm1 ;F  Left 1bit shift
!PSLLW mm5, mm1 ;0  Left 1bit shift
; mm5 = 0000 , mm1 = 001
!MOVQ R8, mm1
!MOV R8, R8
!MOV R8w, R8w
!MOV R8b, R8b
!SHL R8b,1
!MOVZX R8, R8b
!MOVQ mm5, R8
!MOVNTQ QWORD [v_MayaZero], mm5
!SHL R8b,1
!MOVZX R8, R8b
!MOVQ mm5, R8
!MOVNTQ QWORD [v_MayaZero], mm5
!SHL R8b,1
!MOVZX R8, R8b
!MOVQ mm5, R8
!MOVNTQ QWORD [v_MayaZero], mm5
!SHL R8b,1
!MOVZX R8, R8b
!MOVQ mm5, R8
!MOVNTQ QWORD [v_MayaZero], mm5
!SHL R8b,1
!MOVZX R8, R8b
!MOVQ mm5, R8
!MOVNTQ QWORD [v_MayaZero], mm5
!SHL R8b,1
!MOVZX R8, R8b
!MOVQ mm5, R8
!MOVNTQ QWORD [v_MayaZero], mm5
!SHL R8b,1
!MOVZX R8, R8b
!MOVQ mm5, R8
!MOVNTQ QWORD [v_MayaZero], mm5
!SHL R8b,1
!MOVZX R8, R8b
!MOVQ mm5, R8
!MOVNTQ QWORD [v_MayaZero], mm5
!EMMS
ClearMemoryMaya(dummyRcx, D31752000*D2+D524288, @MayaZero, *Get_BufferA)
ClearMemoryMaya(dummyRcx, D31752000*D2+D524288, @MayaZero, *Get_BufferB)
ClearMemoryMaya(dummyRcx, D31752000*D2+D524288, @MayaZero, *OutBufferInit)
ClearMemoryMaya(dummyRcx, D31752000*D2+D524288, @MayaZero, *OutBufferInitB)
ClearMemoryMaya(dummyRcx, D31752000*D2+D524288, @MayaZero, *SINC_BufferA)
ClearMemoryMaya(dummyRcx, D31752000*D2+D524288, @MayaZero, *SINC_BufferB)
ClearMemoryMaya(dummyRcx, D524288, @MayaZero, *sinc_table_set)
ClearMemoryMaya(dummyRcx, D524288, @MayaZero, *Get_Buffer_InBuf)

#NRVer = "Yukey Maya"

Global Enum_Window_NROrya.i, Enum_StatusBar.i, Enum_Tree_PlayList.i, Enum_CheckBox1K.i
Global Enum_ButtonImage_GetPlayList.i, Enum_CheckBoxPT.i, Enum_CheckBox8K.i, Enum_CheckBox4K.i, Enum_CheckBox2K.i
CLR_Rcx_R8_x64
!INC cl
!INC R8b
!SHL R8, cl
!MOVNTI QWORD [v_Enum_Window_NROrya], R8
!SHL R8, cl
!MOVNTI QWORD [v_Enum_StatusBar], R8
!SHL R8, cl
!MOVNTI QWORD [v_Enum_Tree_PlayList], R8
!SHL R8, cl
!MOVNTI QWORD [v_Enum_ButtonImage_GetPlayList], R8
!SHL R8, cl
!MOVNTI QWORD [v_Enum_CheckBoxPT], R8
!SHL R8, cl
!MOVNTI QWORD [v_Enum_CheckBox8K], R8
!SHL R8, cl
!MOVNTI QWORD [v_Enum_CheckBox4K], R8
!SHL R8, cl
!MOVNTI QWORD [v_Enum_CheckBox2K], R8
!SHL R8, cl
!MOVNTI QWORD [v_Enum_CheckBox1K], R8

Macro MacroMakeFloat
  !MOV dl, cl
  !SUB cl, dl
  !INC cl
  !MOVZX Rcx, cl
  !MOVQ mm5, Rcx
  !PSLLW mm1, mm5 ;1  Left 1bit shift
  !PSLLW mm1, mm5 ;2  Left 1bit shift
  !PSLLW mm1, mm5 ;3  Left 1bit shift
  !PSLLW mm1, mm5 ;4  Left 1bit shift
  !PSLLW mm1, mm5 ;5  Left 1bit shift
  !PSLLW mm1, mm5 ;6  Left 1bit shift
  !PSLLW mm1, mm5 ;7  Left 1bit shift
  !PSLLW mm1, mm5 ;8  Left 1bit shift
  !PSLLW mm1, mm5 ;9  Left 1bit shift
  !PSLLW mm1, mm5 ;A  Left 1bit shift
  !PSLLW mm1, mm5 ;B  Left 1bit shift
  !PSLLW mm1, mm5 ;C  Left 1bit shift
  !PSLLW mm1, mm5 ;D  Left 1bit shift
  !PSLLW mm1, mm5 ;E  Left 1bit shift
  !PSLLW mm1, mm5 ;F  Left 1bit shift
  !PSLLW mm1, mm5 ;0  Left 1bit shift
  !MOVQ mm1, Rcx
  !PSLLW mm5, mm1 ;1  Left 1bit shift
  !PSLLW mm5, mm1 ;2  Left 1bit shift
  !PSLLW mm5, mm1 ;3  Left 1bit shift
  !PSLLW mm5, mm1 ;4  Left 1bit shift
  !PSLLW mm5, mm1 ;5  Left 1bit shift
  !PSLLW mm5, mm1 ;6  Left 1bit shift
  !PSLLW mm5, mm1 ;7  Left 1bit shift
  !PSLLW mm5, mm1 ;8  Left 1bit shift
  !PSLLW mm5, mm1 ;9  Left 1bit shift
  !PSLLW mm5, mm1 ;A  Left 1bit shift
  !PSLLW mm5, mm1 ;B  Left 1bit shift
  !PSLLW mm5, mm1 ;C  Left 1bit shift
  !PSLLW mm5, mm1 ;D  Left 1bit shift
  !PSLLW mm5, mm1 ;E  Left 1bit shift
  !PSLLW mm5, mm1 ;F  Left 1bit shift
  !PSLLW mm5, mm1 ;0  Left 1bit shift
  ; mm5 = 0000 , mm1 = 001
  ;
  ;1 = SHL R8, cl + INC R8b
  ;PSLLQ mm5, mm1
  ;PADDQ mm5, mm1
  ;
  ;0 = SHL R8, cl
  ;PSLLQ mm5, mm1
  ;
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
EndMacro

Macro MacroMakeFloatFF
  !MOV dl, cl
  !SUB cl, dl
  !INC cl
  !MOVZX Rcx, cl
  !MOVQ mm5, Rcx
  !PSLLW mm1, mm5 ;1  Left 1bit shift
  !PSLLW mm1, mm5 ;2  Left 1bit shift
  !PSLLW mm1, mm5 ;3  Left 1bit shift
  !PSLLW mm1, mm5 ;4  Left 1bit shift
  !PSLLW mm1, mm5 ;5  Left 1bit shift
  !PSLLW mm1, mm5 ;6  Left 1bit shift
  !PSLLW mm1, mm5 ;7  Left 1bit shift
  !PSLLW mm1, mm5 ;8  Left 1bit shift
  !PSLLW mm1, mm5 ;9  Left 1bit shift
  !PSLLW mm1, mm5 ;A  Left 1bit shift
  !PSLLW mm1, mm5 ;B  Left 1bit shift
  !PSLLW mm1, mm5 ;C  Left 1bit shift
  !PSLLW mm1, mm5 ;D  Left 1bit shift
  !PSLLW mm1, mm5 ;E  Left 1bit shift
  !PSLLW mm1, mm5 ;F  Left 1bit shift
  !PSLLW mm1, mm5 ;0  Left 1bit shift
  !MOVQ mm1, Rcx
  !PSLLW mm5, mm1 ;1  Left 1bit shift
  !PSLLW mm5, mm1 ;2  Left 1bit shift
  !PSLLW mm5, mm1 ;3  Left 1bit shift
  !PSLLW mm5, mm1 ;4  Left 1bit shift
  !PSLLW mm5, mm1 ;5  Left 1bit shift
  !PSLLW mm5, mm1 ;6  Left 1bit shift
  !PSLLW mm5, mm1 ;7  Left 1bit shift
  !PSLLW mm5, mm1 ;8  Left 1bit shift
  !PSLLW mm5, mm1 ;9  Left 1bit shift
  !PSLLW mm5, mm1 ;A  Left 1bit shift
  !PSLLW mm5, mm1 ;B  Left 1bit shift
  !PSLLW mm5, mm1 ;C  Left 1bit shift
  !PSLLW mm5, mm1 ;D  Left 1bit shift
  !PSLLW mm5, mm1 ;E  Left 1bit shift
  !PSLLW mm5, mm1 ;F  Left 1bit shift
  !PSLLW mm5, mm1 ;0  Left 1bit shift
  ; mm5 = 0000 , mm1 = 001
  ;
  ;1 = SHL R8, cl + INC R8b
  ;PSLLQ mm5, mm1
  ;PADDQ mm5, mm1
  ;
  ;0 = SHL R8, cl
  ;PSLLQ mm5, mm1
  ;
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
  !PSLLQ mm5, mm1
  !PADDQ mm5, mm1
EndMacro

Macro ASIO_ChannelSetVolume_Stabilizer
  ;
  ;BASS_ASIO_ChannelSetVolume(False, DM1, NFloat_1_000)
  MacroMakeFloatFF
  !MOVQ2DQ xmm2, mm5
  !MOVSS xmm2, xmm2
  !EMMS
  !MOV cl, dl
  !SUB dl, cl
  !MOVZX Ecx, dl
  !MOVZX Edx, dl
  !NOT Edx
  !MOV dl, dl
  !MOV dh, dh
  !MOV dx, dx
  !MOV Edx, Edx
  !CALL QWORD BASS_ASIO_ChannelSetVolume
  ;
  ;BASS_ASIO_ChannelSetVolume(False, DM1, NFloat_1_000)
  MacroMakeFloatFF
  !MOVQ2DQ xmm2, mm5
  !MOVSS xmm2, xmm2
  !EMMS
  !MOV cl, dl
  !SUB dl, cl
  !MOVZX Ecx, dl
  !MOVZX Edx, dl
  !NOT Edx
  !MOV dl, dl
  !MOV dh, dh
  !MOV dx, dx
  !MOV Edx, Edx
  !CALL QWORD BASS_ASIO_ChannelSetVolume
  ;
  ;BASS_ASIO_ChannelSetVolume(False, DM1, Float_1_000)
  MacroMakeFloat
  !MOVQ2DQ xmm2, mm5
  !MOVSS xmm2, xmm2
  !EMMS
  !MOV cl, dl
  !SUB dl, cl
  !MOVZX Ecx, dl
  !MOVZX Edx, dl
  !NOT Edx
  !MOV dl, dl
  !MOV dh, dh
  !MOV dx, dx
  !MOV Edx, Edx
  !CALL QWORD BASS_ASIO_ChannelSetVolume
  ;
  ;BASS_ASIO_ChannelSetVolume(False, DM1, NFloat_1_000)
  MacroMakeFloatFF
  !MOVQ2DQ xmm2, mm5
  !MOVSS xmm2, xmm2
  !EMMS
  !MOV cl, dl
  !SUB dl, cl
  !MOVZX Ecx, dl
  !MOVZX Edx, dl
  !NOT Edx
  !MOV dl, dl
  !MOV dh, dh
  !MOV dx, dx
  !MOV Edx, Edx
  !CALL QWORD BASS_ASIO_ChannelSetVolume
  ;
  ;BASS_ASIO_ChannelSetVolume(False, DM1, Float_1_000)
  MacroMakeFloat
  !MOVQ2DQ xmm2, mm5
  !MOVSS xmm2, xmm2
  !EMMS
  !MOV cl, dl
  !SUB dl, cl
  !MOVZX Ecx, dl
  !MOVZX Edx, dl
  !NOT Edx
  !MOV dl, dl
  !MOV dh, dh
  !MOV dx, dx
  !MOV Edx, Edx
  !CALL QWORD BASS_ASIO_ChannelSetVolume
  
  ;BASS_ASIO_ChannelSetVolume(False, DM1, NFloat_1_000)
  MacroMakeFloatFF
  !MOVQ2DQ xmm2, mm5
  !MOVSS xmm2, xmm2
  !EMMS
  !MOV cl, dl
  !SUB dl, cl
  !MOVZX Ecx, dl
  !MOVZX Edx, dl
  !NOT Edx
  !MOV dl, dl
  !MOV dh, dh
  !MOV dx, dx
  !MOV Edx, Edx
  !CALL QWORD BASS_ASIO_ChannelSetVolume
  ;
  ;BASS_ASIO_ChannelSetVolume(False, DM1, Float_1_000)
  MacroMakeFloat
  !MOVQ2DQ xmm2, mm5
  !MOVSS xmm2, xmm2
  !EMMS
  !MOV cl, dl
  !SUB dl, cl
  !MOVZX Ecx, dl
  !MOVZX Edx, dl
  !NOT Edx
  !MOV dl, dl
  !MOV dh, dh
  !MOV dx, dx
  !MOV Edx, Edx
  !CALL QWORD BASS_ASIO_ChannelSetVolume
EndMacro

Macro SincCalc_A
  (Freq_d1 * I + k * Freq_d2 / kfreq + Freq_d2 * I + k * Freq_d1 / kfreq ) + (Freq_d3 * I + k * Freq_d4 / kfreq + Freq_d4 * I + k * Freq_d3 / kfreq )
EndMacro

Macro SincCalc_B
  (Freq_d2 * k / kfreq + I * Freq_d1 + Freq_d1 * k / kfreq + I * Freq_d2) + (Freq_d4 * k / kfreq + I * Freq_d3 + Freq_d3 * k / kfreq + I * Freq_d4)
EndMacro

Procedure CreateSincTable(dummy1.i, dummy2.i, sample.i)
  !PXOR mm1, mm1
  !PXOR mm3, mm3
  !PXOR mm5, mm5
  !MOVQ mm3, QWORD [p_sinc_table_set]
  !MOVNTQ QWORD [p_sinc_table_set], mm5
  !MOVQ mm1, mm3
  !MOVQ mm5, mm1
  !MOVNTQ QWORD [p_sinc_table_set], mm5
  !EMMS
  Protected I.i, k.d, kk.d, CST_D0.i, CST_D4.i, CST_D8.i, CST_D25.i
  Protected D1764.i, kfreq.d
  
  Protected Freq_d1.d, Freq_d2.d, Freq_d3.d, Freq_d4.d
  ;
  ; // 1st 3.141592653
  !NOP QWORD [Rip]
  !NOP cx
  !NOP QWORD [Rip]
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !NOP QWORD [Rip]
  !NOP R8w
  !NOP QWORD [Rip]
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !INC cl
  !MOVZX Rcx, cl
  ; 100000000001001001000011111101101010100001011111110100100111000
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  ;
  !MOVQ xmm5, R8
  !MOVSD [p.v_Freq_d1], xmm5
  !NOP QWORD [Rip]
  !NOP QWORD [p.v_Freq_d1]
  ; // 1st 3.141592653 End
  ;
  ; // 2nd 589793
  !NOP QWORD [Rip]
  !NOP cx
  !NOP QWORD [Rip]
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !NOP QWORD [Rip]
  !NOP R9w
  !NOP QWORD [Rip]
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !MOVZX R9, R9b
  !INC cl
  !MOVZX Rcx, cl
  ; 11111000000100010000111101111111000100011110111011100100011001
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !MOVQ xmm5, R9
  !MOVSD [p.v_Freq_d2], xmm5
  !NOP QWORD [Rip]
  !NOP QWORD [p.v_Freq_d2]
  ; // 2nd 589793 End
  ;
  ; // 3rd 238462
  !NOP QWORD [Rip]
  !NOP cx
  !NOP QWORD [Rip]
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !NOP QWORD [Rip]
  !NOP R8w
  !NOP QWORD [Rip]
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !INC cl
  !MOVZX Rcx, cl
  ; 11110010110001001011101101100011110100110011000000010010000001
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !MOVQ xmm5, R8
  !MOVSD [p.v_Freq_d3], xmm5
  !NOP QWORD [Rip]
  !NOP QWORD [p.v_Freq_d3]
  ; //  3rd 238462 End
  ;
  ; // 4th 643383
  !NOP QWORD [Rip]
  !NOP cx
  !NOP QWORD [Rip]
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !NOP QWORD [Rip]
  !NOP R9w
  !NOP QWORD [Rip]
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !SHL R9b,1
  !MOVZX R9, R9b
  !INC cl
  !MOVZX Rcx, cl
  ; 11101110001000010011100110101100100111000100000011010110110011
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !SHL R9, cl
  !SHL R9, cl
  !INC R9b
  !SHL R9, cl
  !INC R9b
  !MOVQ xmm5, R9
  !MOVSD [p.v_Freq_d4], xmm5
  !NOP QWORD [Rip]
  !NOP QWORD [p.v_Freq_d4]
  ; // 4th 643383 End
  
  !MOV ah, al
  !SUB al, ah
  !MOVZX Rax, al
  !MOV R8, Rax
  !MOVNTI QWORD [p.v_CST_D0], R8
  !INC R8b
  !INC R8b
  !INC R8b
  !INC R8b
  !MOVNTI QWORD [p.v_CST_D4], R8
  !INC R8b
  !INC R8b
  !INC R8b
  !INC R8b
  !MOVNTI QWORD [p.v_CST_D8], R8
  CLR_Rcx_R8_x64
  !INC R8b
  !INC cl
  !SHL R8b, cl
  !INC R8b
  !SHL R8b, cl
  !SHL R8b, cl
  !SHL R8b, cl
  !INC R8b
  !MOVNTI QWORD [p.v_CST_D25], R8
  ;
  ; p.v_D1764 = 1764
  CLR_Rcx_R8_x64
  !INC cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !MOVNTI QWORD [p.v_D1764], R8
  ;#Set_inFreq = D1764
  I = CST_D0
  ;   k = 100/480; CST_D25 / (CST_D25*CST_D4)
  k = F_1_0_d *CST_D25*CST_D4
  kfreq = F_1_0_d * D1764
  kk = (CST_D25*CST_D4) / (CST_D25*CST_D4)
  For I=-sample To sample
    ;     If I = CST_D0
    ;       PokeD(*sinc_table_set+(I+sample)*CST_D8, kk)
    ;     Else
    !XCHG Rdx, Rcx ; nandoku-ka!!
    PokeD(*sinc_table_set+I*CST_D8+CST_D8*sample, Sin(SincCalc_A)/SincCalc_B)
    ;     EndIf
  Next
  Debug sample*CST_D8+CST_D8*sample
EndProcedure

Procedure SincInterpolation128(*buffer_audio_ptr, *sinc_table_ptr, *out_buffer_ptr, sinc_table_size.i, buf_length.i)
  ;/ http://forum.purebasic.com/english/viewtopic.php?f=35&t=47679
  ; Thanks "Wilbert in Netherlands"
  !PXOR xmm4, xmm4
  !PXOR xmm5, xmm5
  !PXOR xmm6, xmm6
  !PXOR xmm7, xmm7
  !MOV ah, al
  !SUB al, ah
  !MOVZX Rax, al
  !MOV dh, dl
  !SUB dl, dh
  !MOVZX Rdx, dl
  !MOV R9b, R9b
  !MOVZX R9, R9b
  ;
  !MOV bh, bl
  !SUB bl, bh
  !MOVZX Rbx, bl
  !INC bl
  !INC bl
  !INC bl
  !INC bl ;4
  !INC bl
  !INC bl
  !INC bl
  !INC bl ;8
  !MOVZX Rbx, bl
  !PXOR mm7, mm7
  !MOVQ mm7, Rbx;8
  !MOV ch, cl
  !SUB cl, ch
  !MOVZX Rcx, cl
  !MOV R8b, R8b
  !MOVZX R8, R8b
  !PXOR mm1, mm1
  !PXOR mm3, mm3
  !PXOR mm5, mm5
  !MOVQ mm3, QWORD [p.v_buf_length]
  !MOVQ mm1, mm3
  !MOVQ mm5, mm1
  !MOVQ Rax, mm5 ; [p.v_buf_length]
  ;
  !PXOR mm1, mm1
  !PXOR mm3, mm3
  !PXOR mm5, mm5
  !MOVQ mm3, QWORD [p.p_buffer_audio_ptr]
  !MOVQ mm1, mm3
  !MOVQ mm5, mm1
  !MOVQ R9, mm5 ; [p.p_buffer_audio_ptr]
  !PXOR mm1, mm1
  !PXOR mm3, mm3
  !PXOR mm5, mm5
  !MOVQ mm3, QWORD [p.p_sinc_table_ptr]
  !MOVQ mm1, mm3
  !MOVQ mm5, mm1
  !MOVQ R8, mm5 ; [p.p_sinc_table_ptr]
  !PXOR mm1, mm1
  !PXOR mm3, mm3
  !PXOR mm5, mm5
  !MOVQ mm3, QWORD [p.v_sinc_table_size]
  !MOVQ mm1, mm3
  !MOVQ mm5, mm1
  !MOVQ Rcx, mm5 ; [p.v_sinc_table_size]
  !PXOR xmm6, xmm6
  !JMP SincInterpolation128_Loop
  
  !XCHG spl, bpl
  !XCHG Rsp, Rsp
  !XCHG Rbp, Rbp
  !XCHG bpl, spl
  !NOP QWORD [Rip]
  !SincInterpolation128_Start:
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !MOVQ mm3, QWORD [p.p_buffer_audio_ptr]
  !MOVQ mm5, QWORD [p.p_sinc_table_ptr]
  !MOVQ mm1, QWORD [p.v_sinc_table_size]
  !MOVQ Rbx, mm7 ; Set 8
  !ADD Rdx, Rbx ;8
  !MOV ch, cl
  !SUB cl, ch
  !MOVZX Rcx, cl
  !MOV R8b, R8b
  !MOVZX R8, R8b
  !MOV R9b, R9b
  !MOVZX R9, R9b
  !MOVQ Rcx, mm1 ; [p.v_sinc_table_size]
  !MOVQ R9, mm3 ; [p.p_buffer_audio_ptr]
  !MOVQ R8, mm5 ; [p.p_sinc_table_ptr]
  !NOP QWORD [R8]
  !ADD R9, Rdx
  !NOP QWORD [R9]
  ;
  !XCHG spl, bpl
  !XCHG Rsp, Rsp
  !XCHG Rbp, Rbp
  !XCHG bpl, spl
  !NOP QWORD [Rip]
  !SincInterpolation128_Loop:
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !MOVQ mm3, QWORD [R8] ; sinc
  !MOVQ mm5, QWORD [R9] ; L + R
  !MOVQ Rbx, mm7 ; Set 8
  !ADD R8, Rbx ;8
  !MOVQ Rbx, mm7 ; Set 64
  !ADD R9, Rbx ;64 7 sample skip (8)
  !MOVQ2DQ xmm7, mm5 ; L + R
  !cvtps2pd xmm5, xmm7 ; L + R R9
  !MOVQ2DQ xmm4, mm3 ; sinc R8
  !movlhps xmm4, xmm4
  !mulpd xmm5, xmm4
  !ADDPD xmm6, xmm5
  !DEC Rcx
  !JNZ SincInterpolation128_Loop ; DEC Rcx
  ;
  !cvtpd2ps xmm6, xmm6
  !MOV R8b, R8b
  !MOVZX R8, R8b
  !MOVQ mm5, QWORD [p.p_out_buffer_ptr]
  !MOVQ R8, mm5 ; [p.p_out_buffer_ptr]
  !ADD R8, Rdx
  !MOVDQ2Q mm3, xmm6
  !MOVQ mm1, mm3
  !MOVQ mm5, mm1
  !NOP QWORD [Rip]
  !MOVNTQ QWORD [R8], mm5
  !PXOR xmm4, xmm4
  !PXOR xmm5, xmm5
  !PXOR xmm6, xmm6
  !PXOR xmm7, xmm7
  !MOVQ Rbx, mm7 ; Set 8
  !SUB Rax, Rbx ; -8
  !NOP QWORD [Rip] ; [12.10 - 2.97]
  !NOP QWORD [Rip] ; [12.10 - 2.97]
  !JNZ SincInterpolation128_Start
  !XCHG ah, al
  !XCHG al, ah
  !EMMS
EndProcedure

Procedure BackupProcess(selected.i)
  Shared *BackupProcessA_1, *BackupProcessA_2, *BackupProcessA_3, BackupProcessA_4.i, BackupProcessA_5.i
  Shared *BackupProcessB_1, *BackupProcessB_2, *BackupProcessB_3, BackupProcessB_4.i, BackupProcessB_5.i
  Shared *BackupProcessC_1, *BackupProcessC_2, *BackupProcessC_3, BackupProcessC_4.i, BackupProcessC_5.i
  Shared *BackupProcessD_1, *BackupProcessD_2, *BackupProcessD_3, BackupProcessD_4.i, BackupProcessD_5.i
  Protected BDP_D2.i, BDP_D4.i, BDP_D8.i, BDP_D16.i, BDP_D0.i, BDP_D12.i
  Protected *BDP_Buffer = *Get_BufferA
  !MOV ch, cl
  !SUB cl, ch
  !MOVZX Rcx, cl
  !MOVNTI QWORD [p.v_BDP_D0], Rcx
  !INC cl
  !INC cl
  !MOVZX Rcx, cl
  !MOVNTI QWORD [p.v_BDP_D2], Rcx
  !INC cl
  !INC cl
  !MOVZX Rcx, cl
  !MOVNTI QWORD [p.v_BDP_D4], Rcx
  !INC cl
  !INC cl
  !INC cl
  !INC cl
  !MOVZX Rcx, cl
  !MOVNTI QWORD [p.v_BDP_D8], Rcx
  !INC cl
  !INC cl
  !INC cl
  !INC cl
  !MOVZX Rcx, cl
  !MOVNTI QWORD [p.v_BDP_D12], Rcx
  !INC cl
  !INC cl
  !INC cl
  !INC cl
  !MOVZX Rcx, cl
  !MOVNTI QWORD [p.v_BDP_D16], Rcx
  If selected=BDP_D2
    SincInterpolation128(*BackupProcessA_1, *BackupProcessA_2, *BackupProcessA_3, BackupProcessA_4, BackupProcessA_5)
    For k = BDP_D0 To BackupProcessA_5 Step 8
      CopyMemoryMaya(dummyRcx, BDP_D8, *BackupProcessA_1+k, *BDP_Buffer+k*BDP_D2)
      CopyMemoryMaya(dummyRcx, BDP_D8, *BackupProcessA_3+k, *BDP_Buffer+k*BDP_D2+BDP_D8)
    Next
  ElseIf selected=BDP_D4
    *BDP_Buffer + BDP_D2 * Get_BufferSizeHalf
    SincInterpolation128(*BackupProcessB_1, *BackupProcessB_2, *BackupProcessB_3, BackupProcessB_4, BackupProcessB_5)
    For k = BDP_D0 To BackupProcessB_5 Step 8
      CopyMemoryMaya(dummyRcx, BDP_D8, *BackupProcessB_1+k, *BDP_Buffer+k*BDP_D2)
      CopyMemoryMaya(dummyRcx, BDP_D8, *BackupProcessB_3+k, *BDP_Buffer+k*BDP_D2+BDP_D8)
    Next
  ElseIf selected=BDP_D8
    *BDP_Buffer + BDP_D2 * Get_BufferSizeHalf
    *BDP_Buffer + BDP_D2 * Get_BufferSizeHalf
    SincInterpolation128(*BackupProcessC_1, *BackupProcessC_2, *BackupProcessC_3, BackupProcessC_4, BackupProcessC_5)
    For k = BDP_D0 To BackupProcessC_5 Step 8
      CopyMemoryMaya(dummyRcx, BDP_D8, *BackupProcessC_1+k, *BDP_Buffer+k*BDP_D2)
      CopyMemoryMaya(dummyRcx, BDP_D8, *BackupProcessC_3+k, *BDP_Buffer+k*BDP_D2+BDP_D8)
    Next
  ElseIf selected=BDP_D16
    *BDP_Buffer + BDP_D2 * Get_BufferSizeHalf
    *BDP_Buffer + BDP_D2 * Get_BufferSizeHalf
    *BDP_Buffer + BDP_D2 * Get_BufferSizeHalf
    SincInterpolation128(*BackupProcessD_1, *BackupProcessD_2, *BackupProcessD_3, BackupProcessD_4, BackupProcessD_5)
    For k = BDP_D0 To BackupProcessD_5 Step 8
      CopyMemoryMaya(dummyRcx, BDP_D8, *BackupProcessD_1+k, *BDP_Buffer+k*BDP_D2)
      CopyMemoryMaya(dummyRcx, BDP_D8, *BackupProcessD_3+k, *BDP_Buffer+k*BDP_D2+BDP_D8)
    Next
  EndIf
EndProcedure

Procedure Get_Buffer(*dummy) ; right !
  Shared *BackupProcessA_1, *BackupProcessA_2, *BackupProcessA_3, BackupProcessA_4.i, BackupProcessA_5.i
  Shared *BackupProcessB_1, *BackupProcessB_2, *BackupProcessB_3, BackupProcessB_4.i, BackupProcessB_5.i
  Shared *BackupProcessC_1, *BackupProcessC_2, *BackupProcessC_3, BackupProcessC_4.i, BackupProcessC_5.i
  Shared *BackupProcessD_1, *BackupProcessD_2, *BackupProcessD_3, BackupProcessD_4.i, BackupProcessD_5.i
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  Get_Buffer_TOP:
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  Protected D0.i, k.i, BackupProcess_ThreadA.i, BackupProcess_ThreadB.i, BackupProcess_ThreadC.i, BackupProcess_ThreadD.i
  Protected lowpassVal.lowpass
  ;
  ; p.v_D0 = 0
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !MOVNTI QWORD [p.v_D0], R8
  !MOVNTI QWORD [p.v_k], R8
  ;
  Protected BDP_D2.i, BDP_D4.i, BDP_D8.i, BDP_D16.i
  !MOV ch, cl
  !SUB cl, ch
  !MOVZX Rcx, cl
  !INC cl
  !INC cl
  !MOVZX Rcx, cl
  !MOVNTI QWORD [p.v_BDP_D2], Rcx
  !INC cl
  !INC cl
  !MOVZX Rcx, cl
  !MOVNTI QWORD [p.v_BDP_D4], Rcx
  !INC cl
  !INC cl
  !INC cl
  !INC cl
  !MOVZX Rcx, cl
  !MOVNTI QWORD [p.v_BDP_D8], Rcx
  !INC cl
  !INC cl
  !INC cl
  !INC cl
  !INC cl
  !INC cl
  !INC cl
  !INC cl
  !MOVZX Rcx, cl
  !MOVNTI QWORD [p.v_BDP_D16], Rcx
  ;
  ThreadPriority(Get_Buffer_Thread, D32)
  CopyMemoryMaya(dummyRcx, Get_Buffer_InBufSize, *Get_Buffer_InBuf, *Get_BufferA) : pdiv = D0
  ;
  
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeBeginPeriod]
  !NOP QWORD [timeBeginPeriod+8]
  !NOP QWORD [timeBeginPeriod+16]
  !NOP QWORD [timeBeginPeriod+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeEndPeriod]
  !NOP QWORD [timeEndPeriod+8]
  !NOP QWORD [timeEndPeriod+16]
  !NOP QWORD [timeEndPeriod+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetTime]
  !NOP QWORD [timeGetTime+8]
  !NOP QWORD [timeGetTime+16]
  !NOP QWORD [timeGetTime+24]
  
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetDevCaps]
  !NOP QWORD [timeGetDevCaps+8]
  !NOP QWORD [timeGetDevCaps+16]
  !NOP QWORD [timeGetDevCaps+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetSystemTime]
  !NOP QWORD [timeGetSystemTime+8]
  !NOP QWORD [timeGetSystemTime+16]
  !NOP QWORD [timeGetSystemTime+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [QueryPerformanceCounter]
  !NOP QWORD [QueryPerformanceCounter+8]
  !NOP QWORD [QueryPerformanceCounter+16]
  !NOP QWORD [QueryPerformanceCounter+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [QueryPerformanceFrequency]
  !NOP QWORD [QueryPerformanceFrequency+8]
  !NOP QWORD [QueryPerformanceFrequency+16]
  !NOP QWORD [QueryPerformanceFrequency+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PureBasicStart]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  ;
  k = BASS_ChannelGetData(chan, *Get_BufferA+Get_Buffer_InBufSize, Get_BufferSize)
  If k=>D0
    pdiv = k
    StatusBarProgress(Enum_StatusBar, D0, pdiv, C_PB_StatusBar_BorderLess, D0, Get_BufferSize)
  EndIf
  
  If pdiv<Get_BufferSize
    Repeat
      
      !NOP QWORD [Rip]
      !NOP QWORD [Rip]
      !NOP QWORD [timeBeginPeriod]
      !NOP QWORD [timeBeginPeriod+8]
      !NOP QWORD [timeBeginPeriod+16]
      !NOP QWORD [timeBeginPeriod+24]
      !NOP QWORD [Rip]
      !NOP QWORD [Rip]
      !NOP QWORD [timeEndPeriod]
      !NOP QWORD [timeEndPeriod+8]
      !NOP QWORD [timeEndPeriod+16]
      !NOP QWORD [timeEndPeriod+24]
      !NOP QWORD [Rip]
      !NOP QWORD [Rip]
      !NOP QWORD [timeGetTime]
      !NOP QWORD [timeGetTime+8]
      !NOP QWORD [timeGetTime+16]
      !NOP QWORD [timeGetTime+24]
      !NOP QWORD [Rip]
      !NOP QWORD [Rip]
      !NOP QWORD [timeGetDevCaps]
      !NOP QWORD [timeGetDevCaps+8]
      !NOP QWORD [timeGetDevCaps+16]
      !NOP QWORD [timeGetDevCaps+24]
      !NOP QWORD [Rip]
      !NOP QWORD [Rip]
      !NOP QWORD [timeGetSystemTime]
      !NOP QWORD [timeGetSystemTime+8]
      !NOP QWORD [timeGetSystemTime+16]
      !NOP QWORD [timeGetSystemTime+24]
      !NOP QWORD [Rip]
      !NOP QWORD [Rip]
      !NOP QWORD [QueryPerformanceCounter]
      !NOP QWORD [QueryPerformanceCounter+8]
      !NOP QWORD [QueryPerformanceCounter+16]
      !NOP QWORD [QueryPerformanceCounter+24]
      !NOP QWORD [Rip]
      !NOP QWORD [Rip]
      !NOP QWORD [QueryPerformanceFrequency]
      !NOP QWORD [QueryPerformanceFrequency+8]
      !NOP QWORD [QueryPerformanceFrequency+16]
      !NOP QWORD [QueryPerformanceFrequency+24]
      !NOP QWORD [Rip]
      !NOP QWORD [Rip]
      !NOP QWORD [PureBasicStart]
      !NOP QWORD [Rip]
      !NOP QWORD [Rip]
      ;
      k = BASS_ChannelGetData(chan, *Get_BufferA+pdiv+Get_Buffer_InBufSize, Get_BufferSize-pdiv)
      If k>=D0
        pdiv + k
        StatusBarProgress(Enum_StatusBar, D0, pdiv, C_PB_StatusBar_BorderLess, D0, Get_BufferSize)
      Else
        ProcedureReturn
      EndIf
    Until pdiv=>Get_BufferSize
  EndIf
  CopyMemoryMaya(dummyRcx, Get_Buffer_InBufSize,*Get_BufferA+pdiv,*Get_Buffer_InBuf)
  ChannelStrip(*Get_BufferA, Get_BufferSize+Get_Buffer_InBufSize)
  TransMemoryLorya(dummyRcx,  Get_BufferSize+Get_Buffer_InBufSize, *Get_BufferA, *SINC_BufferA)
  ClearMemoryMaya(dummyRcx, Get_BufferSize * BDP_D2+Get_Buffer_InBufSize, @MayaZero, *Get_BufferA)
  *BackupProcessA_1 = *SINC_BufferA
  *BackupProcessA_2 = *sinc_table_set
  *BackupProcessA_3 = *SINC_BufferB
  BackupProcessA_4 = Samples
  BackupProcessA_5 = Get_BufferSizeHalf
  BackupProcess_ThreadA = CreateThread(@BackupProcess(), BDP_D2)
  ThreadPriority(BackupProcess_ThreadA, D27)
  *BackupProcessB_1 = *SINC_BufferA + Get_BufferSizeHalf
  *BackupProcessB_2 = *sinc_table_set
  *BackupProcessB_3 = *SINC_BufferB + Get_BufferSizeHalf
  BackupProcessB_4 = Samples
  BackupProcessB_5 = Get_BufferSizeHalf
  BackupProcess_ThreadB = CreateThread(@BackupProcess(), BDP_D4)
  ThreadPriority(BackupProcess_ThreadB, D27)
  *BackupProcessC_1 = *SINC_BufferA + Get_BufferSizeHalf + Get_BufferSizeHalf
  *BackupProcessC_2 = *sinc_table_set
  *BackupProcessC_3 = *SINC_BufferB + Get_BufferSizeHalf + Get_BufferSizeHalf
  BackupProcessC_4 = Samples
  BackupProcessC_5 = Get_BufferSizeHalf
  BackupProcess_ThreadC = CreateThread(@BackupProcess(), BDP_D8)
  ThreadPriority(BackupProcess_ThreadC, D27)
  *BackupProcessD_1 = *SINC_BufferA + Get_BufferSizeHalf + Get_BufferSizeHalf + Get_BufferSizeHalf
  *BackupProcessD_2 = *sinc_table_set
  *BackupProcessD_3 = *SINC_BufferB + Get_BufferSizeHalf + Get_BufferSizeHalf + Get_BufferSizeHalf
  BackupProcessD_4 = Samples
  BackupProcessD_5 = Get_BufferSizeHalf
  BackupProcess_ThreadD = CreateThread(@BackupProcess(), BDP_D16)
  ThreadPriority(BackupProcess_ThreadD, D27)
  WaitThread(BackupProcess_ThreadA)
  WaitThread(BackupProcess_ThreadB)
  WaitThread(BackupProcess_ThreadC)
  WaitThread(BackupProcess_ThreadD)
  InitializeStructure(@lowpassVal, lowpass)
  CopyMemoryMaya(dummyRcx,   Get_BufferSize * BDP_D2  + Get_Buffer_InBufSize, *Get_BufferA, *Get_BufferA)
  lowpassVal\buffer_in = *Get_BufferA
  lowpassVal\Length = Get_BufferSize * BDP_D2 + Get_Buffer_InBufSize
  lowpassVal\Freq_double = F_1_0_d * FreqFloat * BDP_D2
  lowpass(@lowpassVal)
  CopyMemoryMaya(dummyRcx, Get_BufferSize * BDP_D2, *Get_BufferA, *OutBufferInitB)
  Swap *Get_BufferA, *Get_BufferB
  ClearMemoryMaya(dummyRcx, D31752000*D2+D524288, @MayaZero, *Get_BufferA)
  ClearMemoryMaya(dummyRcx, D31752000*D2+D524288, @MayaZero, *SINC_BufferA)
  ClearMemoryMaya(dummyRcx, D31752000*D2+D524288, @MayaZero, *SINC_BufferB)
  ThreadPriority(Get_Buffer_Thread, D15)
  
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeBeginPeriod]
  !NOP QWORD [timeBeginPeriod+8]
  !NOP QWORD [timeBeginPeriod+16]
  !NOP QWORD [timeBeginPeriod+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeEndPeriod]
  !NOP QWORD [timeEndPeriod+8]
  !NOP QWORD [timeEndPeriod+16]
  !NOP QWORD [timeEndPeriod+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetTime]
  !NOP QWORD [timeGetTime+8]
  !NOP QWORD [timeGetTime+16]
  !NOP QWORD [timeGetTime+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetDevCaps]
  !NOP QWORD [timeGetDevCaps+8]
  !NOP QWORD [timeGetDevCaps+16]
  !NOP QWORD [timeGetDevCaps+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetSystemTime]
  !NOP QWORD [timeGetSystemTime+8]
  !NOP QWORD [timeGetSystemTime+16]
  !NOP QWORD [timeGetSystemTime+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [QueryPerformanceCounter]
  !NOP QWORD [QueryPerformanceCounter+8]
  !NOP QWORD [QueryPerformanceCounter+16]
  !NOP QWORD [QueryPerformanceCounter+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [QueryPerformanceFrequency]
  !NOP QWORD [QueryPerformanceFrequency+8]
  !NOP QWORD [QueryPerformanceFrequency+16]
  !NOP QWORD [QueryPerformanceFrequency+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PureBasicStart]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_WaitSemaphore]
  !NOP QWORD [PB_WaitSemaphore+8]
  !NOP QWORD [PB_WaitSemaphore+16]
  !NOP QWORD [PB_WaitSemaphore+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  WaitSemaphore(Get_Buffer_Semaphore)
  ;Get_Buffer_Semaphore + D32
  ClearMemoryMaya(dummyRcx, Get_BufferSize * BDP_D2 +Get_Buffer_InBufSize, @MayaZero, *OutBufferInitB)
  Goto Get_Buffer_TOP
EndProcedure

Macro CLR_Rax_x64
  !MOV ah, al
  !SUB al, ah
  !MOVZX Rax, al
EndMacro

Procedure.l AsioProc(input.b, channel.l, *buffer, length.l, *User)
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [ClearMemoryMaya]
  !NOP QWORD [ClearMemoryMaya+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  ClearMemoryMaya(dummyRcx, length, @MayaZero, *buffer)
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PB_CopyArray]
  !NOP QWORD [PB_CopyArray+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [CopyMemoryMaya]
  !NOP QWORD [CopyMemoryMaya+8]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  Protected AsioDRVcacheMax.i = DRVcacheMax
  Protected Dim *DRVSND_AsioCache(AsioDRVcacheMax)
  CopyArray(*DRVSND_Cache(), *DRVSND_AsioCache() )
  Protected AsioDRVcache.i, *AsioDRVcacheTarget
  Protected *AsioProcBuffer ; = *buffer
  Protected AsioProcLength.i; = length
  Protected AsioD0.i, AsioD8.i, AsioD2.i
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !MOVNTI QWORD [p.v_AsioD0], R8
  !INC R8b
  !SHL R8b,1
  !MOVNTI QWORD [p.v_AsioD2], R8
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !MOVNTI QWORD [p.v_AsioD8], R8
  ClearMemoryMaya(dummyRcx, AsioD8, @MayaZero, @*AsioProcBuffer)
  ClearMemoryMaya(dummyRcx, AsioD8, @MayaZero, @AsioProcLength)
  CopyMemoryMaya(dummyRcx, AsioD8, @*buffer, @*AsioProcBuffer)
  CopyMemoryMaya(dummyRcx, AsioD8, @length, @AsioProcLength)
  CopyMemoryMaya(dummyRcx, AsioD8, @AsioProcLength, @AsioProcLength)
  ClearMemoryMaya(dummyRcx, AsioProcLength, @MayaZero, *AsioProcBuffer)
  ;
  If *OutBufferMax < ( *OutBuffer + AsioProcLength )
    Goto AsioProcMemoryCopyA
  ElseIf *OutBufferMax = ( *OutBuffer + AsioProcLength )
    Goto AsioProcMemoryCopyB
  Else
    Goto AsioProcMemoryCopyC
  EndIf
  ;
  AsioProcMemoryCopyA:
  CopyMemoryMaya(dummyRcx, (*OutBufferMax-*OutBuffer), *OutBuffer, *AsioProcBuffer)
  Swap *OutBufferInit, *OutBufferInitB
  !NOP QWORD [Rip]
  !NOP QWORD [PB_SignalSemaphore]
  !NOP QWORD [PB_SignalSemaphore+8]
  !NOP QWORD [PB_SignalSemaphore+16]
  !NOP QWORD [PB_SignalSemaphore+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  SignalSemaphore(Get_Buffer_Semaphore)
  ;Get_Buffer_Semaphore = MayaZero
  *OutBufferMax = *OutBufferInit + Get_BufferSize * AsioD2
  *OutBuffer = *OutBufferInit
  CopyMemoryMaya(dummyRcx, AsioProcLength-(*OutBufferMax-*OutBuffer), *OutBuffer, *AsioProcBuffer+(*OutBufferMax-*OutBuffer))
  
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeBeginPeriod]
  !NOP QWORD [timeBeginPeriod+8]
  !NOP QWORD [timeBeginPeriod+16]
  !NOP QWORD [timeBeginPeriod+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeEndPeriod]
  !NOP QWORD [timeEndPeriod+8]
  !NOP QWORD [timeEndPeriod+16]
  !NOP QWORD [timeEndPeriod+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetTime]
  !NOP QWORD [timeGetTime+8]
  !NOP QWORD [timeGetTime+16]
  !NOP QWORD [timeGetTime+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetDevCaps]
  !NOP QWORD [timeGetDevCaps+8]
  !NOP QWORD [timeGetDevCaps+16]
  !NOP QWORD [timeGetDevCaps+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetSystemTime]
  !NOP QWORD [timeGetSystemTime+8]
  !NOP QWORD [timeGetSystemTime+16]
  !NOP QWORD [timeGetSystemTime+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [QueryPerformanceCounter]
  !NOP QWORD [QueryPerformanceCounter+8]
  !NOP QWORD [QueryPerformanceCounter+16]
  !NOP QWORD [QueryPerformanceCounter+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [QueryPerformanceFrequency]
  !NOP QWORD [QueryPerformanceFrequency+8]
  !NOP QWORD [QueryPerformanceFrequency+16]
  !NOP QWORD [QueryPerformanceFrequency+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PureBasicStart]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  CopyMemoryMaya(dummyRcx, AsioProcLength, *AsioProcBuffer, *AsioProcBuffer)
  SoundDriversCache
  CLR_Rax_x64
  ProcedureReturn AsioProcLength
  ;
  AsioProcMemoryCopyB:
  CopyMemoryMaya(dummyRcx, AsioProcLength, *OutBuffer, *AsioProcBuffer)
  Swap *OutBufferInit, *OutBufferInitB
  !NOP QWORD [Rip]
  !NOP QWORD [PB_SignalSemaphore]
  !NOP QWORD [PB_SignalSemaphore+8]
  !NOP QWORD [PB_SignalSemaphore+16]
  !NOP QWORD [PB_SignalSemaphore+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  SignalSemaphore(Get_Buffer_Semaphore)
  ;Get_Buffer_Semaphore = MayaZero
  *OutBufferMax = *OutBufferInit + Get_BufferSize * AsioD2
  *OutBuffer = *OutBufferInit
  
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeBeginPeriod]
  !NOP QWORD [timeBeginPeriod+8]
  !NOP QWORD [timeBeginPeriod+16]
  !NOP QWORD [timeBeginPeriod+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeEndPeriod]
  !NOP QWORD [timeEndPeriod+8]
  !NOP QWORD [timeEndPeriod+16]
  !NOP QWORD [timeEndPeriod+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetTime]
  !NOP QWORD [timeGetTime+8]
  !NOP QWORD [timeGetTime+16]
  !NOP QWORD [timeGetTime+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetDevCaps]
  !NOP QWORD [timeGetDevCaps+8]
  !NOP QWORD [timeGetDevCaps+16]
  !NOP QWORD [timeGetDevCaps+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetSystemTime]
  !NOP QWORD [timeGetSystemTime+8]
  !NOP QWORD [timeGetSystemTime+16]
  !NOP QWORD [timeGetSystemTime+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [QueryPerformanceCounter]
  !NOP QWORD [QueryPerformanceCounter+8]
  !NOP QWORD [QueryPerformanceCounter+16]
  !NOP QWORD [QueryPerformanceCounter+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [QueryPerformanceFrequency]
  !NOP QWORD [QueryPerformanceFrequency+8]
  !NOP QWORD [QueryPerformanceFrequency+16]
  !NOP QWORD [QueryPerformanceFrequency+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PureBasicStart]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  CopyMemoryMaya(dummyRcx, AsioProcLength, *AsioProcBuffer, *AsioProcBuffer)
  SoundDriversCache
  CLR_Rax_x64
  ProcedureReturn AsioProcLength
  ;
  AsioProcMemoryCopyC:
  CopyMemoryMaya(dummyRcx, AsioProcLength, *OutBuffer, *AsioProcBuffer)
  *OutBuffer + AsioProcLength
  
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeBeginPeriod]
  !NOP QWORD [timeBeginPeriod+8]
  !NOP QWORD [timeBeginPeriod+16]
  !NOP QWORD [timeBeginPeriod+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeEndPeriod]
  !NOP QWORD [timeEndPeriod+8]
  !NOP QWORD [timeEndPeriod+16]
  !NOP QWORD [timeEndPeriod+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetTime]
  !NOP QWORD [timeGetTime+8]
  !NOP QWORD [timeGetTime+16]
  !NOP QWORD [timeGetTime+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetDevCaps]
  !NOP QWORD [timeGetDevCaps+8]
  !NOP QWORD [timeGetDevCaps+16]
  !NOP QWORD [timeGetDevCaps+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [timeGetSystemTime]
  !NOP QWORD [timeGetSystemTime+8]
  !NOP QWORD [timeGetSystemTime+16]
  !NOP QWORD [timeGetSystemTime+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [QueryPerformanceCounter]
  !NOP QWORD [QueryPerformanceCounter+8]
  !NOP QWORD [QueryPerformanceCounter+16]
  !NOP QWORD [QueryPerformanceCounter+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [QueryPerformanceFrequency]
  !NOP QWORD [QueryPerformanceFrequency+8]
  !NOP QWORD [QueryPerformanceFrequency+16]
  !NOP QWORD [QueryPerformanceFrequency+24]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  !NOP QWORD [PureBasicStart]
  !NOP QWORD [Rip]
  !NOP QWORD [Rip]
  CopyMemoryMaya(dummyRcx, AsioProcLength, *AsioProcBuffer, *AsioProcBuffer)
  SoundDriversCache
  CLR_Rax_x64
  ProcedureReturn AsioProcLength
EndProcedure

Global ButtonImage_OnAir.i
ButtonImage_OnAir = CreateImage(C_PB_Any, D37, D37)
StartDrawing(ImageOutput(ButtonImage_OnAir))
Box(D0, D0, D37, D37, H_FFFFFF)
DrawingMode(C_PB_2DDrawing_Gradient)
BackColor(H_00EE00)
FrontColor(H_005500)
BoxedGradient(D0, D0, D37, D37)
Circle(D19, D19, D100)
StopDrawing()

Global ButtonImage_OffAir.i
ButtonImage_OffAir = CreateImage(C_PB_Any, D37, D37)
StartDrawing(ImageOutput(ButtonImage_OffAir))
Box(D0, D0, D37, D37, H_FFFFFF)
DrawingMode(C_PB_2DDrawing_Gradient)
BackColor(H_0000EE)
FrontColor(H_000055)
BoxedGradient(D0, D0, D37, D37)
Circle(D19, D19, D100)
StopDrawing()

Global GadgetFont.i
GadgetFont = LoadFont(C_PB_Any, "Arial", D15, C_PB_Font_HighQuality)
If GadgetFont
  SetGadgetFont(C_PB_Default, FontID(GadgetFont))
EndIf

If OpenWindow(Enum_Window_NROrya, C_PB_Ignore, C_PB_Ignore, D522+D5, D330, "NetRadio Lorya "+#NRVer, C_PB_Window_SystemMenu | (D2+D2) | C_PB_Window_TitleBar | C_PB_Window_BorderLess)
  SetWindowColor(Enum_Window_NROrya, H_908070+D40)
  TreeGadget(Enum_Tree_PlayList, D10, D50, D500, D250, C_PB_Tree_AlwaysShowSelection )
  SetGadgetColor(Enum_Tree_PlayList, C_PB_Gadget_BackColor, H_908070)
  ButtonGadget(Enum_ButtonImage_GetPlayList, D10, D5, D100, D40, "PLAY")
  GadgetToolTip(Enum_ButtonImage_GetPlayList, "Volume control 100% (maximum)")
  OptionGadget(Enum_CheckBoxPT, D100+D40, D5, D50+D5, D40, "2.6" )
  GadgetToolTip(Enum_CheckBoxPT, "Optical phono cartridge")
  OptionGadget(Enum_CheckBox8K, D100+D100+D10, D5, D50+D10+D5, D40, "10.8")
  GadgetToolTip(Enum_CheckBox8K, "Magnetic phono cartridge")
  OptionGadget(Enum_CheckBox4K, D250+D40, D5, D50+D10+D5, D40, "21.5")
  GadgetToolTip(Enum_CheckBox4K, "Audiophile Headphones")
  OptionGadget(Enum_CheckBox2K, D330+D40, D5, D50+D10+D5, D40, "43.1")
  GadgetToolTip(Enum_CheckBox2K, "Studio Headphones")
  OptionGadget(Enum_CheckBox1K, D330+D120, D5, D50+D10+D5, D40, "86.1")
  GadgetToolTip(Enum_CheckBox1K, "Full range speaker")
Else
  End
EndIf

Structure radio
  title.s
  url.s
  text.s
EndStructure

Global NewList PLS.radio()
Global FileNo.i, FileReadLoop.i, FileReadLoopNo.i, FileBufStr.s

FileNo = ReadFile(C_PB_Any, GetPathPart(ProgramFilename())+"DI.FM - Favorites.pls")
If FileNo=D0
  FileNo = ReadFile(C_PB_Any, GetPathPart(ProgramFilename())+"My radio - Favorites.pls")
EndIf
If FileNo>D0
  If ReadString(FileNo)="[playlist]"
    FileReadLoop = Val(StringField(ReadString(FileNo),D2, "=") )
    For FileReadLoopNo=D1 To FileReadLoop
      AddElement(PLS())
      PLS()\url =  StringField(ReadString(FileNo),D2, "=")
      PLS()\title = StringField(ReadString(FileNo),D2, "=")
      PLS()\text = GetURLPart(PLS()\url, #PB_URL_Site)+ " - " + GetURLPart(PLS()\url, #PB_URL_Path)
      FileBufStr = StringField(ReadString(FileNo),D2, "=")
    Next
  EndIf
  CloseFile(FileNo)
Else
  ERRMES1A="I can't find favorites playlist."+Chr(D10+D2+D1)+Chr(D10)+Chr(D10+D2+D1)+Chr(D10)
  !JMP ERROR_STARTUP_END
EndIf

ForEach PLS()
  AddGadgetItem( Enum_Tree_PlayList, DM1, PLS()\title, D0, D0)
  AddGadgetItem( Enum_Tree_PlayList, DM1, PLS()\text, D0, D1)
Next

Global WindowEventVar.i, PostRadioStationA.s, PostRadioStationB.s, PostRadioStationC.s

SelectRadioStation:
Repeat
  WindowEventVar = WaitWindowEvent()
  If WindowEventVar = C_PB_Event_Gadget
    If EventGadget() = Enum_ButtonImage_GetPlayList
      FileBufStr = GetGadgetText( Enum_Tree_PlayList )
      ClearMemoryMaya(dummyRcx, D31752000*D2+D524288, *Get_BufferA, *Get_BufferA)
      ClearMemoryMaya(dummyRcx, D31752000*D2+D524288, *Get_BufferB, *Get_BufferB)
      ClearMemoryMaya(dummyRcx, D31752000*D2+D524288, *OutBufferInit, *OutBufferInit)
      ClearMemoryMaya(dummyRcx, D31752000*D2+D524288, *OutBufferInitB, *OutBufferInitB)
      ClearMemoryMaya(dummyRcx, D31752000*D2+D524288, @MayaZero, *SINC_BufferA)
      ClearMemoryMaya(dummyRcx, D31752000*D2+D524288, @MayaZero, *SINC_BufferB)
      ClearMemoryMaya(dummyRcx, D524288, @MayaZero, *sinc_table_set)
      ClearMemoryMaya(dummyRcx, D524288, *Get_Buffer_InBuf, *Get_Buffer_InBuf)
      If GetGadgetState(Enum_CheckBoxPT)
        CLR_Rcx_R8_x64
        !INC cl
        !INC R8b
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !MOVNTI QWORD [v_Samples], R8
      ElseIf GetGadgetState(Enum_CheckBox8K)
        CLR_Rcx_R8_x64
        !INC cl
        !INC R8b
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !MOVNTI QWORD [v_Samples], R8
      ElseIf GetGadgetState(Enum_CheckBox4K)
        CLR_Rcx_R8_x64
        !INC cl
        !INC R8b
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !MOVNTI QWORD [v_Samples], R8
      ElseIf GetGadgetState(Enum_CheckBox2K)
        CLR_Rcx_R8_x64
        !INC cl
        !INC R8b
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !MOVNTI QWORD [v_Samples], R8
      ElseIf GetGadgetState(Enum_CheckBox1K)
        CLR_Rcx_R8_x64
        !INC cl
        !INC R8b
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !MOVNTI QWORD [v_Samples], R8
      Else
        CLR_Rcx_R8_x64
        !INC cl
        !INC R8b
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !SHL R8, cl
        !MOVNTI QWORD [v_Samples], R8        
      EndIf
      ForEach PLS()
        If FileBufStr=PLS()\text Or FileBufStr=PLS()\title
          PostRadioStationA = PLS()\url
          PostRadioStationB = DRVSND_FILENAME + " : " + PLS()\title
          PostRadioStationC = PLS()\text
          Break 2
        EndIf
      Next
    EndIf
  ElseIf WindowEventVar = C_PB_Event_CloseWindow
    ERRMES1A="This radio software output Max volume, Please use USB-DAC."+Chr(D10+D2+D1)+Chr(D10)+Chr(D10+D2+D1)+Chr(D10)
    !JMP ERROR_STARTUP_END
  EndIf
ForEver

BassCache
N_BASS_CONFIG_NET_BUFFER	= D10 + D2
BASS_Init( D0, D44100, D0, D0, D0)
BASS_SetConfig(N_BASS_CONFIG_NET_BUFFER, Val(ReverseString(ReverseString(Str( (D50+D40)*D50*D10*D2 ) ) ) ) )

If Len(PostRadioStationA)>D0
  BassCache
  chan = BASS_StreamCreateURL(@PostRadioStationA, D0, N_BASS_UNICODE | N_BASS_STREAM_DECODE | N_BASS_SAMPLE_FLOAT , D0,  D0)
  If chan=D0
    BASS_Free()
    Goto SelectRadioStation
  EndIf
Else
  BASS_Free()
  Goto SelectRadioStation
EndIf

; #BASS_ATTRIB_FREQ	 = 1
If BASS_ChannelGetAttribute(chan, D1, @FreqFloat)
  Freq = IntQ(FreqFloat)
Else
  BASS_Free()
  ERRMES1A="I can't use this sound device."+Chr(D10+D2+D1)+Chr(D10)+Chr(D10+D2+D1)+Chr(D10)
  !JMP ERROR_STARTUP_END
EndIf

*DRVSND_Cache(DRVcacheMax) = Val(ReverseString(ReverseString(Str( @AsioProc() ) ) ) )

FreeGadget(Enum_ButtonImage_GetPlayList)
FreeGadget(Enum_CheckBox1K)
FreeGadget(Enum_CheckBox2K)
FreeGadget(Enum_CheckBox4K)
FreeGadget(Enum_CheckBox8K)
FreeGadget(Enum_CheckBoxPT)
FreeGadget(Enum_Tree_PlayList)
FreeFont(GadgetFont)
SmartWindowRefresh(Enum_Window_NROrya, D1)
ResizeWindow(Enum_Window_NROrya, C_PB_Ignore, C_PB_Ignore, D330, D50)
SetWindowTitle(Enum_Window_NROrya, PostRadioStationB)
CreateStatusBar(Enum_StatusBar, WindowID(Enum_Window_NROrya))
AddStatusBarField(C_PB_Ignore)

SIMPLE_MOVE_REGISTERS_Up_and_Down
AddElement(*DRVSND_CACHE_LIST()) : *DRVSND_CACHE_LIST() = Val(ReverseString(ReverseString(Str(@BackupProcess() ) ) ) )
AddElement(*DRVSND_CACHE_LIST()) : *DRVSND_CACHE_LIST() = Val(ReverseString(ReverseString(Str(@SincInterpolation128() ) ) ) )
AddElement(*DRVSND_CACHE_LIST()) : *DRVSND_CACHE_LIST() = Val(ReverseString(ReverseString(Str(@AsioProc() ) ) ) )

DRVcacheMax = ListSize(*DRVSND_CACHE_LIST()) - D1
ReDim *DRVSND_Cache(DRVcacheMax)
ForEach *DRVSND_CACHE_LIST()
  *DRVSND_Cache(ListIndex(*DRVSND_CACHE_LIST())) = *DRVSND_CACHE_LIST()
Next

Get_Buffer_Semaphore = Val(ReverseString(ReverseString(Str( CreateSemaphore() ) ) ) )
; Global Get_Buffer_SemaphoreEnd.i
; Get_Buffer_SemaphoreEnd = CreateSemaphore()
Get_Buffer_Thread = CreateThread(Val(ReverseString(ReverseString(Str( @Get_Buffer() ) ) ) ), D0)

; CallDebugger
; WaitSemaphore(Get_Buffer_Semaphore)
; CallDebugger

Procedure PreProcess(*dummy)
  CreateSincTable(D0, D0, Samples)
  TransMemoryLorya(dummyRcx,  D524288, *sinc_table_set, *sinc_table_set)
  Samples + Samples + D1
  SincInterpolation128(*SINC_BufferA, *sinc_table_set, *SINC_BufferB, Samples, Get_BufferSizeHalf)
EndProcedure

SetPriorityClass_(*CurrentProcess, C_ABOVE_NORMAL_PRIORITY_CLASS)
PreProcess_Thread.i = CreateThread(Val(ReverseString(ReverseString(Str( @PreProcess() ) ) ) ), D0)
While IsThread(PreProcess_Thread) : WaitWindowEvent(D100) : Wend

Global WasapiStop.i, MusicStarted.i
; #BASS_ASIO_THREAD = 1
; #BASS_ASIO_FORMAT_FLOAT =19
SIMPLE_MOVE_REGISTERS_Up_and_Down
BassCache
If BASS_ASIO_Init(Asio_Device_Global, D1) And BASS_ASIO_CheckRate(Freq*D2)
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !INC R8b
  !MOVNTI QWORD [v_WasapiStop], R8
  BASS_ASIO_SetRate(Freq*D2)
  BASS_ASIO_ChannelEnable(D0,D0, *DRVSND_Cache(DRVcacheMax), D0)
  BASS_ASIO_ChannelJoin(D0,D1,D0)
  BASS_ASIO_ChannelSetFormat(D0,D0,D19)
  ASIO_ChannelSetVolume_Stabilizer
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !INC R8b
  !INC R8b
  !MOVNTI QWORD [v_MusicStarted], R8
  BASS_ASIO_Start(D0, D0)
  Repeat
    !NOP QWORD [Rip]
    !NOP QWORD [Rip]
    WindowEventVar = WaitWindowEvent(D250)
    If WindowEventVar = C_PB_Event_CloseWindow
      If IsThread(Get_Buffer_Thread)
        KillThread(Get_Buffer_Thread)
      EndIf
      Break
    EndIf
  ForEver
  BASS_ASIO_Stop()
EndIf
BASS_ASIO_Free()
BASS_ChannelStop(chan)
BASS_StreamFree(chan)
BASS_Free()

End

; p.v_C_PB_MessageRequester_Ok = 0
; p.v_C_PB_MessageRequester_Error = 16

!ERROR_STARTUP_END:
#ERRMES2="NetRadio Lorya "+#NRVer+Chr(13)+Chr(10)+"Low pass filter 9801Hz slow accurated pi 27 digit."+Chr(13)+Chr(10)
#ERRMES3="Required DI.FM - Favorites.pls or My radio - Favorites.pls"+Chr(13)+Chr(10)
#ERRMES2A="Developer Hiroyuki Yokota (oryaaaaa) Okazaki 444-3174"+Chr(13)+Chr(10)+Chr(13)+Chr(10)
#ERRMES6="PureBasic 6.02 LTS "+Chr(13)+Chr(10)
#ERRMES7="Copyright (c) 1998-2023 Fantaisie Software"+Chr(13)+Chr(10)+Chr(13)+Chr(10)
#ERRMES8="flat assembler  version 1.73"+Chr(13)+Chr(10)
#ERRMES9="Copyright (c) 1999-2021, Tomasz Grysztar"+Chr(13)+Chr(10)+Chr(13)+Chr(10)
#ERRMES4="BASS 2.4.14 Shareware / BASSASIO 1.3.1 Shareware"+Chr(13)+Chr(10)
#ERRMES5="Copyright (c) 1999-2019 Un4seen Developments Ltd. "+Chr(13)+Chr(10)+Chr(13)+Chr(10)
MessageRequester("ERROR",ERRMES1A+#ERRMES2+#ERRMES3+#ERRMES2A+#ERRMES6+#ERRMES7+#ERRMES8+#ERRMES9+#ERRMES4+#ERRMES5, D15+D1)
End
!RET
Macro CPUcache_timeGetTime_Sentence
  timeBeginPeriod_(0)
  timeEndPeriod_(0)
  timeGetTime_()
  timeGetDevCaps_(0,0)
  timeGetSystemTime_(0,0)
  QueryPerformanceCounter_(0)
  QueryPerformanceFrequency_(0)
EndMacro
CPUcache_timeGetTime_Sentence
BASS_ASIO_ChannelSetVolume(0, -1, 1.0)
User avatar
oryaaaaa
Addict
Addict
Posts: 825
Joined: Mon Jan 12, 2004 11:40 pm
Location: Okazaki, JAPAN

Re: NetRadioLoryaPhantomRecord : SuperBass netradio For HIGH END AUDIO [Windows]

Post by oryaaaaa »

I post manual by google translate and hand translate.

Only compatible with USB-DAC with volume control or integrated amplifier with volume control.

I recommend USB-DAC. OUTPUT VOLUME is MAX
USB-DAC S.M.S.L M300SE CS43131 or AKM AK4493S XMOS XU316 models


Equipped with high-precision software LPF, designed to play in NOS or SuperSLOW.
But cheap USB-DAC have cheap hardware LPF, Then you use short SLOW filters.

"DI.FM - Favorites.pls" or "My radio - Favorites.pls" : Move to the execution folder.
Shoutcast MP3 WAV 44.1kHz connetct HTTP only ( dont use HTTPS secure )

Turn on the USB-DAC and start NetRadioLoryaYukey.

High-precision pi correction DSD 2.8MHz DAC optimization upsampling 88.2kHz
High-precision pi 3.141592653589793238462643383
ffmpeg 20 digit or 14 digit, this 27 digit
Enjoy the femtoclock trend of high-end component grade.
Output 88.2kHz only. P-4 cores required, P-6 cores recommended.
Intel Core i5 RapterLake or i7 RapterLake tested

After decoding: High-precision bandwidth compression (22kHz → 11kHz)
Multiply every 2 samples by LOG10(8) = 0.9030899869919435
Suppressing the signal value prevents frequencies above 12kHz,
allowing you to enjoy a sound with a strong analog feel.

Final processing: Low-pass filter 9801Hz slow
High-precision low-pass filter processing using 27 decimal places of pi,
performs with a cutoff frequency of 9801Hz.
Windows WASAPI use LPF, maybe 12000Hz then more lower frequency BEST

Electronic bit stabilizer processing:
Processes the calculation table and received data with MMX stabilizer (Nontallion Blade style)
Uses CopyMemoryMaya.dll to initialize buffers and transfer buffers
CPU instruction cache is implemented, limited to argument processing of time control WindowsAPI
After calculation processing, only the P-2 core (reception and operation) is in use to suppress the operating core temperature

CPU performance
Required P-7 core TurboBoost:Enabled | Stable E-0 core HyperThread:Disabled
Tested on RapterLake P-8 E-0 HT:false TB:5.08GHz L1:640KB L2:16.0MB L3:30.0MB
E-cores enabeld, this process is stop and many users BUG?

Lower frequency: Calculation listening environment: Required CPU performance
2.6 Hz: Optical phono cartridge turntable P-8 E-0 TB:5GHz Music Chart Top Ranker
10.8 Hz: Magnetic phono cartridge turntable P-6 E-0 Music Chart Entry ranker or Record cutting studio
21.5 Hz: Audiophile Headphones P-4
43.1 Hz: Studio Headphones P-4 Amature Music Chart Top Ranker
86.1 Hz: Full range speaker P-4
172.3 Hz: ThinkPad embedded speaker Notebook computer speaker P-2 Radio stations format
If you release MUSIC CD, Radio stations format making is Easy and Cheep, MakeCD Professional 10.8Hz
Many amature rock band selected 200Hz low freq, Radio is best, but CD is worst scores. and GO AWAY


About the operation screen
Select a radio channel and click [PLAY].
Lower frequency setting, default value 172.3Hz ThinkPad embedded speaker (laptop)

About the playback screen
The Asio drivers name and radio channel used for output are displayed.
To exit, turn down the volume and click [X] on the right. Or press ALT+F4.
The beep will sound when the progress display reaches "maximum" and changes to "40% progress."
The following screen display cannot be ended. Please wait for a while.
Calculation is in progress and operations cannot be accepted.

How to listen to the radio
Set the amplifier volume to zero.
Select a channel and click [PLAY].

After about 110 seconds, it will start to ring.
When the progress indicator reaches "maximum" and changes to "40% progress", it will ring.
The WASAPI output transfer process is silent and active to ensure stability.

Adjust the amplifier volume "slowly".
If it does not ring, the radio channel broadcast has stopped. Check with a free web radio.

Frequency setup for Speaker
FYNE AUDIO F300 54Hz - 28kHz (-6dB) Best mode 43.07Hz
FYNE AUDIO F500S 45Hz - 34kHz (-6dB) Best mode 21.5Hz
Avantgarde DUO GT subwoofer 18Hz - 350Hz Best mode 10.8Hz
User avatar
oryaaaaa
Addict
Addict
Posts: 825
Joined: Mon Jan 12, 2004 11:40 pm
Location: Okazaki, JAPAN

Re: NetRadioLoryaPhantomRecord : SuperBass netradio For HIGH END AUDIO [Windows]

Post by oryaaaaa »

Update
[LPF improved] PI 27 digit to 31 digit

Add freq_d5.d variable

Code: Select all

  !NOP [p.v_F_2_0_d]
  ;
  Protected in1.d, in2.d, out1.d, out2.d, pos.i
  Protected in3.d, in4.d, out3.d, out4.d, in1pre.d, in3pre.d
  Protected Freq_d1.d, Freq_d2.d, Freq_d3.d, Freq_d4.d, Freq_d5.d
  ;
  ; // 1st 3.141592653
  !NOP QWORD [Rip]
Add 5th 2795 setup , Fix Macro omega

Code: Select all

  !NOP QWORD [p.v_Freq_d4]
  ; // 4th 643383 End
  ;
  ; // 5th 2795
  !NOP QWORD [Rip]
  !NOP cx
  !NOP QWORD [Rip]
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !SHL cl, 1
  !MOVZX Rcx, cl
  !NOP QWORD [Rip]
  !NOP R8w
  !NOP QWORD [Rip]
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !SHL R8b,1
  !MOVZX R8, R8b
  !INC cl
  !MOVZX Rcx, cl
  ; 11101000110110001001001110111011111000110100100110011011111110
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !INC R8b
  !SHL R8, cl
  !MOVQ xmm5, R8
  !MOVSD [p.v_Freq_d5], xmm5
  !NOP QWORD [Rip]
  !NOP QWORD [p.v_Freq_d5]
  ; // 5th 2795 End]
  
  Macro omega
    F_2_0_d * Freq_d1 * D9801 / samplerate + F_2_0_d * Freq_d2 * D9801 / samplerate + F_2_0_d * Freq_d3 * D9801 / samplerate + F_2_0_d * Freq_d4 * D9801 / samplerate + F_2_0_d * Freq_d5 * D9801 / samplerate
  EndMacro
  
  Protected LPFcalcA.d, LPFcalcB.d, LPFcalcD.d, LPFcalcE.d
Post Reply