chiark
/
gitweb
/
~mdw
/
disorder
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
0024bde
)
More resampler tests
author
Richard Kettlewell
<rjk@greenend.org.uk>
Thu, 19 Nov 2009 20:13:32 +0000
(20:13 +0000)
committer
Richard Kettlewell
<rjk@greenend.org.uk>
Thu, 19 Nov 2009 20:13:32 +0000
(20:13 +0000)
libtests/t-resample.c
patch
|
blob
|
blame
|
history
diff --git
a/libtests/t-resample.c
b/libtests/t-resample.c
index 1dbdf8b999aff56b77a579b0556058670dd6b26c..14e23197358d45721e35008a629849de28da8ef2 100644
(file)
--- a/
libtests/t-resample.c
+++ b/
libtests/t-resample.c
@@
-52,10
+52,22
@@
static const uint8_t simple_bytes_u[] = {
0, 127, 128, 255,
};
0, 127, 128, 255,
};
+static const uint8_t simple_bytes_u2[] = {
+ 0, 0, 127, 127, 128, 128, 255, 255,
+};
+
static const uint8_t simple_bytes_s[] = {
-128, -1, 0, 127,
};
static const uint8_t simple_bytes_s[] = {
-128, -1, 0, 127,
};
+static const uint8_t simple_words_u_le[] = {
+ 0, 1, 0, 255, 1, 0, 1, 255
+};
+
+static const uint8_t simple_words_u_be[] = {
+ 1, 0, 255, 0, 0, 1, 255, 1
+};
+
static const struct {
const char *description;
int input_bits;
static const struct {
const char *description;
int input_bits;
@@
-84,6
+96,16
@@
static const struct {
8, 1, 8000, 0, ENDIAN_LITTLE, simple_bytes_u, 4,
8, 1, 8000, 1, ENDIAN_LITTLE, simple_bytes_s, 4
},
8, 1, 8000, 0, ENDIAN_LITTLE, simple_bytes_u, 4,
8, 1, 8000, 1, ENDIAN_LITTLE, simple_bytes_s, 4
},
+ {
+ "mono to stereo",
+ 8, 1, 8000, 0, ENDIAN_LITTLE, simple_bytes_u, 4,
+ 8, 2, 8000, 0, ENDIAN_LITTLE, simple_bytes_u2, 8
+ },
+ {
+ "endian flip",
+ 16, 1, 8000, 0, ENDIAN_LITTLE, simple_words_u_le, 8,
+ 16, 1, 8000, 0, ENDIAN_BIG, simple_words_u_be, 8,
+ },
#if HAVE_SAMPLERATE_H
/* Conversions that do change the sample rate */
#if HAVE_SAMPLERATE_H
/* Conversions that do change the sample rate */