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
5598f73c
Unverified
Commit
5598f73c
authored
Apr 04, 2022
by
Wolle
Committed by
GitHub
Apr 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updating m_resumeFilePos after resuming file #293
parent
ce87ee9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
src/Audio.cpp
src/Audio.cpp
+10
-2
No files found.
src/Audio.cpp
View file @
5598f73c
...
...
@@ -2,7 +2,7 @@
* Audio.cpp
*
* Created on: Oct 26,2018
* Updated on:
Feb 20
,2022
* Updated on:
Apr 04
,2022
* Author: Wolle (schreibfaul1)
*
*/
...
...
@@ -3775,10 +3775,18 @@ void Audio::compute_audioCurrentTime(int bd) {
// if VBR: m_avr_bitrate is average of the first values of m_bitrate
sum_bitrate
+=
getBitRate
();
m_avr_bitrate
=
sum_bitrate
/
(
loop_counter
-
20
);
if
(
loop_counter
==
199
&&
m_resumeFilePos
){
m_audioCurrentTime
=
(
getFilePos
()
-
m_audioDataStart
-
inBufferFilled
())
*
8
/
m_avr_bitrate
;
// #293
}
}
}
else
{
if
(
loop_counter
==
2
)
m_avr_bitrate
=
getBitRate
();
if
(
loop_counter
==
2
){
m_avr_bitrate
=
getBitRate
();
if
(
m_resumeFilePos
){
// if connecttoFS() is called with resumeFilePos != 0
m_audioCurrentTime
=
(
getFilePos
()
-
m_audioDataStart
-
inBufferFilled
())
*
8
/
m_avr_bitrate
;
// #293
}
}
}
m_audioCurrentTime
+=
(
float
)
bd
*
8
/
m_avr_bitrate
;
}
...
...
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