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
8d62cd85
Unverified
Commit
8d62cd85
authored
Jan 22, 2022
by
Wolle
Committed by
GitHub
Jan 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do not remember streamtitle after connecttohost()
parent
cbb40fa9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
src/Audio.cpp
src/Audio.cpp
+7
-7
src/Audio.h
src/Audio.h
+3
-2
No files found.
src/Audio.cpp
View file @
8d62cd85
...
...
@@ -2,7 +2,7 @@
* Audio.cpp
*
* Created on: Oct 26,2018
* Updated on: Jan 2
0
,2022
* Updated on: Jan 2
2
,2022
* Author: Wolle (schreibfaul1)
*
*/
...
...
@@ -315,9 +315,10 @@ void Audio::setDefaults() {
m_curSample
=
0
;
m_metaint
=
0
;
// No metaint yet
m_LFcount
=
0
;
// For end of header detection
m_st_remember
=
0
;
// Delete the last streamtitle hash
m_controlCounter
=
0
;
// Status within readID3data() and readWaveHeader()
m_channels
=
2
;
// assume stereo #209
m_streamTitleHash
=
0
;
m_streamUrlHash
=
0
;
//TEST loop
m_file_size
=
0
;
...
...
@@ -3463,7 +3464,6 @@ void Audio::showstreamtitle(const char* ml) {
int16_t
idx1
,
idx2
;
uint16_t
i
=
0
,
hash
=
0
;
static
uint16_t
sTit_remember
=
0
,
sUrl_renember
=
0
;
idx1
=
indexOf
(
ml
,
"StreamTitle="
,
0
);
if
(
idx1
>=
0
){
// Streamtitle found
...
...
@@ -3474,8 +3474,8 @@ void Audio::showstreamtitle(const char* ml) {
while
(
i
<
strlen
(
sTit
)){
hash
+=
sTit
[
i
]
*
i
+
1
;
i
++
;}
if
(
sTit_remember
!=
hash
){
sTit_remember
=
hash
;
if
(
m_streamTitleHash
!=
hash
){
m_streamTitleHash
=
hash
;
if
(
audio_info
)
audio_info
(
sTit
);
uint8_t
pos
=
12
;
// remove "StreamTitle="
if
(
sTit
[
pos
]
==
'\''
)
pos
++
;
// remove leading \'
...
...
@@ -3493,8 +3493,8 @@ void Audio::showstreamtitle(const char* ml) {
sUrl
=
strndup
(
ml
+
idx1
,
len
+
1
);
sUrl
[
len
]
=
'\0'
;
while
(
i
<
strlen
(
sUrl
)){
hash
+=
sUrl
[
i
]
*
i
+
1
;
i
++
;}
if
(
sUrl_renember
!=
hash
){
sUrl_renember
=
hash
;
if
(
m_streamTitleHash
!=
hash
){
m_streamTitleHash
=
hash
;
if
(
audio_info
)
audio_info
(
sUrl
);
}
free
(
sUrl
);
...
...
src/Audio.h
View file @
8d62cd85
...
...
@@ -2,7 +2,7 @@
* Audio.h
*
* Created on: Oct 26,2018
* Updated on: Jan
19
,2022
* Updated on: Jan
22
,2022
* Author: Wolle (schreibfaul1)
*/
...
...
@@ -423,8 +423,9 @@ private:
int16_t
m_outBuff
[
2048
*
2
];
// Interleaved L/R
int16_t
m_validSamples
=
0
;
int16_t
m_curSample
=
0
;
uint16_t
m_st_remember
=
0
;
// Save hash from the last streamtitle
uint16_t
m_datamode
=
0
;
// Statemaschine
uint16_t
m_streamTitleHash
=
0
;
// remember streamtitle, ignore multiple occurence in metadata
uint16_t
m_streamUrlHash
=
0
;
// remember streamURL, ignore multiple occurence in metadata
uint8_t
m_flacBitsPerSample
=
0
;
// bps should be 16
uint8_t
m_flacNumChannels
=
0
;
// can be read out in the FLAC file header
uint32_t
m_flacSampleRate
=
0
;
// can be read out in the FLAC file header
...
...
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