Browse Source

Enabled flac and updated english webgui

master
Torsten Stauder 4 years ago
parent
commit
58cecb4513
  1. 1
      README.md
  2. 2
      html/management.html
  3. 771
      html/management_EN.html
  4. 8
      src/main.cpp

1
README.md

@ -12,7 +12,6 @@ Last three events:
* 30.03.2021: Added support for stereo/mono via `PLAY_MONO_SPEAKER`. If active, mono is used while headphones remain stereo (if `HEADPHONE_ADJUST_ENABLE` is active). * 30.03.2021: Added support for stereo/mono via `PLAY_MONO_SPEAKER`. If active, mono is used while headphones remain stereo (if `HEADPHONE_ADJUST_ENABLE` is active).
## Known bugs ## Known bugs
* Some webstreams don't run. Guess it's a combination of saturated connection-pool and lack of heap-memory. Works probably better if ESP32-WROVER (e.g. Lolin D32 pro) is used, as this chip has PSRAM. Advice: Don't enable modules (e.g. MQTT) if you don't need them as this could save memory (and trouble). * Some webstreams don't run. Guess it's a combination of saturated connection-pool and lack of heap-memory. Works probably better if ESP32-WROVER (e.g. Lolin D32 pro) is used, as this chip has PSRAM. Advice: Don't enable modules (e.g. MQTT) if you don't need them as this could save memory (and trouble).
* English translation/version for webgui is currently pretty outdated. This will be fixed soon when i18n-support will be integrated.
## ESPuino - what's that? ## ESPuino - what's that?
The basic idea of ESPuino is to provide a way, to use the Arduino-platform for a music-control-concept that supports locally stored music-files without DRM-restrictions. This basically means that RFID-tags are used to direct a music-player. Even for kids this concept is simple: place an RFID-object (card, character) on top of a box and the music starts to play. Place another RFID-object on it and anything else is played. Simple as that. The basic idea of ESPuino is to provide a way, to use the Arduino-platform for a music-control-concept that supports locally stored music-files without DRM-restrictions. This basically means that RFID-tags are used to direct a music-player. Even for kids this concept is simple: place an RFID-object (card, character) on top of a box and the music starts to play. Place another RFID-object on it and anything else is played. Simple as that.

2
html/management.html

@ -527,7 +527,7 @@
var lastFolder = cur['id'].split('/').filter(function (el) { var lastFolder = cur['id'].split('/').filter(function (el) {
return el.trim().length > 0; return el.trim().length > 0;
}).pop(); }).pop();
if ((/\.(mp3|MP3|ogg|wav|WAV|OGG|wma|WMA|acc|ACC|flac|FLAC|.m4a|.M4A)$/i).test(lastFolder)) {
if ((/\.(mp3|MP3|ogg|wav|WAV|OGG|wma|WMA|acc|ACC|flac|FLAC|m4a|M4A)$/i).test(lastFolder)) {
data.instance.set_type(data.instance._model.data[key], 'audio'); data.instance.set_type(data.instance._model.data[key], 'audio');
} else { } else {
if (data.instance._model.data[key]['type'] == "file") { if (data.instance._model.data[key]['type'] == "file") {

771
html/management_EN.html
File diff suppressed because it is too large
View File

8
src/main.cpp

@ -1212,6 +1212,7 @@ bool fileValid(const char *_fileItem) {
endsWith(_fileItem, ".m3u") || endsWith(_fileItem, ".M3U") || endsWith(_fileItem, ".m3u") || endsWith(_fileItem, ".M3U") ||
endsWith(_fileItem, ".m4a") || endsWith(_fileItem, ".M4A") || endsWith(_fileItem, ".m4a") || endsWith(_fileItem, ".M4A") ||
endsWith(_fileItem, ".wav") || endsWith(_fileItem, ".WAV") || endsWith(_fileItem, ".wav") || endsWith(_fileItem, ".WAV") ||
endsWith(_fileItem, ".flac") || endsWith(_fileItem, ".FLAC") ||
endsWith(_fileItem, ".asx") || endsWith(_fileItem, ".ASX")); endsWith(_fileItem, ".asx") || endsWith(_fileItem, ".ASX"));
} }
@ -1478,7 +1479,7 @@ void playAudio(void *parameter) {
// If we're in audiobook-mode and apply a modification-card, we don't // If we're in audiobook-mode and apply a modification-card, we don't
// want to save lastPlayPosition for the mod-card but for the card that holds the playlist // want to save lastPlayPosition for the mod-card but for the card that holds the playlist
if(currentRfidTagId != NULL){
if (currentRfidTagId != NULL) {
strncpy(playProperties.playRfidTag, currentRfidTagId, sizeof(playProperties.playRfidTag) / sizeof(playProperties.playRfidTag[0])); strncpy(playProperties.playRfidTag, currentRfidTagId, sizeof(playProperties.playRfidTag) / sizeof(playProperties.playRfidTag[0]));
} }
@ -1847,6 +1848,11 @@ void playAudio(void *parameter) {
} }
#endif #endif
// If error occured: remove playlist from ESPuino
if ((playProperties.playMode != NO_PLAYLIST) && !audio.isRunning()) {
playProperties.trackFinished = true;
}
audio.loop(); audio.loop();
if (playProperties.playlistFinished || playProperties.pausePlay) { if (playProperties.playlistFinished || playProperties.pausePlay) {
vTaskDelay(portTICK_PERIOD_MS*10); // Waste some time if playlist is not active vTaskDelay(portTICK_PERIOD_MS*10); // Waste some time if playlist is not active

Loading…
Cancel
Save