alsa-project / alsa-lib

The Advanced Linux Sound Architecture (ALSA) - library
GNU Lesser General Public License v2.1
345 stars 176 forks source link

1.2.9: arithmetic exception in pcm/pcm_hw.c:753 #318

Closed engineeror closed 1 year ago

engineeror commented 1 year ago

period_size is zero on USB DACs: https://bugs.archlinux.org/index.php?do=details&task_id=78476

@perexg

perexg commented 1 year ago

I don't think it's correct to call snd_pcm_drain() on in uninitialized PCM stream:

https://github.com/DeaDBeeF-Player/deadbeef/blob/master/plugins/alsa/alsa.c

It's an application bug. But yes - the error code should be returned instead crash.