droelfdroelf / dtdump

An open Overbridge protocol implementation proof of concept.
MIT License
92 stars 14 forks source link

Centos7.5 issue #1

Closed yoyz closed 5 years ago

yoyz commented 5 years ago

I have upgraded the DT to 1.11 beta6 switched it to overbridge mode. Build the software setting this in top of CMakeLists.txt

set(CMAKE_PREFIX_PATH "/opt/libsndfile-1.0.28/") set(LibSndFile_DIR "/opt/libsndfile-1.0.28/") set(LibUSB_LIBRARIES "/opt/libusb-1.0.22/lib/libusb-1.0.so.0")

And patching save_data() this way :

--- dtdump.c.orig       2019-02-04 12:52:56.004215942 +0100
+++ dtdump.c    2019-02-04 12:53:44.769683899 +0100
@@ -258,10 +258,11 @@
        uint32_t len = sizeof(in_data)/4;
        uint32_t pos = 0;
        uint32_t wav_pos = 0;
+       int i;
        while (pos < len) {
                pos+= 0x08;     // skip header (8 * uint32_t)
                // wav is LE
-               for (int i = 0; i < (12 * 7); i++){
+               for (i = 0; i < (12 * 7); i++){
                        wav_data[wav_pos++] = ntohl(((uint32_t*)in_data)[i + pos]);
                }
                pos+=(12 * 7);

Running dtdump as root. One file is created and I see dtdump is running. But the file is 8,108 bytes long. $ file obdump_20190204-124508.wav obdump_20190204-124508.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 32 bit, 12 channels 48000 Hz

Certainly my centos environment with libusb and libsndfile updated and a wrong cmake...

droelfdroelf commented 5 years ago

The file not getting written or being stuck is maybe due to the wrong routing config in your Digitakt. I added instructions and a picture in the README.md Your patch was needed because declaration of variables inside a for () needs C standard C99, which your compiler does not default to. I'll try to force C99 in the cmake file.

droelfdroelf commented 5 years ago

Fixed in 3dc4053812f98d1f6763df78565c8a7acacec83e