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
cbaefeca
Commit
cbaefeca
authored
Sep 17, 2022
by
tueddy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
event audio_process_i2s for processing audio data extern after applying filters and gain.
Needed for sending audio through A2DP-source
parent
90fd4412
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
src/Audio.cpp
src/Audio.cpp
+9
-0
src/Audio.h
src/Audio.h
+1
-0
No files found.
src/Audio.cpp
View file @
cbaefeca
...
...
@@ -4371,6 +4371,15 @@ bool Audio::playSample(int16_t sample[2]) {
uint32_t
s32
=
Gain
(
sample
);
// vosample2lume;
if
(
audio_process_i2s
){
// process audio sample just before writing to i2s
bool
continueI2S
=
false
;
audio_process_i2s
(
&
s32
,
&
continueI2S
);
if
(
!
continueI2S
){
return
true
;
}
}
if
(
m_f_internalDAC
)
{
s32
+=
0x80008000
;
}
...
...
src/Audio.h
View file @
cbaefeca
...
...
@@ -82,6 +82,7 @@ extern __attribute__((weak)) void audio_lasthost(const char*);
extern
__attribute__
((
weak
))
void
audio_eof_speech
(
const
char
*
);
extern
__attribute__
((
weak
))
void
audio_eof_stream
(
const
char
*
);
// The webstream comes to an end
extern
__attribute__
((
weak
))
void
audio_process_extern
(
int16_t
*
buff
,
uint16_t
len
,
bool
*
continueI2S
);
// record audiodata or send via BT
extern
__attribute__
((
weak
))
void
audio_process_i2s
(
uint32_t
*
sample
,
bool
*
continueI2S
);
// record audiodata or send via BT
#define AUDIO_INFO(...) {char buff[512 + 64]; sprintf(buff,__VA_ARGS__); if(audio_info) audio_info(buff);}
...
...
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