Unverified Commit 47a1d62e authored by Wolle's avatar Wolle Committed by GitHub

add stopSong() if local file is interrupted and typo correction

parent 3a3a8b72
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* *
* Created on: Oct 26.2018 * Created on: Oct 26.2018
* *
* Version 2.0.7j * Version 2.0.7k
* Updated on: Jan 06.2023 * Updated on: Jan 08.2023
* Author: Wolle (schreibfaul1) * Author: Wolle (schreibfaul1)
* *
*/ */
...@@ -301,6 +301,7 @@ Audio::~Audio() { ...@@ -301,6 +301,7 @@ Audio::~Audio() {
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void Audio::setDefaults() { void Audio::setDefaults() {
stopSong();
initInBuff(); // initialize InputBuffer if not already done initInBuff(); // initialize InputBuffer if not already done
InBuff.resetBuffer(); InBuff.resetBuffer();
MP3Decoder_FreeBuffers(); MP3Decoder_FreeBuffers();
...@@ -3799,7 +3800,7 @@ int Audio::sendBytes(uint8_t* data, size_t len) { ...@@ -3799,7 +3800,7 @@ int Audio::sendBytes(uint8_t* data, size_t len) {
} }
if(m_codec == CODEC_FLAC){ if(m_codec == CODEC_FLAC){
m_validSamples = FLACGetOutputSamps() / getChannels(); m_validSamples = FLACGetOutputSamps() / getChannels();
char* st = FLACgetStreanTitle(); char* st = FLACgetStreamTitle();
if(st){ if(st){
AUDIO_INFO(st); AUDIO_INFO(st);
if(audio_showstreamtitle) audio_showstreamtitle(st); if(audio_showstreamtitle) audio_showstreamtitle(st);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Audio.h * Audio.h
* *
* Created on: Oct 28,2018 * Created on: Oct 28,2018
* Updated on: Jan 06,2023 * Updated on: Jan 08,2023
* Author: Wolle (schreibfaul1) * Author: Wolle (schreibfaul1)
*/ */
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* adapted to ESP32 * adapted to ESP32
* *
* Created on: Jul 03,2020 * Created on: Jul 03,2020
* Updated on: Nov 25,2022 * Updated on: Jan 08,2023
* *
* Author: Wolle * Author: Wolle
* *
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* flac_decoder.h * flac_decoder.h
* *
* Created on: Jul 03,2020 * Created on: Jul 03,2020
* Updated on: Nov 26,2022 * Updated on: Jan 08,2023
* *
* Author: wolle * Author: wolle
* *
...@@ -145,7 +145,7 @@ typedef struct FLACFrameHeader_t { ...@@ -145,7 +145,7 @@ typedef struct FLACFrameHeader_t {
int FLACFindSyncWord(unsigned char *buf, int nBytes); int FLACFindSyncWord(unsigned char *buf, int nBytes);
boolean FLACFindMagicWord(unsigned char* buf, int nBytes); boolean FLACFindMagicWord(unsigned char* buf, int nBytes);
boolean FLACFindStreamTitle(unsigned char* buf, int nBytes); boolean FLACFindStreamTitle(unsigned char* buf, int nBytes);
char* FLACgetStreanTitle(); char* FLACgetStreamTitle();
int FLACparseOggHeader(unsigned char *buf); int FLACparseOggHeader(unsigned char *buf);
bool FLACDecoder_AllocateBuffers(void); bool FLACDecoder_AllocateBuffers(void);
void FLACDecoder_ClearBuffer(); void FLACDecoder_ClearBuffer();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment