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
15624017
Unverified
Commit
15624017
authored
Jan 19, 2024
by
Wolle
Committed by
GitHub
Jan 19, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
detect opus band
parent
3aef9cfb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
src/Audio.cpp
src/Audio.cpp
+13
-3
src/Audio.h
src/Audio.h
+2
-2
No files found.
src/Audio.cpp
View file @
15624017
...
...
@@ -3,8 +3,8 @@
*
* Created on: Oct 26.2018
*
* Version 3.0.8
g
* Updated on: Jan 1
0
.2024
* Version 3.0.8
h
* Updated on: Jan 1
9
.2024
* Author: Wolle (schreibfaul1)
*
*/
...
...
@@ -3536,7 +3536,7 @@ bool Audio::parseHttpResponseHeader() { // this is the response to a GET / reque
continue
;
}
//
log_i("httpResponseHeader: %s", rhl);
log_i
(
"httpResponseHeader: %s"
,
rhl
);
int16_t
posColon
=
indexOf
(
rhl
,
":"
,
0
);
// lowercase all letters up to the colon
if
(
posColon
>=
0
)
{
...
...
@@ -4259,6 +4259,13 @@ int Audio::sendBytes(uint8_t* data, size_t len) {
if
(
m_decodeError
==
ERR_FLAC_BITS_PER_SAMPLE_TOO_BIG
)
stopSong
();
if
(
m_decodeError
==
ERR_FLAC_RESERVED_CHANNEL_ASSIGNMENT
)
stopSong
();
}
if
(
m_codec
==
CODEC_OPUS
)
{
if
(
m_decodeError
==
ERR_OPUS_HYBRID_MODE_UNSUPPORTED
)
stopSong
();
if
(
m_decodeError
==
ERR_OPUS_SILK_MODE_UNSUPPORTED
)
stopSong
();
if
(
m_decodeError
==
ERR_OPUS_NARROW_BAND_UNSUPPORTED
)
stopSong
();
if
(
m_decodeError
==
ERR_OPUS_WIDE_BAND_UNSUPPORTED
)
stopSong
();
if
(
m_decodeError
==
ERR_OPUS_SUPER_WIDE_BAND_UNSUPPORTED
)
stopSong
();
}
}
return
1
;
// skip one byte and seek for the next sync word
}
...
...
@@ -4445,6 +4452,9 @@ void Audio::printDecodeError(int r) {
case
ERR_OPUS_EXTRA_CHANNELS_UNSUPPORTED
:
e
=
"EXTRA CHANNELS UNSUPPORTED"
;
break
;
case
ERR_OPUS_SILK_MODE_UNSUPPORTED
:
e
=
"SILK MODE UNSUPPORTED"
;
break
;
case
ERR_OPUS_HYBRID_MODE_UNSUPPORTED
:
e
=
"HYBRID MODE UNSUPPORTED"
;
break
;
case
ERR_OPUS_NARROW_BAND_UNSUPPORTED
:
e
=
"NARROW_BAND_UNSUPPORTED"
;
break
;
case
ERR_OPUS_WIDE_BAND_UNSUPPORTED
:
e
=
"WIDE_BAND_UNSUPPORTED"
;
break
;
case
ERR_OPUS_SUPER_WIDE_BAND_UNSUPPORTED
:
e
=
"SUPER_WIDE_BAND_UNSUPPORTED"
;
break
;
case
ERR_OPUS_CELT_BAD_ARG
:
e
=
"CELT_DECODER_BAD_ARG"
;
break
;
case
ERR_OPUS_CELT_INTERNAL_ERROR
:
e
=
"CELT DECODER INTERNAL ERROR"
;
break
;
case
ERR_OPUS_CELT_UNIMPLEMENTED
:
e
=
"CELT DECODER UNIMPLEMENTED ARG"
;
break
;
...
...
src/Audio.h
View file @
15624017
...
...
@@ -3,8 +3,8 @@
*
* Created on: Oct 28,2018
*
* Version 3.0.8
g
* Updated on: Jan 1
0
.2024
* Version 3.0.8
h
* Updated on: Jan 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