mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-17 08:56:49 -05:00
poll: remove threads from alsa-sink
Remove the thread from alsa sink and use the pollfd event. Make it possible to pass multiple fds in one pollfd event Add 3 callbacks to the pollfd event and add support for timeouts
This commit is contained in:
parent
ac59fa9371
commit
5fa334a89b
10 changed files with 313 additions and 202 deletions
|
|
@ -20,7 +20,6 @@
|
|||
#include <stddef.h>
|
||||
|
||||
#include <asoundlib.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include <spa/node.h>
|
||||
#include <spa/audio/format.h>
|
||||
|
|
@ -58,8 +57,9 @@ typedef struct {
|
|||
snd_pcm_sframes_t buffer_size;
|
||||
snd_pcm_sframes_t period_size;
|
||||
snd_pcm_channel_area_t areas[16];
|
||||
pthread_t thread;
|
||||
bool running;
|
||||
SpaPollFd fds[16];
|
||||
SpaPollItem poll;
|
||||
} SpaALSAState;
|
||||
|
||||
typedef struct _ALSABuffer ALSABuffer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue