espressif / esp-adf

Espressif Audio Development Framework
Other
1.53k stars 672 forks source link

Remove "/sdcard" hardcoded from FATFS stream URI (AUD-4622) #1006

Closed 0xBERNDOG closed 1 year ago

0xBERNDOG commented 1 year ago

I noticed that FATFS stream forces the URI to begin with /sdcard, which is a bad assumption

In my case, I have mounted an FATFS partition stored on an external SPI flash

This PR is intended to start a discussion for a real fix, but I have verified/tested that this simple fix works too

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

TempoTian commented 1 year ago

Yes, you are right. For fsstream actually use c library to open and read files. It actually supports sdcard, internal flash and other storage type that has been mounted on to the system. It searchs for /sdcard for that esp_audio support urls like: file:///sdcard/*** It is somewhat like android /storage path. We will try to skip scheme header file:// instead of search for sdcard. Thanks for your efforts.

jason-mao commented 1 year ago

Supported by 58a6c3728f89e453daa391448b0799f38a54bdfc