v0.9.337b
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
#include "config.h"
|
||||
#include "telnet.h"
|
||||
#include "display.h"
|
||||
|
||||
#include "sdmanager.h"
|
||||
#include "netserver.h"
|
||||
|
||||
Player player;
|
||||
@@ -13,9 +13,9 @@ QueueHandle_t playerQueue;
|
||||
|
||||
#if VS1053_CS!=255 && !I2S_INTERNAL
|
||||
#if VS_HSPI
|
||||
Player::Player(): Audio(VS1053_CS, VS1053_DCS, VS1053_DREQ, HSPI, 13, 12, 14) {}
|
||||
Player::Player(): Audio(VS1053_CS, VS1053_DCS, VS1053_DREQ, &SPI2) {}
|
||||
#else
|
||||
Player::Player(): Audio(VS1053_CS, VS1053_DCS, VS1053_DREQ) {}
|
||||
Player::Player(): Audio(VS1053_CS, VS1053_DCS, VS1053_DREQ, &SPI) {}
|
||||
#endif
|
||||
void ResetChip(){
|
||||
pinMode(VS1053_RST, OUTPUT);
|
||||
@@ -60,7 +60,6 @@ void Player::init() {
|
||||
_status = STOPPED;
|
||||
//setOutputPins(false);
|
||||
_volTimer=false;
|
||||
playmutex = xSemaphoreCreateMutex();
|
||||
//randomSeed(analogRead(0));
|
||||
#if PLAYER_FORCE_MONO
|
||||
forceMono(true);
|
||||
@@ -114,7 +113,7 @@ void Player::_stop(bool alreadyStopped){
|
||||
|
||||
void Player::initHeaders(const char *file) {
|
||||
if(strlen(file)==0 || true) return; //TODO Read TAGs
|
||||
connecttoFS(SD,file);
|
||||
connecttoFS(sdman,file);
|
||||
eofHeader = false;
|
||||
while(!eofHeader) Audio::loop();
|
||||
//netserver.requestOnChange(SDPOS, 0);
|
||||
@@ -146,16 +145,14 @@ void Player::loop() {
|
||||
}
|
||||
#ifdef USE_SD
|
||||
case PR_CHECKSD: {
|
||||
config.checkSD();
|
||||
sdman.checkSD();
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
xSemaphoreTake(playmutex, portMAX_DELAY);
|
||||
Audio::loop();
|
||||
xSemaphoreGive(playmutex);
|
||||
if(!isRunning() && _status==PLAYING) _stop(true);
|
||||
if(_volTimer){
|
||||
if((millis()-_volTicks)>3000){
|
||||
@@ -199,7 +196,7 @@ void Player::_play(uint16_t stationId) {
|
||||
config.setSmartStart(0);
|
||||
bool isConnected = false;
|
||||
if(config.getMode()==PM_SDCARD && SDC_CS!=255)
|
||||
isConnected=connecttoFS(SD,config.station.url,config.sdResumePos==0?_resumeFilePos:config.sdResumePos-player.sd_min);
|
||||
isConnected=connecttoFS(sdman,config.station.url,config.sdResumePos==0?_resumeFilePos:config.sdResumePos-player.sd_min);
|
||||
else {
|
||||
config.store.play_mode=PM_WEB;
|
||||
config.save();
|
||||
|
||||
Reference in New Issue
Block a user