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
384ba4d5
Commit
384ba4d5
authored
Feb 10, 2024
by
schreibfaul1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
impl countCode 1 and 2
parent
a48d33c8
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
317 additions
and
70 deletions
+317
-70
src/opus_decoder/opus_decoder.cpp
src/opus_decoder/opus_decoder.cpp
+310
-68
src/opus_decoder/opus_decoder.h
src/opus_decoder/opus_decoder.h
+7
-2
No files found.
src/opus_decoder/opus_decoder.cpp
View file @
384ba4d5
This diff is collapsed.
Click to expand it.
src/opus_decoder/opus_decoder.h
View file @
384ba4d5
...
...
@@ -8,7 +8,8 @@
#include <vector>
using
namespace
std
;
enum
:
int8_t
{
OPUS_PARSE_OGG_DONE
=
100
,
enum
:
int8_t
{
OPUS_CONTINUE
=
110
,
OPUS_PARSE_OGG_DONE
=
100
,
ERR_OPUS_NONE
=
0
,
ERR_OPUS_CHANNELS_OUT_OF_RANGE
=
-
1
,
ERR_OPUS_INVALID_SAMPLERATE
=
-
2
,
...
...
@@ -36,6 +37,10 @@ void OPUSDecoder_FreeBuffers();
void
OPUSDecoder_ClearBuffers
();
void
OPUSsetDefaults
();
int
OPUSDecode
(
uint8_t
*
inbuf
,
int
*
bytesLeft
,
short
*
outbuf
);
int8_t
opus_FramePacking_Code0
(
uint8_t
*
inbuf
,
int
*
bytesLeft
,
short
*
outbuf
,
int
packetLen
,
uint16_t
samplesPerFrame
);
int8_t
opus_FramePacking_Code1
(
uint8_t
*
inbuf
,
int
*
bytesLeft
,
short
*
outbuf
,
int
packetLen
,
uint16_t
samplesPerFrame
,
uint8_t
*
frameCount
);
int8_t
opus_FramePacking_Code2
(
uint8_t
*
inbuf
,
int
*
bytesLeft
,
short
*
outbuf
,
int
packetLen
,
uint16_t
samplesPerFrame
,
uint8_t
*
frameCount
);
int8_t
opus_FramePacking_Code3
(
uint8_t
*
inbuf
,
int
*
bytesLeft
,
short
*
outbuf
,
int
packetLen
,
uint16_t
samplesPerFrame
,
uint8_t
*
frameCount
);
uint8_t
OPUSGetChannels
();
uint32_t
OPUSGetSampRate
();
uint8_t
OPUSGetBitsPerSample
();
...
...
@@ -47,7 +52,7 @@ int OPUSFindSyncWord(unsigned char* buf, int nBytes);
int
OPUSparseOGG
(
uint8_t
*
inbuf
,
int
*
bytesLeft
);
int
parseOpusHead
(
uint8_t
*
inbuf
,
int
nBytes
);
int
parseOpusComment
(
uint8_t
*
inbuf
,
int
nBytes
);
int
parseOpusTOC
(
uint8_t
TOC_Byte
);
int
8_t
parseOpusTOC
(
uint8_t
TOC_Byte
);
int32_t
opus_packet_get_samples_per_frame
(
const
uint8_t
*
data
,
int32_t
Fs
);
// some helper functions
...
...
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