output/alsa: check GetFrames()>0 instead of IsEmpty() in WriteFromPeriodBuffer()

This commit is contained in:
Max Kellermann 2019-06-27 21:52:07 +02:00
parent f0ac63d5af
commit cf631fca50
1 changed files with 1 additions and 1 deletions

View File

@ -311,8 +311,8 @@ private:
}
snd_pcm_sframes_t WriteFromPeriodBuffer() noexcept {
assert(!period_buffer.IsEmpty());
assert(period_buffer.IsFull());
assert(period_buffer.GetFrames(out_frame_size) > 0);
auto frames_written = snd_pcm_writei(pcm, period_buffer.GetHead(),
period_buffer.GetFrames(out_frame_size));