Selaa lähdekoodia

Update wav2sketch.c

dds
Frank 4 vuotta sitten
vanhempi
commit
a412ee8a1b
No account linked to committer's email address
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. +3
    -2
      extras/wav2sketch/wav2sketch.c

+ 3
- 2
extras/wav2sketch/wav2sketch.c Näytä tiedosto

total_length += arraylen; total_length += arraylen;


// output a minimal header, just the length, #bits and sample rate // output a minimal header, just the length, #bits and sample rate
fprintf(outh, "extern const unsigned int AudioSample%s[%d];\n", samplename, arraylen);
fprintf(outh, "extern const unsigned int AudioSample%s[%d];\n", samplename, arraylen);
fprintf(out, "// Converted from %s, using %d Hz, %s encoding\n", filename, rate, fprintf(out, "// Converted from %s, using %d Hz, %s encoding\n", filename, rate,
(pcm_mode ? "16 bit PCM" : "u-law")); (pcm_mode ? "16 bit PCM" : "u-law"));
fprintf(out, "const unsigned int AudioSample%s[%d] = {\n", samplename, arraylen);
fprintf(out, "PROGMEM const unsigned int AudioSample%s[%d] = {\n", samplename, arraylen);
fprintf(out, "0x%08X,", length | (format << 24)); fprintf(out, "0x%08X,", length | (format << 24));
wcount = 1; wcount = 1;


if (outh == NULL) die("unable to write %s\n", buf); if (outh == NULL) die("unable to write %s\n", buf);
fprintf(outh, "%s", title); fprintf(outh, "%s", title);
fprintf(outc, "%s", title); fprintf(outc, "%s", title);
fprintf(outc, "#include <Arduino.h>\n");
fprintf(outc, "#include \"%s\"\n\n", buf); fprintf(outc, "#include \"%s\"\n\n", buf);
wav2c(fp, outc, outh); wav2c(fp, outc, outh);
//wav2c(fp, stdout, stdout); //wav2c(fp, stdout, stdout);

Loading…
Peruuta
Tallenna