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
9f862f6a
Commit
9f862f6a
authored
Feb 19, 2024
by
schreibfaul1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
m4a coverart blockpicture enabled
parent
79021677
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
5 deletions
+21
-5
additional_info/M4A Coverart Block.jpg
additional_info/M4A Coverart Block.jpg
+0
-0
src/Audio.cpp
src/Audio.cpp
+19
-3
src/Audio.h
src/Audio.h
+2
-2
No files found.
additional_info/M4A Coverart Block.jpg
0 → 100644
View file @
9f862f6a
141 KB
src/Audio.cpp
View file @
9f862f6a
...
...
@@ -3,8 +3,8 @@
*
* Created on: Oct 26.2018
*
* Version 3.0.8
n
* Updated on: Feb 1
7
.2024
* Version 3.0.8
o
* Updated on: Feb 1
9
.2024
* Author: Wolle (schreibfaul1)
*
*/
...
...
@@ -1948,6 +1948,8 @@ int Audio::read_M4A_Header(uint8_t* data, size_t len) {
static
size_t
retvalue
=
0
;
static
size_t
atomsize
=
0
;
static
size_t
audioDataPos
=
0
;
static
uint32_t
picPos
=
0
;
static
uint32_t
picLen
=
0
;
if
(
m_controlCounter
==
M4A_BEGIN
)
retvalue
=
0
;
static
size_t
cnt
=
0
;
...
...
@@ -1973,6 +1975,8 @@ int Audio::read_M4A_Header(uint8_t* data, size_t len) {
retvalue
=
0
;
atomsize
=
0
;
audioDataPos
=
0
;
picPos
=
0
;
picLen
=
0
;
m_controlCounter
=
M4A_FTYP
;
return
0
;
}
...
...
@@ -2168,6 +2172,11 @@ int Audio::read_M4A_Header(uint8_t* data, size_t len) {
}
}
}
offset
=
specialIndexOf
(
data
,
"covr"
,
len
);
if
(
offset
>
0
){
picLen
=
bigEndian
(
data
+
offset
+
4
,
4
)
-
4
;
picPos
=
headerSize
+
offset
+
12
;
}
m_controlCounter
=
M4A_MOOV
;
return
0
;
}
...
...
@@ -2185,6 +2194,13 @@ int Audio::read_M4A_Header(uint8_t* data, size_t len) {
m_audioDataStart
=
headerSize
;
// m_contentlength = headerSize + m_audioDataSize; // after this mdat atom there may be other atoms
if
(
getDatamode
()
==
AUDIO_LOCALFILE
)
{
AUDIO_INFO
(
"Content-Length: %lu"
,
(
long
unsigned
int
)
m_contentlength
);
}
if
(
picLen
)
{
size_t
pos
=
audiofile
.
position
();
audio_id3image
(
audiofile
,
picPos
,
picLen
);
audiofile
.
seek
(
pos
);
// the filepointer could have been changed by the user, set it back
}
m_controlCounter
=
M4A_OKAY
;
// that's all
return
0
;
}
...
...
@@ -3006,7 +3022,7 @@ void Audio::processLocalFile() {
f_stream
=
false
;
f_fileDataComplete
=
false
;
ctime
=
millis
();
if
(
m_codec
==
CODEC_M4A
)
seek_m4a_stsz
();
// determine the pos of atom stsz
//
if(m_codec == CODEC_M4A) seek_m4a_stsz(); // determine the pos of atom stsz
if
(
m_codec
==
CODEC_M4A
)
seek_m4a_ilst
();
// looking for metadata
if
(
m_resumeFilePos
==
0
)
m_resumeFilePos
=
-
1
;
// parkposition
return
;
...
...
src/Audio.h
View file @
9f862f6a
...
...
@@ -3,8 +3,8 @@
*
* Created on: Oct 28,2018
*
* Version 3.0.8
n
* Updated on: Feb 1
7
.2024
* Version 3.0.8
o
* Updated on: Feb 1
9
.2024
* Author: Wolle (schreibfaul1)
*/
...
...
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