Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By reaper7
#69218
earlephilhower wrote:Are you getting any "lost sync at byte XX" warnings?

No, only "MP3 done" at start

earlephilhower wrote:Do you need a leading "/" in the SD libs? You need it for SPIFFS...

Of course I checked this :) SD lib allows to use two forms for root dir, with or without leading "/"
User avatar
By earlephilhower
#69241
reaper7 wrote:
earlephilhower wrote:Are you getting any "lost sync at byte XX" warnings?

No, only "MP3 done" at start

earlephilhower wrote:Do you need a leading "/" in the SD libs? You need it for SPIFFS...

Of course I checked this :) SD lib allows to use two forms for root dir, with or without leading "/"


I just added a SD card class from the documentation. Haven't tried it since don't have one hooked up now, but I think you just need the sD.begin() in setup() before calling it and all should be well. Other than having to manually do the seek_* handling it's almost the same as SPIFFS.

Anyway, it looks like I remembered wrong. There is no output but "MP3 done" about 5 seconds after it starts. So it could very well be playing for 5 seconds. I just uploaded the example and ran and got no output until MP3 done, but when the speaker was connected I did hear the piano playing. It's quite short, only a few seconds.

As a sanity check, have you heard sound from any of the examples (using the ? Anything from PROGMEM just needs a compile/upload, assuming it's using the AudioOutputI2SNoDAC() class (or just change the output class to that from I2SDAC(). That way we can pinpoint if it's the speaker amp or the SD IO code or if I have some other changes in the IDE (I'm running ~GIT head, not 2.3.0, since I'm doing work on HTTPS SSL servers.

One thing I vaguely remember, is that some models (Adafruit comes to mind, but I could be wrong) have a diode on the RX pin such that it can't actually be used as an output...and that's the only I2S output pin available, no changing it. I've got a WeMo D1 (clone?) where the pinout is fine and there is no diode blocking the signal. A peek at the schematics, if available, would confirm or deny this.
User avatar
By reaper7
#69247 problem solved :)
I use wemos sd card shield with CS on gpio15
but this pin is used for I2SO_BCK
(i use AudioOutputI2SNoDAC)

when I change SD CS pin to <> GPIO15 everything is OK !
-------------------

One more info about flac - last commit (with flac support) generates many errors:
Code: Select allIn file included from C:\PROGRAMY\arduino_projekty\libraries\ESP8266Audio\src\libflac\bitmath.c:37:0:

C:\PROGRAMY\arduino_projekty\libraries\ESP8266Audio\src\libflac\private/bitmath.h:38:27: fatal error: FLAC/ordinals.h: No such file or directory

 #include "FLAC/ordinals.h"

                           ^

compilation terminated.


this is the path problem and when I replace inside all files for e.g:
from
Code: Select all#include "FLAC/ordinals.h"

to:
Code: Select all#include "../FLAC/ordinals.h"

all works ok

all files inside "FLAC" dir (except all.h and macros.h)
and two files inside "protected" dir (except all.h)
User avatar
By earlephilhower
#69261 Glad to hear it's working! I'll make a note and update the readme next chance I get.

The FLAC stuff, I was using a symlink that I thought GIT would include. I guess not, so I've cleaned up the paths and removed any symlinks. GIT head should now compile fine for you.