{input,mixer}/alsa: move code to lib/alsa/NonBlock.cxx
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "lib/alsa/NonBlock.hxx"
|
||||
#include "mixer/MixerInternal.hxx"
|
||||
#include "mixer/Listener.hxx"
|
||||
#include "output/OutputAPI.hxx"
|
||||
@@ -108,18 +109,7 @@ AlsaMixerMonitor::PrepareSockets()
|
||||
return std::chrono::steady_clock::duration(-1);
|
||||
}
|
||||
|
||||
int count = snd_mixer_poll_descriptors_count(mixer);
|
||||
if (count <= 0)
|
||||
count = 0;
|
||||
|
||||
struct pollfd *pfds = pfd_buffer.Get(count);
|
||||
|
||||
count = snd_mixer_poll_descriptors(mixer, pfds, count);
|
||||
if (count < 0)
|
||||
count = 0;
|
||||
|
||||
ReplaceSocketList(pfds, count);
|
||||
return std::chrono::steady_clock::duration(-1);
|
||||
return PrepareAlsaMixerSockets(*this, mixer, pfd_buffer);
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user