9 int main(int argc, char **argv)
11 FILE *fp = fopen(argv[1], "rb");
12 fseek(fp, 14, SEEK_SET);
24 cycles = a | (b << 8) | (c << 16);
29 p.start = float(x) * WAVE_FREQ / C64_FREQ;
30 p.end = (float(x) + cycles * 0.5) * WAVE_FREQ / C64_FREQ;
35 vector<float> samples = synth(pulses);
37 for (unsigned i = 0; i < samples.size(); ++i) {
38 //printf("%f %f\n", samples[i], refiltered_samples[i]);
39 short s = lrintf(samples[i] * 16384.0f);
40 fwrite(&s, 2, 1, stdout);