mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 10:22:49 +00:00
plasma: do not call snd_pcm_recover() on EAGAIN in mixer applet
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
3645e1c382
commit
8c05205586
1 changed files with 5 additions and 1 deletions
|
@ -781,9 +781,13 @@ void MixerTabWidget::slotVisualizerTimeout()
|
|||
::memset(m_alsapcmbuffer, 0, sizeof(m_alsapcmbuffer));
|
||||
const int alsaresult = snd_pcm_readi(m_alsapcm, m_alsapcmbuffer, s_alsapcmbuffersize);
|
||||
if (alsaresult < 1) {
|
||||
if (errno == EAGAIN) {
|
||||
// no data? snd_pcm_recover() does not handle it anyway
|
||||
break;
|
||||
}
|
||||
// NOTE: this happens when the data is drained which is quite often because
|
||||
// the visualization timer is 50ms
|
||||
// kDebug() << "Could not read PCM data" << snd_strerror(alsaresult);
|
||||
kWarning() << "Could not read PCM data" << snd_strerror(alsaresult);
|
||||
snd_pcm_recover(m_alsapcm, alsaresult, 1);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue