Mercurial > hg > dmlib
comparison fptest.c @ 36:f3407a58e01e
Change DMFixedPoint types and appropriate JSS functions back to using signed
integers, easier than trying to get unsigned sizes etc. to work properly in
audio mixing.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 29 Sep 2012 20:41:36 +0300 |
parents | 32250b436bca |
children |
comparison
equal
deleted
inserted
replaced
35:fb5200deeda8 | 36:f3407a58e01e |
---|---|
2 #include <stdio.h> | 2 #include <stdio.h> |
3 | 3 |
4 #define FP_DW_SIZE 8 | 4 #define FP_DW_SIZE 8 |
5 #define FP_W0_SIZE 4 | 5 #define FP_W0_SIZE 4 |
6 | 6 |
7 void check(const char *str, DMFixedPoint v, Uint64 dw) | 7 void check(const char *str, DMFixedPoint v, Sint64 dw) |
8 { | 8 { |
9 DMFixedPoint *q = (DMFixedPoint *) &dw; | 9 DMFixedPoint *q = (DMFixedPoint *) &dw; |
10 | 10 |
11 printf("%-15s = ", str); FP_PRINTF(v); printf("\n"); | 11 printf("%-15s = ", str); FP_PRINTF(v); printf("\n"); |
12 printf("should be = "); FP_PRINTF((*q)); printf("\n"); | 12 printf("should be = "); FP_PRINTF((*q)); printf("\n"); |