Recent content by mcleinn

  1. M

    MTP dependency issues w/Teensy 3.6 and SDFat 2.0.4

    IMHO UTF8 in SdFat would be perfectly fine. If this is coming, we can leave the UTF8-UTC2 transfer functions for SdFat as a patch. But MTP needs to convert properly to 16bit (UTC2/UTF16) strings when communicating with the host system, in any case.
  2. M

    MTP dependency issues w/Teensy 3.6 and SDFat 2.0.4

    Please correct me, if I am wrong, but I think C++ and C generally do not have garbage collection. But yes, I am reading that dynamic allocation is considered "bad style" on embedded systems, as they do not have a lot of memory and one can quickly run out of it, if not using it carefully. My...
  3. M

    MTP dependency issues w/Teensy 3.6 and SDFat 2.0.4

    Ok, I implemented it, and I can confirm it works. The directory listing on the host PC now shows Unicode characters correctly. MTP.cpp: void MTPD::writestring(const char* str8) { if (*str8) { ExChar16_t* str16 = UTF8toUCS2(str8); write8(str16len(str16) + 1); for (int...
  4. M

    MTP dependency issues w/Teensy 3.6 and SDFat 2.0.4

    I just checked MTP.cpp, and it seems to me (haven't worked with C or C++ in a while), that the writestring function blows back the 8bit strings into a 16bit string (which I guess is to be expected, MTP being a Microsoft protocol; and they switched to UCS2 internally back in '93) void...
  5. M

    MTP dependency issues w/Teensy 3.6 and SDFat 2.0.4

    Thank you for the offer, Paul! In the last hour, I already implemented the missing eight functions in SdFAT(Core), by calling UTF8<->UCS2 conversion methods. The code compiles. Good, this is a step forward. The MTP device is displayed in the host system. However, Windows only shows the Latin...
  6. M

    MTP dependency issues w/Teensy 3.6 and SDFat 2.0.4

    Ok, I see. Rewriting all the mentioned libraries (at least SD wrapper and MTP-t4) for additional char16_t support seems quite some work. But I am considering writing a small patch for SdFat, which would implement the eight missing char* functions in Unicode mode, so it would at least compile...
  7. M

    MTP dependency issues w/Teensy 3.6 and SDFat 2.0.4

    WMXZ library in storage.h seems to be char* focused, yes. I guess this would need to be changed. At the very least it is not compatible with the Unicode mode of SdFat. In the example, it gets an SDClass from the SD wrapper (in the Teensy libraries), and that also does not seem to support...
  8. M

    MTP dependency issues w/Teensy 3.6 and SDFat 2.0.4

    Ok, the example in MTP_t4 is working, but only if #define USE_EXFAT_UNICODE_NAMES 0 in ExFatConfig.h In this case, the filenames displayed in Windows are displaying all non-American letters as questionmarks. In other words, it looks like Unicode is not yet supported. This is the error when...
  9. M

    MTP dependency issues w/Teensy 3.6 and SDFat 2.0.4

    Great adviсe, thank you. With the beta Teensyduino the code actually compiles :) Serial is working, and there is even an MTP device showing up in Windows. Its contents are empty, but that is probably because I still need to implement something. I will have a closer look at the examples. Thanks...
  10. M

    MTP dependency issues w/Teensy 3.6 and SDFat 2.0.4

    Dear community, I'm successfully using a Teensy 3.6 as a Unicode-compatible native MP3 player, and would now like to add MTP. However, I am running into several dependency issues. There seem to be two libraries: MTP and MTP-t4. Despite its name, MTP-t4 says it supports Teensy 3.x - and I would...
  11. M

    General guidance needed on MP3 (22.05kHz & MTP)

    Thanks for the quick reply! In other words, as long as I don't copy files while I'm playing them, I should be fine? The project is a player for my baby daughter, so that wouldn't be a big problem. I'll think about batch conversion, just wanted to keep the effort for adding new files minimal...
  12. M

    General guidance needed on MP3 (22.05kHz & MTP)

    Dear community, looking for general guidance on MP3 with Teensy 3.6. I am planning to put several GBs of MP3 on the SD-card. Most are audio books, some of them with sample rates of 22.05kHz. At the moment I am playing MP3s natively via the Adafruit MP3 library - but 22.05kHz MP3s are not...
Back
Top