Unverified Commit de37de66 authored by Wolle's avatar Wolle Committed by GitHub

Small bugs fixed in processWebstream()

parent 708f6ed7
This diff is collapsed.
......@@ -2,7 +2,7 @@
* Audio.h
*
* Created on: Oct 26,2018
* Updated on: Jul 19,2021
* Updated on: Jul 21,2021
* Author: Wolle (schreibfaul1)
*/
......@@ -216,7 +216,7 @@ private:
void showstreamtitle(const char* ml);
bool parseContentType(const char* ct);
void processAudioHeaderData();
void processControlData(uint8_t b);
void readMetadata(uint8_t b);
esp_err_t I2Sstart(uint8_t i2s_num);
esp_err_t I2Sstop(uint8_t i2s_num);
String urlencode(String str);
......@@ -276,8 +276,8 @@ private:
enum : int { CODEC_NONE, CODEC_WAV, CODEC_MP3, CODEC_AAC, CODEC_M4A, CODEC_FLAC, CODEC_OGG,
CODEC_OGG_FLAC, CODEC_OGG_OPUS};
enum : int { FORMAT_NONE = 0, FORMAT_M3U = 1, FORMAT_PLS = 2, FORMAT_ASX = 3};
enum : int { AUDIO_NONE, AUDIO_HEADER , AUDIO_DATA, AUDIO_METADATA, AUDIO_PLAYLISTINIT,
AUDIO_PLAYLISTHEADER, AUDIO_PLAYLISTDATA, AUDIO_SWM };
enum : int { AUDIO_NONE, AUDIO_HEADER, AUDIO_DATA, AUDIO_METADATA,
AUDIO_PLAYLISTINIT, AUDIO_PLAYLISTHEADER, AUDIO_PLAYLISTDATA};
enum : int { FLAC_BEGIN = 0, FLAC_MAGIC = 1, FLAC_MBH =2, FLAC_SINFO = 3, FLAC_PADDING = 4, FLAC_APP = 5,
FLAC_SEEK = 6, FLAC_VORBIS = 7, FLAC_CUESHEET = 8, FLAC_PICTURE = 9, FLAC_OKAY = 100};
enum : int { M4A_BEGIN = 0, M4A_FTYP = 1, M4A_CHK = 2, M4A_MOOV = 3, M4A_FREE = 4, M4A_TRAK = 5, M4A_MDAT = 6,
......@@ -348,6 +348,7 @@ private:
uint32_t m_contentlength = 0; // Stores the length if the stream comes from fileserver
uint32_t m_bytesNotDecoded = 0; // pictures or something else that comes with the stream
uint32_t m_PlayingStartTime = 0; // Stores the milliseconds after the start of the audio
bool m_f_swm = true; // Stream without metadata
bool m_f_unsync = false; // set within ID3 tag but not used
bool m_f_exthdr = false; // ID3 extended header
bool m_f_localfile = false ; // Play from local mp3-file
......@@ -355,10 +356,8 @@ private:
bool m_f_ssl = false;
bool m_f_running = false;
bool m_f_firstCall = false; // InitSequence for processWebstream and processLokalFile
bool m_f_firststream_ready = false; // Set after connecttohost and first streamdata are available
bool m_f_ctseen = false; // First line of header seen or not
bool m_f_chunked = false ; // Station provides chunked transfer
bool m_f_swm = false;
bool m_f_firstmetabyte = false; // True if first metabyte (counter)
bool m_f_stream = false; // Set false if stream is lost
bool m_f_playing = false; // valid mp3 stream recognized
......
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