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
4e6f1245
Unverified
Commit
4e6f1245
authored
Nov 03, 2021
by
Wolle
Committed by
GitHub
Nov 03, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #220 from FrankBoesing/master
Fix some warnings
parents
85b5c906
0b55e3fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
src/Audio.cpp
src/Audio.cpp
+5
-5
src/flac_decoder/flac_decoder.cpp
src/flac_decoder/flac_decoder.cpp
+2
-2
No files found.
src/Audio.cpp
View file @
4e6f1245
...
...
@@ -1760,7 +1760,7 @@ int Audio::read_M4A_Header(uint8_t *data, size_t len) {
uint8_t
streamType
=
*
(
pos
+
22
);
streamType
=
streamType
>>
2
;
// 6 bits
if
(
streamType
!=
5
)
log_e
(
"Streamtype is not audio!"
);
if
(
streamType
!=
5
)
{
log_e
(
"Streamtype is not audio!"
);
}
uint32_t
maxBr
=
bigEndian
(
pos
+
26
,
4
);
// max bitrate
sprintf
(
chbuf
,
"max bitrate: %i"
,
maxBr
);
if
(
audio_info
)
audio_info
(
chbuf
);
...
...
@@ -1791,7 +1791,7 @@ int Audio::read_M4A_Header(uint8_t *data, size_t len) {
if
(
chConfig
==
0
)
if
(
audio_info
)
audio_info
(
"Channel Configurations: AOT Specifc Config"
);
if
(
chConfig
==
1
)
if
(
audio_info
)
audio_info
(
"Channel Configurations: front-center"
);
if
(
chConfig
==
2
)
if
(
audio_info
)
audio_info
(
"Channel Configurations: front-left, front-right"
);
if
(
chConfig
>
2
)
log_e
(
"Channel Configurations with more than 2 channels is not allowed!"
);
if
(
chConfig
>
2
)
{
log_e
(
"Channel Configurations with more than 2 channels is not allowed!"
);
}
uint8_t
frameLengthFlag
=
(
ASC
&
0x04
);
uint8_t
dependsOnCoreCoder
=
(
ASC
&
0x02
);
...
...
@@ -2794,7 +2794,7 @@ bool Audio::STfromEXTINF(char* str){
// conv: StreamTitle=text=\"Spot Block End\" amgTrackId=\"9876543\" -
if
(
!
startsWith
(
str
,
"#EXTINF"
))
return
false
;
int
t1
,
t2
,
t3
,
n0
,
n1
,
n2
;
int
t1
,
t2
,
t3
,
n0
=
0
,
n1
=
0
,
n2
=
0
;
t1
=
indexOf
(
str
,
"title"
,
0
);
if
(
t1
>
0
){
...
...
@@ -3426,7 +3426,7 @@ bool Audio::readMetadata(uint8_t b, bool first) {
chbuf
[
pos_ml
]
=
(
char
)
b
;
// Put new char in +++++
if
(
pos_ml
<
510
)
pos_ml
++
;
chbuf
[
pos_ml
]
=
0
;
if
(
pos_ml
==
509
)
log_e
(
"metaline overflow in AUDIO_METADATA! metaline=%s"
,
chbuf
)
;
if
(
pos_ml
==
509
)
{
log_e
(
"metaline overflow in AUDIO_METADATA! metaline=%s"
,
chbuf
);
}
if
(
pos_ml
==
510
)
{
;
/* last current char in b */
}
}
...
...
@@ -3842,7 +3842,7 @@ void Audio::compute_audioCurrentTime(int bd) {
}
//---------------------------------------------------------------------------------------------------------------------
void
Audio
::
printDecodeError
(
int
r
)
{
char
*
e
;
char
*
e
=
nullptr
;
if
(
m_codec
==
CODEC_MP3
){
switch
(
r
){
...
...
src/flac_decoder/flac_decoder.cpp
View file @
4e6f1245
...
...
@@ -78,7 +78,7 @@ uint32_t readUint(uint8_t nBits){
uint8_t
temp
=
*
(
m_inptr
+
m_rIndex
);
m_rIndex
++
;
m_bytesAvail
--
;
if
(
m_bytesAvail
<
0
)
log_i
(
"error in bitreader"
);
if
(
m_bytesAvail
<
0
)
{
log_i
(
"error in bitreader"
);
}
m_bitBuffer
=
(
m_bitBuffer
<<
8
)
|
temp
;
m_bitBufferLen
+=
8
;
}
...
...
@@ -347,7 +347,7 @@ int8_t FLACDecode(uint8_t *inbuf, int *bytesLeft, short *outbuf){
if
(
offset
!=
m_blockSize
)
return
GIVE_NEXT_LOOP
;
offset
=
0
;
if
(
offset
>
m_blockSize
)
log_e
(
"offset has a wrong value"
);
if
(
offset
>
m_blockSize
)
{
log_e
(
"offset has a wrong value"
);
}
}
alignToByte
();
...
...
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