MikeWang000000/spek-X

Tests fail

Closed this issue · 1 comments

Tests using make check fail to compile:

test-audio.cc: In function 'void test_read(AudioFile*, int)':
test-audio.cc:35:28: error: no matching function for call to 'AudioFile::start(int, int)'
   35 |         file->start(0, 1024);
      |                            ^
In file included from test-audio.cc:3:
../src/spek-audio.h:24:18: note: candidate: 'virtual void AudioFile::start(int)'
   24 |     virtual void start(int samples) = 0;
      |                  ^~~~~
../src/spek-audio.h:24:18: note:   candidate expects 1 argument, 2 provided

Parameters seem to have changed in 148e82a

When I change file->start(0, 1024) to file->start(1024) in tests/test-audio.cc it compiles but then 19/480 tests are failing:

-------------
audio info: 1ch-96000Hz-24bps.ape
audio read: 1ch-96000Hz-24bps.ape
FAIL: samples, expected: 9600, actual: 4608
audio info: 1ch-96000Hz-24bps.flac
audio read: 1ch-96000Hz-24bps.flac
audio info: 1ch-96000Hz-24bps.wv
audio read: 1ch-96000Hz-24bps.wv
[mp3 @ 0x55a4f2eab280] Format mp3 detected only with low score of 25, misdetection possible!
audio info: 2ch-44100Hz-128cbr.mp3
audio read: 2ch-44100Hz-128cbr.mp3
[mp3float @ 0x55a4f2ece300] Could not update timestamps for skipped samples.
[mp3float @ 0x55a4f2ece300] Could not update timestamps for discarded samples.
FAIL: samples, expected: 4410, actual: 8820
audio info: 2ch-44100Hz-16bps.m4a
audio read: 2ch-44100Hz-16bps.m4a
FAIL: samples, expected: 4410, actual: 8820
audio info: 2ch-44100Hz-16bps.wav
audio read: 2ch-44100Hz-16bps.wav
FAIL: samples, expected: 4410, actual: 8820
[mp3 @ 0x55a4f2efb740] Format mp3 detected only with low score of 25, misdetection possible!
audio info: 2ch-44100Hz-320cbr.mp3
audio read: 2ch-44100Hz-320cbr.mp3
[mp3float @ 0x55a4f2f1c200] Could not update timestamps for skipped samples.
[mp3float @ 0x55a4f2f1c200] Could not update timestamps for discarded samples.
FAIL: samples, expected: 4410, actual: 8820
[mp3 @ 0x55a4f2efb740] Format mp3 detected only with low score of 25, misdetection possible!
audio info: 2ch-44100Hz-V0.mp3
audio read: 2ch-44100Hz-V0.mp3
[mp3float @ 0x55a4f2f30fc0] Could not update timestamps for skipped samples.
[mp3float @ 0x55a4f2f30fc0] Could not update timestamps for discarded samples.
FAIL: samples, expected: 4410, actual: 8820
[mp3 @ 0x55a4f2efb740] Format mp3 detected only with low score of 25, misdetection possible!
audio info: 2ch-44100Hz-V2.mp3
audio read: 2ch-44100Hz-V2.mp3
[mp3float @ 0x55a4f2f3ec40] Could not update timestamps for skipped samples.
[mp3float @ 0x55a4f2f3ec40] Could not update timestamps for discarded samples.
FAIL: samples, expected: 4410, actual: 8820
audio info: 2ch-44100Hz-q100.m4a
audio read: 2ch-44100Hz-q100.m4a
FAIL: samples, expected: 5120, actual: 0
FAIL: power, expected: 0, actual: -nan
audio info: 2ch-44100Hz-q5.ogg
audio read: 2ch-44100Hz-q5.ogg
FAIL: samples, expected: 4672, actual: 0
FAIL: power, expected: 0, actual: -nan
[mpc8 @ 0x55a4f2f3fc40] Multiple frames in a packet.
audio info: 2ch-44100Hz-std.mpc
audio read: 2ch-44100Hz-std.mpc
[mpc8 @ 0x55a4f2f5c0c0] Multiple frames in a packet.
FAIL: samples, expected: 6912, actual: 2304
audio info: 2ch-44100Hz-v1.wma
audio read: 2ch-44100Hz-v1.wma
FAIL: samples, expected: 6144, actual: 12288
audio info: 2ch-44100Hz-v2.wma
audio read: 2ch-44100Hz-v2.wma
FAIL: samples, expected: 6144, actual: 12288
[ac3 @ 0x55a4f2efb740] Format ac3 detected only with low score of 1, misdetection possible!
[ac3 @ 0x55a4f2efb740] Estimating duration from bitrate, this may be inaccurate
audio info: 2ch-44100Hz.ac3
audio read: 2ch-44100Hz.ac3
FAIL: samples, expected: 4608, actual: 9216
[dts @ 0x55a4f2efb740] Estimating duration from bitrate, this may be inaccurate
audio info: 2ch-44100Hz.dts
audio read: 2ch-44100Hz.dts
FAIL: samples, expected: 5120, actual: 10240
audio info: 2ch-48000Hz-16bps.ape
audio read: 2ch-48000Hz-16bps.ape
FAIL: samples, expected: 4800, actual: 9216
audio info: 2ch-48000Hz-16bps.flac
audio read: 2ch-48000Hz-16bps.flac
FAIL: samples, expected: 4800, actual: 9600
audio info: 2ch-48000Hz-16bps.wv
audio read: 2ch-48000Hz-16bps.wv
FAIL: samples, expected: 4800, actual: 9600
audio info: no.file
audio read: no.file
fft const
fft sine
vercmp
19/480 tests failed
FAIL: test
PASS: perf
===================
1 of 2 tests failed
===================