Browse Source

clamp to correct value

ipatix 7 years ago
parent
commit
75f6c27dbd
1 changed files with 8 additions and 8 deletions
  1. 8
    8
      src/music/main_mixer.s

+ 8
- 8
src/music/main_mixer.s View File

889
 
889
 
890
         MOV     R12, R0             @ left sample #1
890
         MOV     R12, R0             @ left sample #1
891
         CMP     R12, #0x40000000
891
         CMP     R12, #0x40000000
892
-        MOVGE   R12, #0x3F800000
892
+        MOVGE   R12, #0x3FC00000
893
         CMP     R12, #-0x40000000
893
         CMP     R12, #-0x40000000
894
         MOVLT   R12, #-0x40000000
894
         MOVLT   R12, #-0x40000000
895
         AND     R6, R11, R12, LSL#1
895
         AND     R6, R11, R12, LSL#1
896
 
896
 
897
         MOV     R0, R0, LSL#16      @ right
897
         MOV     R0, R0, LSL#16      @ right
898
         CMP     R0, #0x40000000
898
         CMP     R0, #0x40000000
899
-        MOVGE   R0, #0x3F800000
899
+        MOVGE   R0, #0x3FC00000
900
         CMP     R0, #-0x40000000
900
         CMP     R0, #-0x40000000
901
         MOVLT   R0, #-0x40000000
901
         MOVLT   R0, #-0x40000000
902
         AND     R7, R11, R0, LSL#1
902
         AND     R7, R11, R0, LSL#1
903
 
903
 
904
         MOV     R12, R1             @ left sample #2
904
         MOV     R12, R1             @ left sample #2
905
         CMP     R12, #0x40000000
905
         CMP     R12, #0x40000000
906
-        MOVGE   R12, #0x3F800000
906
+        MOVGE   R12, #0x3FC00000
907
         CMP     R12, #-0x40000000
907
         CMP     R12, #-0x40000000
908
         MOVLT   R12, #-0x40000000
908
         MOVLT   R12, #-0x40000000
909
         AND     R12, R11, R12, LSL#1
909
         AND     R12, R11, R12, LSL#1
911
 
911
 
912
         MOV     R1, R1, LSL#16      @ right
912
         MOV     R1, R1, LSL#16      @ right
913
         CMP     R1, #0x40000000
913
         CMP     R1, #0x40000000
914
-        MOVGE   R1, #0x3F800000
914
+        MOVGE   R1, #0x3FC00000
915
         CMP     R1, #-0x40000000
915
         CMP     R1, #-0x40000000
916
         MOVLT   R1, #-0x40000000
916
         MOVLT   R1, #-0x40000000
917
         AND     R1, R11, R1, LSL#1
917
         AND     R1, R11, R1, LSL#1
919
 
919
 
920
         MOV     R12, R2             @ left sample #3
920
         MOV     R12, R2             @ left sample #3
921
         CMP     R12, #0x40000000
921
         CMP     R12, #0x40000000
922
-        MOVGE   R12, #0x3F800000
922
+        MOVGE   R12, #0x3FC00000
923
         CMP     R12, #-0x40000000
923
         CMP     R12, #-0x40000000
924
         MOVLT   R12, #-0x40000000
924
         MOVLT   R12, #-0x40000000
925
         AND     R12, R11, R12, LSL#1
925
         AND     R12, R11, R12, LSL#1
927
 
927
 
928
         MOV     R2, R2, LSL#16      @ right
928
         MOV     R2, R2, LSL#16      @ right
929
         CMP     R2, #0x40000000
929
         CMP     R2, #0x40000000
930
-        MOVGE   R2, #0x3F800000
930
+        MOVGE   R2, #0x3FC00000
931
         CMP     R2, #-0x40000000
931
         CMP     R2, #-0x40000000
932
         MOVLT   R2, #-0x40000000
932
         MOVLT   R2, #-0x40000000
933
         AND     R2, R11, R2, LSL#1
933
         AND     R2, R11, R2, LSL#1
935
 
935
 
936
         MOV     R12, R3             @ left sample #4
936
         MOV     R12, R3             @ left sample #4
937
         CMP     R12, #0x40000000
937
         CMP     R12, #0x40000000
938
-        MOVGE   R12, #0x3F800000
938
+        MOVGE   R12, #0x3FC00000
939
         CMP     R12, #-0x40000000
939
         CMP     R12, #-0x40000000
940
         MOVLT   R12, #-0x40000000
940
         MOVLT   R12, #-0x40000000
941
         AND     R12, R11, R12, LSL#1
941
         AND     R12, R11, R12, LSL#1
943
 
943
 
944
         MOV     R3, R3, LSL#16      @ right
944
         MOV     R3, R3, LSL#16      @ right
945
         CMP     R3, #0x40000000
945
         CMP     R3, #0x40000000
946
-        MOVGE   R3, #0x3F800000
946
+        MOVGE   R3, #0x3FC00000
947
         CMP     R3, #-0x40000000
947
         CMP     R3, #-0x40000000
948
         MOVLT   R3, #-0x40000000
948
         MOVLT   R3, #-0x40000000
949
         AND     R3, R11, R3, LSL#1
949
         AND     R3, R11, R3, LSL#1