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:
parent
30ca6b8881
commit
d66f5a8590
|
@ -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 {
|
||||
|
|
|
@ -857,7 +857,7 @@ AlsaOutput::Cancel() noexcept
|
|||
synchronization */
|
||||
|
||||
pcm_export->Reset();
|
||||
assert(period_buffer.IsEmpty());
|
||||
assert(period_buffer.IsCleared());
|
||||
ring_buffer->reset();
|
||||
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue