Subject | Hash | Author | Date (UTC) |
---|---|---|---|
proper handling of snd_pcm_drain() | ae2c6458f893e77cd352fe9225e123bdf077e33f | Sylvain BERTRAND | 2020-05-15 14:46:30 |
after network testing: need an input thread | 0c26bffd3c2268cfb9f7d8e43c7aba2fbf7fec16 | Sylvain BERTRAND | 2020-05-13 23:11:20 |
spin on futex waiting in threaded scaler | e90420f459c608cbcbae423b3c487598a83de359 | Sylvain BERTRAND | 2020-05-13 21:05:48 |
npa tidying and npv addition, usable on our system | 443ff39347c8b599dfaafff612caed84287f1a70 | Sylvain BERTRAND | 2020-05-13 15:12:15 |
here we go | d5a2b11f4d73ec5365a340163f451fa8a123d728 | Sylvain BERTRAND | 2020-02-12 18:50:57 |
File | Lines added | Lines deleted |
---|---|---|
npa/npa.c | 14 | 2 |
File npa/npa.c changed (mode: 100644) (index 1f68a94..8ebe153) | |||
... | ... | static void pcm_filt_frames_write(snd_pcm_uframes_t uframes_n) { loop | |
1668 | 1668 | if (!filt_frames_get()) { /* no more filt frames ? */ | if (!filt_frames_get()) { /* no more filt frames ? */ |
1669 | 1669 | loop { /* spinning */ | loop { /* spinning */ |
1670 | 1670 | int r1; | int r1; |
1671 | snd_pcm_state_t state; | ||
1671 | 1672 | ||
1672 | 1673 | r1 = snd_pcm_drain(pcm); | r1 = snd_pcm_drain(pcm); |
1673 | 1674 | if (r1 == 0) | if (r1 == 0) |
1674 | 1675 | break; | break; |
1675 | if (r1 != -EAGAIN) | ||
1676 | FATAL("alsa:an error occured while draining the pcm\n"); | ||
1676 | if (r1 == -EAGAIN) | ||
1677 | continue; | ||
1678 | /* | ||
1679 | * the pcm state can change asynchronously, | ||
1680 | * and if the draining was successful, the | ||
1681 | * pcm should be in SETUP state, and in this | ||
1682 | * state, snd_pcm_drain _must_ fail (direct | ||
1683 | * from alsa devs) | ||
1684 | */ | ||
1685 | state = snd_pcm_state(pcm); | ||
1686 | if (state == SND_PCM_STATE_SETUP) | ||
1687 | break; | ||
1688 | |||
1677 | 1689 | } | } |
1678 | 1690 | /**********************************************/ | /**********************************************/ |
1679 | 1691 | EXIT("finished playing\n"); | EXIT("finished playing\n"); |