26 #define MAX_CHANNELS 32
36 static const uint8_t
data_U8 [] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
37 static const int16_t
data_S16[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
38 static const float data_FLT[] = {0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0};
60 fprintf(stderr,
"%s\n",
str);
69 ? test_sample->
nb_ch : 1;
70 int line_size = (buffers > 1) ? nb_samples * byte_offset
71 : nb_samples * byte_offset * test_sample->
nb_ch;
72 for (p = 0; p < buffers; ++p){
73 for(
b = 0;
b < line_size;
b+=byte_offset){
74 for (
f = 0;
f < byte_offset;
f++){
75 int order = !HAVE_BIGENDIAN ? (byte_offset -
f - 1) :
f;
76 printf(
"%02x", *((uint8_t*)data_planes[p] +
b + order));
92 ERROR(
"failed to allocate memory!");
100 ERROR(
"failed to allocate memory!");
107 int nb_samples,
int offset)
121 data_planes[
i] = (uint8_t*)test_sample->
data_planes[
i] + offset_size;
134 ERROR(
"ERROR: av_audio_fifo_alloc returned NULL!");
138 ERROR(
"ERROR: av_audio_fifo_write failed!");
144 ERROR(
"ERROR: av_audio_fifo_write failed!");
151 ERROR(
"ERROR: av_audio_fifo_read failed!");
160 ERROR(
"ERROR: av_audio_fifo_peek failed!");
171 ERROR(
"ERROR: av_audio_fifo_peek_at failed!");
181 ERROR(
"ERROR: av_audio_fifo_drain failed!");
184 ERROR(
"drain failed to flush all samples in audio_fifo!");
196 for (t = 0; t <
tests; ++t){
197 printf(
"\nTEST: %d\n\n", t+1);