Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
f0ac63d5
Commit
f0ac63d5
authored
Jun 27, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/alsa: DrainInternal() ignores postponed partial frame
parent
c1eb0583
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
PeriodBuffer.hxx
src/lib/alsa/PeriodBuffer.hxx
+11
-0
AlsaOutputPlugin.cxx
src/output/plugins/AlsaOutputPlugin.cxx
+1
-1
No files found.
src/lib/alsa/PeriodBuffer.hxx
View file @
f0ac63d5
...
...
@@ -82,6 +82,17 @@ public:
}
/**
* Has all data for the current period been drained? If not,
* then there is pending data. This ignores the partial frame
* which may have been postponed by FillWithSilence().
*/
bool
IsDrained
()
const
noexcept
{
/* compare head with capacity, not with tail; this
method makes only sense if the period is full */
return
head
>=
capacity
;
}
/**
* Returns the tail of the buffer, i.e. where new data can be
* written. Call GetSpaceBytes() to find out how much may be
* copied to the returned pointer, and call AppendBytes() to
...
...
src/output/plugins/AlsaOutputPlugin.cxx
View file @
f0ac63d5
...
...
@@ -753,7 +753,7 @@ AlsaOutput::DrainInternal()
period_buffer
.
FillWithSilence
(
silence
,
out_frame_size
);
/* drain period_buffer */
if
(
!
period_buffer
.
Is
Empty
())
{
if
(
!
period_buffer
.
Is
Drained
())
{
auto
frames_written
=
WriteFromPeriodBuffer
();
if
(
frames_written
<
0
)
{
if
(
frames_written
==
-
EAGAIN
)
...
...
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