This commit is contained in:
e2002
2023-02-24 17:15:17 +03:00
parent 6bef9ca9d7
commit a43d639467
12 changed files with 56 additions and 48 deletions

View File

@@ -853,7 +853,7 @@ void Audio::processWebStream(){
if(psramFound()) if(bytesCanBeWritten > 4096) bytesCanBeWritten = 4096; // PSRAM throttle
if(m_f_webfile){
if(m_streamType == ST_WEBFILE){
// normally there is nothing to do here, if byteCounter == contentLength
// then the file is completely read, but:
// m4a files can have more data (e.g. pictures ..) after the audio Block
@@ -864,7 +864,7 @@ void Audio::processWebStream(){
bytesAddedToBuffer = _client->read(InBuff.getWritePtr(), bytesCanBeWritten);
if(bytesAddedToBuffer > 0) {
if(m_f_webfile) byteCounter += bytesAddedToBuffer; // Pull request #42
if(m_streamType == ST_WEBFILE) byteCounter += bytesAddedToBuffer; // Pull request #42
if(!m_f_swm) metacount -= bytesAddedToBuffer;
if(m_f_chunked) m_chunkcount -= bytesAddedToBuffer;
InBuff.bytesWritten(bytesAddedToBuffer);
@@ -881,7 +881,7 @@ void Audio::processWebStream(){
}
// // if we have a webfile, read the file header first - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if(m_f_webfile && m_controlCounter != 100){
if(m_streamType == ST_WEBFILE && m_controlCounter != 100){
if(InBuff.bufferFilled() < maxFrameSize) return;
if(m_codec == CODEC_WAV){
m_controlCounter = 100;
@@ -912,7 +912,7 @@ void Audio::processWebStream(){
}
// have we reached the end of the webfile? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if(m_f_webfile && byteCounter == m_contentlength){
if(m_streamType == ST_WEBFILE && byteCounter == m_contentlength){
while(InBuff.bufferFilled() > 0){
if(InBuff.bufferFilled() == 128){ // post tag?
if(indexOf((const char*)InBuff.getReadPtr(), "TAG", 0) == 0){

View File

@@ -1,8 +1,9 @@
#ifndef mqtt_h
#define mqtt_h
#if __has_include("../../mqttoptions.h")
#include "../../mqttoptions.h"
#include "options.h"
#ifdef MQTT_ROOT_TOPIC
//#if __has_include("../../mqttoptions.h")
//#include "../../mqttoptions.h"
#include "../async-mqtt-client/AsyncMqttClient.h"
@@ -15,7 +16,7 @@ void mqttPublishStatus();
void mqttPublishPlaylist();
void mqttPublishVolume();
#endif // if __has_include("mqttoptions.h")
#endif // #ifdef MQTT_ROOT_TOPIC
#endif

View File

@@ -1,7 +1,7 @@
#ifndef options_h
#define options_h
#define YOVERSION "0.8.950"
#define YOVERSION "0.8.962"
/*******************************************************
DO NOT EDIT THIS FILE.
@@ -15,7 +15,9 @@ STORE YOUR SETTINGS IN THE *** myoptions.h *** FILE.
#if __has_include("../../mytheme.h")
#include "../../mytheme.h" /* <- Theme file */
#endif
#if __has_include("../../mqttoptions.h")
#include "../../mqttoptions.h"
#endif
/*******************************************************
The connection tables are located here https://github.com/e2002/yoradio#connection-tables

View File

@@ -181,7 +181,7 @@ void Player::browseUrl(){
config.setDspOn(1);
resumeAfterUrl = mode==PLAYING;
display.putRequest(PSTOP);
setDefaults();
// setDefaults();
setOutputPins(false);
config.setTitle(const_PlConnect);
netserver.requestOnChange(TITLE, 0);