diff --git a/build/wav2pcm.c b/build/wav2pcm.c index aef7fff7..b2db62d1 100644 --- a/build/wav2pcm.c +++ b/build/wav2pcm.c @@ -155,7 +155,9 @@ int main(int argc, char **argv) { read_u8("sample"); --wav_samples_remaining; } - expect_eof(); + if (num_wav_samples % 2 == 1) { + read_u8("padding"); + } fprintf(stderr, " sample_rate = %d Hz\n", sample_rate); fprintf(stderr, " num_wav_samples = $%04lx (%4d ms)\n", @@ -167,6 +169,8 @@ int main(int argc, char **argv) { fprintf(stderr, " wav_samples_discarded = $%04lx (%4d ms)\n", wav_samples_discarded, (int)(1000 * (double)wav_samples_discarded / (double)sample_rate)); + expect_eof(); + return EXIT_SUCCESS; } diff --git a/src/pcm.asm b/src/pcm.asm index 8bdc1d36..bf5fcd49 100644 --- a/src/pcm.asm +++ b/src/pcm.asm @@ -28,7 +28,7 @@ .EXPORT DataA_Pcm0_Well_arr .PROC DataA_Pcm0_Well_arr : .assert * = $a000, error - .incbin "out/pcm/maybe_this_time.pcm" ; TODO + .incbin "out/pcm/well.pcm" .assert * - :- = $2000, error .ENDPROC @@ -50,7 +50,7 @@ .EXPORT DataA_Pcm2_WillBeDifferent_arr .PROC DataA_Pcm2_WillBeDifferent_arr : .assert * = $a000, error - .incbin "out/pcm/maybe_this_time.pcm" ; TODO + .incbin "out/pcm/will_be_different.pcm" .assert * - :- = $2000, error .ENDPROC diff --git a/src/pcm/maybe_this_time.wav b/src/pcm/maybe_this_time.wav index 4d2c40da..5aab813e 100644 Binary files a/src/pcm/maybe_this_time.wav and b/src/pcm/maybe_this_time.wav differ diff --git a/src/pcm/well.wav b/src/pcm/well.wav new file mode 100644 index 00000000..a9908ef0 Binary files /dev/null and b/src/pcm/well.wav differ diff --git a/src/pcm/will_be_different.wav b/src/pcm/will_be_different.wav new file mode 100644 index 00000000..a4f7ec9a Binary files /dev/null and b/src/pcm/will_be_different.wav differ