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.
This commit is contained in:
@@ -65,8 +65,12 @@ public:
|
|||||||
delete[] buffer;
|
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 {
|
bool IsFull() const noexcept {
|
||||||
|
@@ -857,7 +857,7 @@ AlsaOutput::Cancel() noexcept
|
|||||||
synchronization */
|
synchronization */
|
||||||
|
|
||||||
pcm_export->Reset();
|
pcm_export->Reset();
|
||||||
assert(period_buffer.IsEmpty());
|
assert(period_buffer.IsCleared());
|
||||||
ring_buffer->reset();
|
ring_buffer->reset();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user