output/alsa: check GetFrames()>0 instead of IsEmpty() in WriteFromPeriodBuffer()
This commit is contained in:
parent
f0ac63d5af
commit
cf631fca50
|
@ -311,8 +311,8 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
snd_pcm_sframes_t WriteFromPeriodBuffer() noexcept {
|
snd_pcm_sframes_t WriteFromPeriodBuffer() noexcept {
|
||||||
assert(!period_buffer.IsEmpty());
|
|
||||||
assert(period_buffer.IsFull());
|
assert(period_buffer.IsFull());
|
||||||
|
assert(period_buffer.GetFrames(out_frame_size) > 0);
|
||||||
|
|
||||||
auto frames_written = snd_pcm_writei(pcm, period_buffer.GetHead(),
|
auto frames_written = snd_pcm_writei(pcm, period_buffer.GetHead(),
|
||||||
period_buffer.GetFrames(out_frame_size));
|
period_buffer.GetFrames(out_frame_size));
|
||||||
|
|
Loading…
Reference in New Issue