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
3033dfe1
Commit
3033dfe1
authored
Feb 02, 2024
by
schreibfaul1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More Vorbis files that won't play #650
parent
072745e3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
14 deletions
+18
-14
src/Audio.cpp
src/Audio.cpp
+15
-11
src/Audio.h
src/Audio.h
+2
-2
src/vorbis_decoder/vorbis_decoder.cpp
src/vorbis_decoder/vorbis_decoder.cpp
+1
-1
No files found.
src/Audio.cpp
View file @
3033dfe1
...
...
@@ -3,8 +3,8 @@
*
* Created on: Oct 26.2018
*
* Version 3.0.8
i
* Updated on:
Jan 23
.2024
* Version 3.0.8
j
* Updated on:
Feb 02
.2024
* Author: Wolle (schreibfaul1)
*
*/
...
...
@@ -4267,6 +4267,7 @@ int Audio::sendBytes(uint8_t* data, size_t len) {
return
1
;
}
// status: bytesDecoded > 0 and m_decodeError >= 0
char
*
st
=
NULL
;
switch
(
m_codec
)
{
case
CODEC_WAV
:
memmove
(
m_outBuff
,
data
,
len
);
// copy len data in outbuff and set validsamples and bytesdecoded=len
if
(
getBitsPerSample
()
==
16
)
m_validSamples
=
len
/
(
2
*
getChannels
());
...
...
@@ -4280,23 +4281,26 @@ int Audio::sendBytes(uint8_t* data, size_t len) {
break
;
case
CODEC_FLAC
:
if
(
m_decodeError
==
FLAC_PARSE_OGG_DONE
)
return
bytesDecoded
;
// nothing to play
m_validSamples
=
FLACGetOutputSamps
()
/
getChannels
();
if
(
FLACgetStreamTitle
())
{
AUDIO_INFO
(
FLACgetStreamTitle
());
if
(
audio_showstreamtitle
)
audio_showstreamtitle
(
FLACgetStreamTitle
());
st
=
FLACgetStreamTitle
();
if
(
st
)
{
AUDIO_INFO
(
st
);
if
(
audio_showstreamtitle
)
audio_showstreamtitle
(
st
);
}
break
;
case
CODEC_OPUS
:
if
(
m_decodeError
==
OPUS_PARSE_OGG_DONE
)
return
bytesDecoded
;
// nothing to play
m_validSamples
=
OPUSGetOutputSamps
();
if
(
OPUSgetStreamTitle
())
{
AUDIO_INFO
(
OPUSgetStreamTitle
());
if
(
audio_showstreamtitle
)
audio_showstreamtitle
(
OPUSgetStreamTitle
());
st
=
OPUSgetStreamTitle
();
if
(
st
){
AUDIO_INFO
(
st
);
if
(
audio_showstreamtitle
)
audio_showstreamtitle
(
st
);
}
break
;
case
CODEC_VORBIS
:
if
(
m_decodeError
==
VORBIS_PARSE_OGG_DONE
)
return
bytesDecoded
;
// nothing to play
m_validSamples
=
VORBISGetOutputSamps
();
if
(
VORBISgetStreamTitle
())
{
AUDIO_INFO
(
VORBISgetStreamTitle
());
if
(
audio_showstreamtitle
)
audio_showstreamtitle
(
VORBISgetStreamTitle
());
st
=
VORBISgetStreamTitle
();
if
(
st
)
{
AUDIO_INFO
(
st
);
if
(
audio_showstreamtitle
)
audio_showstreamtitle
(
st
);
}
break
;
}
...
...
src/Audio.h
View file @
3033dfe1
...
...
@@ -3,8 +3,8 @@
*
* Created on: Oct 28,2018
*
* Version 3.0.8
i
* Updated on:
Jan 23
.2024
* Version 3.0.8
j
* Updated on:
Feb 02
.2024
* Author: Wolle (schreibfaul1)
*/
...
...
src/vorbis_decoder/vorbis_decoder.cpp
View file @
3033dfe1
...
...
@@ -617,7 +617,7 @@ int VORBISparseOGG(uint8_t *inbuf, int *bytesLeft){
s_f_vorbisParseOgg
=
false
;
int
ret
=
0
;
(
void
)
ret
;
int
idx
=
VORBIS_specialIndexOf
(
inbuf
,
"OggS"
,
1024
);
int
idx
=
VORBIS_specialIndexOf
(
inbuf
,
"OggS"
,
8192
);
if
(
idx
!=
0
){
if
(
s_f_oggContinuedPage
)
return
ERR_VORBIS_DECODER_ASYNC
;
inbuf
+=
idx
;
...
...
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