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
e77a298a
Unverified
Commit
e77a298a
authored
Dec 04, 2022
by
Wolle
Committed by
GitHub
Dec 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Error opening audio when using SdFat #426
parent
fd64ffa0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
src/Audio.cpp
src/Audio.cpp
+5
-5
src/Audio.h
src/Audio.h
+1
-1
No files found.
src/Audio.cpp
View file @
e77a298a
...
...
@@ -3,8 +3,8 @@
*
* Created on: Oct 26.2018
*
* Version 2.0.7
d
* Updated on: Dec 0
2
.2022
* Version 2.0.7
e
* Updated on: Dec 0
4
.2022
* Author: Wolle (schreibfaul1)
*
*/
...
...
@@ -707,7 +707,7 @@ bool Audio::connecttoFS(fs::FS &fs, const char* path, uint32_t resumeFilePos) {
char
*
afn
=
NULL
;
// audioFileName
#ifdef SDFATFS_USED
audiofile
.
getName
(
m_chbuf
,
sizeof
(
m_chbuf
));
audiofile
.
getName
(
m_chbuf
,
m_chbufSize
);
// #426
afn
=
strdup
(
m_chbuf
);
#else
afn
=
strdup
(
audiofile
.
name
());
...
...
@@ -2733,7 +2733,7 @@ void Audio::processLocalFile() {
}
//TEST loop
#ifdef SDFATFS_USED
audiofile
.
getName
(
m_chbuf
,
sizeof
(
m_chbuf
));
audiofile
.
getName
(
m_chbuf
,
m_chbufSize
);
// #426
char
*
afn
=
strdup
(
m_chbuf
);
#else
char
*
afn
=
strdup
(
audiofile
.
name
());
// store temporary the name
...
...
@@ -4826,10 +4826,10 @@ boolean Audio::streamDetection(uint32_t bytesAvail){
cnt_slow
=
0
;
}
if
(
InBuff
.
bufferFilled
()
<
InBuff
.
getMaxBlockSize
())
cnt_slow
++
;
if
(
bytesAvail
)
{
tmr_lost
=
millis
()
+
1000
;
cnt_lost
=
0
;}
if
(
InBuff
.
bufferFilled
()
>
InBuff
.
getMaxBlockSize
()
*
2
)
return
false
;
// enough data available to play
// if no audio data is received within three seconds, a new connection attempt is started.
if
(
bytesAvail
)
{
tmr_lost
=
millis
()
+
1000
;
cnt_lost
=
0
;}
if
(
tmr_lost
<
millis
()){
cnt_lost
++
;
tmr_lost
=
millis
()
+
1000
;
...
...
src/Audio.h
View file @
e77a298a
...
...
@@ -2,7 +2,7 @@
* Audio.h
*
* Created on: Oct 28,2018
* Updated on: Dec 0
2
,2022
* Updated on: Dec 0
4
,2022
* Author: Wolle (schreibfaul1)
*/
...
...
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