25 #define MAX_CHANNELS 32
35 static const uint8_t data_U8 [] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
36 static const int16_t
data_S16[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
37 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};
59 fprintf(stderr,
"%s\n",
str);
68 ? test_sample->
nb_ch : 1;
69 int line_size = (buffers > 1) ? nb_samples * byte_offset
70 : nb_samples * byte_offset * test_sample->
nb_ch;
71 for (p = 0; p < buffers; ++p){
72 for(
b = 0;
b < line_size;
b+=byte_offset){
73 for (
f = 0;
f < byte_offset;
f++){
74 int order = !HAVE_BIGENDIAN ? (byte_offset -
f - 1) :
f;
91 ERROR(
"failed to allocate memory!");
99 ERROR(
"failed to allocate memory!");
106 int nb_samples,
int offset)
133 ERROR(
"ERROR: av_audio_fifo_alloc returned NULL!");
137 ERROR(
"ERROR: av_audio_fifo_write failed!");
143 ERROR(
"ERROR: av_audio_fifo_write failed!");
150 ERROR(
"ERROR: av_audio_fifo_read failed!");
159 ERROR(
"ERROR: av_audio_fifo_peek failed!");
170 ERROR(
"ERROR: av_audio_fifo_peek_at failed!");
180 ERROR(
"ERROR: av_audio_fifo_drain failed!");
183 ERROR(
"drain failed to flush all samples in audio_fifo!");
195 for (t = 0; t <
tests; ++t){
196 printf(
"\nTEST: %d\n\n", t+1);