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
cb576f29
Unverified
Commit
cb576f29
authored
Apr 19, 2023
by
Wolle
Committed by
GitHub
Apr 19, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
force end of packet
parent
b520259d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
src/vorbis_decoder/vorbis_decoder.cpp
src/vorbis_decoder/vorbis_decoder.cpp
+13
-5
src/vorbis_decoder/vorbis_decoder.h
src/vorbis_decoder/vorbis_decoder.h
+2
-2
No files found.
src/vorbis_decoder/vorbis_decoder.cpp
View file @
cb576f29
...
...
@@ -15,7 +15,7 @@
* adapted for the ESP32 by schreibfaul1
*
* Created on: 13.02.2023
* Updated on:
07
.04.2023
* Updated on:
19
.04.2023
*/
//----------------------------------------------------------------------------------------------------------------------
// O G G I M P L.
...
...
@@ -923,17 +923,21 @@ int32_t bitReader_look(uint16_t nBits){
/* bits <= 32 */
int32_t
bitReader
(
uint16_t
nBits
)
{
int32_t
ret
=
bitReader_look
(
nBits
);
bitReader_adv
(
nBits
)
;
if
(
bitReader_adv
(
nBits
)
<
0
)
return
-
1
;
return
(
ret
);
}
/* limited to 32 at a time */
void
bitReader_adv
(
uint16_t
nBits
)
{
int8_t
bitReader_adv
(
uint16_t
nBits
)
{
nBits
+=
s_bitReader
.
headbit
;
s_bitReader
.
headbit
=
nBits
&
7
;
s_bitReader
.
headend
-=
(
nBits
>>
3
);
s_bitReader
.
headptr
+=
(
nBits
>>
3
);
if
(
s_bitReader
.
headend
<
1
){
log_e
(
"error in bitreader"
);}
if
(
s_bitReader
.
headend
<
1
){
return
-
1
;
log_e
(
"error in bitreader"
);
}
return
0
;
}
//---------------------------------------------------------------------------------------------------------------------
int
ilog
(
uint32_t
v
)
{
...
...
@@ -1866,6 +1870,10 @@ int32_t *floor1_inverse1(vorbis_info_floor_t *in, int32_t *fit_value) {
return
(
fit_value
);
}
else
{
// log_i("err in br");
;
}
eop:
return
(
NULL
);
}
...
...
@@ -1876,7 +1884,7 @@ int32_t vorbis_book_decode(codebook_t* book) {
return
decode_packed_entry_number
(
book
);
}
//---------------------------------------------------------------------------------------------------------------------
u
int32_t
decode_packed_entry_number
(
codebook_t
*
book
)
{
int32_t
decode_packed_entry_number
(
codebook_t
*
book
)
{
uint32_t
chase
=
0
;
int
read
=
book
->
dec_maxlength
;
int32_t
lok
=
bitReader_look
(
read
),
i
;
...
...
src/vorbis_decoder/vorbis_decoder.h
View file @
cb576f29
...
...
@@ -231,7 +231,7 @@ int floor1_memosize(vorbis_info_floor_t *i);
int32_t
*
floor0_inverse1
(
vorbis_info_floor_t
*
i
,
int32_t
*
lsp
);
int32_t
*
floor1_inverse1
(
vorbis_info_floor_t
*
in
,
int32_t
*
fit_value
);
int32_t
vorbis_book_decode
(
codebook_t
*
book
);
uint32_t
decode_packed_entry_number
(
codebook_t
*
book
);
int32_t
decode_packed_entry_number
(
codebook_t
*
book
);
int
render_point
(
int
x0
,
int
x1
,
int
y0
,
int
y1
,
int
x
);
int32_t
vorbis_book_decodev_set
(
codebook_t
*
book
,
int32_t
*
a
,
int
n
,
int
point
);
int
decode_map
(
codebook_t
*
s
,
int32_t
*
v
,
int
point
);
...
...
@@ -270,7 +270,7 @@ void bitReader_clear();
void
bitReader_setData
(
uint8_t
*
buff
,
uint16_t
buffSize
);
int32_t
bitReader
(
uint16_t
bits
);
int32_t
bitReader_look
(
uint16_t
nBits
);
void
bitReader_adv
(
uint16_t
bits
);
int8_t
bitReader_adv
(
uint16_t
bits
);
uint8_t
_ilog
(
uint32_t
v
);
int
ilog
(
uint32_t
v
);
int32_t
_float32_unpack
(
int32_t
val
,
int
*
point
);
...
...
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