瀏覽代碼

Merge pull request #370 from FrankBoesing/master

wav2sketch - Update for T4.x
dds
Paul Stoffregen 4 年之前
父節點
當前提交
61b7c3ecce
沒有連結到貢獻者的電子郵件帳戶。
共有 2 個檔案被更改,包括 3 行新增2 行删除
  1. +3
    -2
      extras/wav2sketch/wav2sketch.c
  2. 二進制
      extras/wav2sketch/wav2sketch.exe

+ 3
- 2
extras/wav2sketch/wav2sketch.c 查看文件

@@ -139,10 +139,10 @@ void wav2c(FILE *in, FILE *out, FILE *outh)
total_length += arraylen;

// 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,
(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));
wcount = 1;

@@ -291,6 +291,7 @@ int main(int argc, char **argv)
if (outh == NULL) die("unable to write %s\n", buf);
fprintf(outh, "%s", title);
fprintf(outc, "%s", title);
fprintf(outc, "#include <Arduino.h>\n");
fprintf(outc, "#include \"%s\"\n\n", buf);
wav2c(fp, outc, outh);
//wav2c(fp, stdout, stdout);

二進制
extras/wav2sketch/wav2sketch.exe 查看文件


Loading…
取消
儲存