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
5d289fd8
Unverified
Commit
5d289fd8
authored
Apr 12, 2022
by
Wolle
Committed by
GitHub
Apr 12, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
close audiofile in stopSong()
parent
b2061b15
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
src/Audio.cpp
src/Audio.cpp
+9
-1
No files found.
src/Audio.cpp
View file @
5d289fd8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* Audio.cpp
* Audio.cpp
*
*
* Created on: Oct 26,2018
* Created on: Oct 26,2018
* Updated on: Apr
06
,2022
* Updated on: Apr
12
,2022
* Author: Wolle (schreibfaul1)
* Author: Wolle (schreibfaul1)
*
*
*/
*/
...
@@ -2053,10 +2053,18 @@ uint32_t Audio::stopSong() {
...
@@ -2053,10 +2053,18 @@ uint32_t Audio::stopSong() {
if
(
m_f_running
)
{
if
(
m_f_running
)
{
m_f_running
=
false
;
m_f_running
=
false
;
if
(
m_f_localfile
){
if
(
m_f_localfile
){
m_f_localfile
=
false
;
pos
=
getFilePos
()
-
inBufferFilled
();
pos
=
getFilePos
()
-
inBufferFilled
();
audiofile
.
close
();
audiofile
.
close
();
if
(
audio_info
)
audio_info
(
"Closing audio file"
);
}
}
}
}
if
(
audiofile
){
// added this before putting 'm_f_localfile = false' in stopSong(); shoulf never occur....
audiofile
.
close
();
if
(
audio_info
)
audio_info
(
"Closing audio file"
);
log_w
(
"Closing audio file"
);
// for debug
}
memset
(
m_outBuff
,
0
,
sizeof
(
m_outBuff
));
//Clear OutputBuffer
memset
(
m_outBuff
,
0
,
sizeof
(
m_outBuff
));
//Clear OutputBuffer
i2s_zero_dma_buffer
((
i2s_port_t
)
m_i2s_num
);
i2s_zero_dma_buffer
((
i2s_port_t
)
m_i2s_num
);
return
pos
;
return
pos
;
...
...
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