Skip to content

Commit

Permalink
Add first draft of PCM recordings
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsteele committed Sep 14, 2024
1 parent 9e9a80c commit a3e258e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion build/wav2pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions src/pcm.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down
Binary file modified src/pcm/maybe_this_time.wav
Binary file not shown.
Binary file added src/pcm/well.wav
Binary file not shown.
Binary file added src/pcm/will_be_different.wav
Binary file not shown.

0 comments on commit a3e258e

Please sign in to comment.