Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ESP32-audioI2S
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
ESP32-audioI2S
Commits
de37de66
Unverified
Commit
de37de66
authored
Jul 21, 2021
by
Wolle
Committed by
GitHub
Jul 21, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small bugs fixed in processWebstream()
parent
708f6ed7
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
111 additions
and
142 deletions
+111
-142
src/Audio.cpp
src/Audio.cpp
+106
-136
src/Audio.h
src/Audio.h
+5
-6
No files found.
src/Audio.cpp
View file @
de37de66
This diff is collapsed.
Click to expand it.
src/Audio.h
View file @
de37de66
...
...
@@ -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
processControlD
ata
(
uint8_t
b
);
void
readMetad
ata
(
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_PLAYLIST
HEADER
,
AUDIO_PLAYLISTDATA
,
AUDIO_SWM
};
enum
:
int
{
AUDIO_NONE
,
AUDIO_HEADER
,
AUDIO_DATA
,
AUDIO_METADATA
,
AUDIO_PLAYLIST
INIT
,
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment