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
538ab8d8
Unverified
Commit
538ab8d8
authored
Apr 08, 2023
by
Wolle
Committed by
GitHub
Apr 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prepare for VORBIS
parent
e65cc2d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
src/Audio.cpp
src/Audio.cpp
+9
-5
No files found.
src/Audio.cpp
View file @
538ab8d8
...
...
@@ -3,8 +3,8 @@
*
* Created on: Oct 26.2018
*
* Version 3.0.1
l
* Updated on: Apr 0
6
.2023
* Version 3.0.1
m
* Updated on: Apr 0
7
.2023
* Author: Wolle (schreibfaul1)
*
*/
...
...
@@ -3598,6 +3598,10 @@ bool Audio:: initializeDecoder(){
InBuff
.
changeMaxBlockSize
(
m_frameSizeOPUS
);
break
;
case
CODEC_VORBIS
:
if
(
!
psramFound
()){
AUDIO_INFO
(
"VORBIS works only with PSRAM!"
);
goto
exit
;
}
if
(
!
VORBISDecoder_AllocateBuffers
()){
AUDIO_INFO
(
"The VORBISDecoder could not be initialized"
);
goto
exit
;
...
...
@@ -3961,7 +3965,7 @@ void Audio::setDecoderItems(){
setBitrate
(
OPUSGetBitRate
());
}
if
(
m_codec
==
CODEC_VORBIS
){
setChannels
(
2
);
setChannels
(
VORBISGetChannels
()
);
setSampleRate
(
VORBISGetSampRate
());
setBitsPerSample
(
VORBISGetBitsPerSample
());
setBitrate
(
VORBISGetBitRate
());
...
...
@@ -5128,11 +5132,11 @@ boolean Audio::streamDetection(uint32_t bytesAvail){
static
uint8_t
cnt_slow
=
0
;
static
uint8_t
cnt_lost
=
0
;
// if within one second the content of the audio buffer falls below the size of an audio frame
5
0 times,
// if within one second the content of the audio buffer falls below the size of an audio frame
10
0 times,
// issue a message
if
(
tmr_slow
+
1000
<
millis
()){
tmr_slow
=
millis
();
if
(
cnt_slow
>
5
0
)
AUDIO_INFO
(
"slow stream, dropouts are possible"
);
if
(
cnt_slow
>
10
0
)
AUDIO_INFO
(
"slow stream, dropouts are possible"
);
cnt_slow
=
0
;
}
if
(
InBuff
.
bufferFilled
()
<
InBuff
.
getMaxBlockSize
())
cnt_slow
++
;
...
...
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