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
d66f5a85
Commit
d66f5a85
authored
Jun 27, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/alsa: replace PeriodBuffer::IsEmpty() with IsCleared()
This assertion is not about whether all data has been consumed, but about whether there has been any data at all.
parent
30ca6b88
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
PeriodBuffer.hxx
src/lib/alsa/PeriodBuffer.hxx
+6
-2
AlsaOutputPlugin.cxx
src/output/plugins/AlsaOutputPlugin.cxx
+1
-1
No files found.
src/lib/alsa/PeriodBuffer.hxx
View file @
d66f5a85
...
...
@@ -65,8 +65,12 @@ public:
delete
[]
buffer
;
}
bool
IsEmpty
()
const
noexcept
{
return
head
==
tail
;
/**
* Has there no data been appended since the last Clear()
* call?
*/
bool
IsCleared
()
const
noexcept
{
return
tail
==
0
;
}
bool
IsFull
()
const
noexcept
{
...
...
src/output/plugins/AlsaOutputPlugin.cxx
View file @
d66f5a85
...
...
@@ -857,7 +857,7 @@ AlsaOutput::Cancel() noexcept
synchronization */
pcm_export
->
Reset
();
assert
(
period_buffer
.
Is
Empty
());
assert
(
period_buffer
.
Is
Cleared
());
ring_buffer
->
reset
();
return
;
...
...
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