Subversion Repositories Kolibri OS

Rev

Rev 575 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 575 Rev 694
Line 1... Line 1...
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                              ;;
2
;;                                                              ;;
3
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2006-2008. All rights reserved. ;;
4
;; Distributed under terms of the GNU General Public License    ;;
4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
8
;   (C) copyright Serge 2006
8
; Serge 2006-2008
Line 9... Line 9...
9
;   email: infinity_sound@mail.ru
9
; email: infinity_sound@mail.ru
Line 26... Line 26...
26
include 'imports.inc'
26
include 'imports.inc'
Line 27... Line 27...
27
 
27
 
28
FORCE_MMX         equ 0  ;set to 1 to force use mmx or
28
FORCE_MMX         equ 0  ;set to 1 to force use mmx or
29
FORCE_MMX_128     equ 0  ;integer sse2 extensions
29
FORCE_MMX_128     equ 0  ;integer sse2 extensions
-
 
30
                         ;and reduce driver size
30
                        ;and reduce driver size
31
 
Line -... Line 32...
-
 
32
;USE_SSE          equ 0
-
 
33
 
31
;USE_SSE          equ 0
34
USE_SSE2_MIXER    equ 0  ;floating point mixer. Disabled by default
Line 32... Line 35...
32
 
35
 
Line 895... Line 898...
895
           fild word [l_vol]
898
           fild word [l_vol]
Line 896... Line 899...
896
 
899
 
Line 897... Line 900...
897
           call .calc
900
           call .calc
-
 
901
 
898
 
902
           fistp word [edx+STREAM.l_amp]
Line 899... Line 903...
899
           fistp word [edx+STREAM.l_amp]
903
           fstp dword [edx+STREAM.l_amp_f]
Line 900... Line 904...
900
           fstp st0
904
           fstp st0
Line 901... Line 905...
901
 
905
 
-
 
906
           fild word [r_vol]
902
           fild word [r_vol]
907
 
Line 903... Line 908...
903
 
908
           call .calc
904
           call .calc
909
 
905
 
910
           fistp word [edx+STREAM.r_amp]
Line 921... Line 926...
921
           fsub st, st1
926
           fsub st, st1
922
           f2xm1
927
           f2xm1
923
           fld1
928
           fld1
924
           faddp st1, st0
929
           faddp st1, st0
925
           fscale
930
           fscale
-
 
931
           fld st0
926
           fimul dword [_32767]
932
           fimul dword [_32767]
927
           ret 0
933
           ret 0
928
endp
934
endp
Line 929... Line 935...
929
 
935
 
Line 1062... Line 1068...
1062
           mov [ebx+STREAM.out_count], 512
1068
           mov [ebx+STREAM.out_count], 512
Line 1063... Line 1069...
1063
 
1069
 
1064
.add_buff:
1070
.add_buff:
1065
           mov ecx, [ebx+STREAM.out_rp]
1071
           mov ecx, [ebx+STREAM.out_rp]
-
 
1072
           mov [eax],ecx
-
 
1073
 
-
 
1074
if USE_SSE2_MIXER
-
 
1075
           mov edi, dword [ebx+STREAM.l_amp_f]
-
 
1076
           mov [eax+4], edi
-
 
1077
           mov edi, dword [ebx+STREAM.r_amp_f]
-
 
1078
           mov [eax+8], edi
1066
           mov [eax],ecx
1079
else
1067
           mov edi, dword [ebx+STREAM.l_amp]
1080
           mov edi, dword [ebx+STREAM.l_amp]
-
 
1081
           mov [eax+4], edi
1068
           mov [eax+4], edi
1082
end if
1069
           add [ebx+STREAM.out_rp], 512
1083
           add [ebx+STREAM.out_rp], 512
Line 1070... Line 1084...
1070
           sub [ebx+STREAM.out_count], 512
1084
           sub [ebx+STREAM.out_count], 512
1071
 
1085
 
1072
           add eax, 8
1086
           add eax, 12
1073
           inc edx
1087
           inc edx
1074
.next:
1088
.next:
1075
           mov ebx, [ebx+STREAM.str_fd]
1089
           mov ebx, [ebx+STREAM.str_fd]