summaryrefslogtreecommitdiffstats
path: root/polyp/module-alsa-sink.c
diff options
context:
space:
mode:
Diffstat (limited to 'polyp/module-alsa-sink.c')
-rw-r--r--polyp/module-alsa-sink.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/polyp/module-alsa-sink.c b/polyp/module-alsa-sink.c
index a0fa52db..5b4a7b73 100644
--- a/polyp/module-alsa-sink.c
+++ b/polyp/module-alsa-sink.c
@@ -42,8 +42,8 @@
struct userdata {
snd_pcm_t *pcm_handle;
struct pa_sink *sink;
- void **io_sources;
- unsigned n_io_sources;
+ struct pa_io_event **io_events;
+ unsigned n_io_events;
size_t frame_size, fragment_size;
struct pa_memchunk memchunk, silence;
@@ -128,9 +128,9 @@ static void do_write(struct userdata *u) {
}
}
-static void io_callback(struct pa_mainloop_api*a, void *id, int fd, enum pa_mainloop_api_io_events events, void *userdata) {
+static void io_callback(struct pa_mainloop_api*a, struct pa_io_event *e, int fd, enum pa_io_event_flags f, void *userdata) {
struct userdata *u = userdata;
- assert(u && a && id);
+ assert(u && a && e);
if (snd_pcm_state(u->pcm_handle) == SND_PCM_STATE_XRUN)
xrun_recovery(u);
@@ -207,7 +207,7 @@ int pa_module_init(struct pa_core *c, struct pa_module*m) {
pa_sink_set_owner(u->sink, m);
u->sink->description = pa_sprintf_malloc("Advanced Linux Sound Architecture PCM on '%s'", dev);
- if (pa_create_io_sources(u->pcm_handle, c->mainloop, &u->io_sources, &u->n_io_sources, io_callback, u) < 0) {
+ if (pa_create_io_events(u->pcm_handle, c->mainloop, &u->io_events, &u->n_io_events, io_callback, u) < 0) {
fprintf(stderr, __FILE__": failed to obtain file descriptors\n");
goto fail;
}
@@ -251,8 +251,8 @@ void pa_module_done(struct pa_core *c, struct pa_module*m) {
if (u->sink)
pa_sink_free(u->sink);
- if (u->io_sources)
- pa_free_io_sources(c->mainloop, u->io_sources, u->n_io_sources);
+ if (u->io_events)
+ pa_free_io_events(c->mainloop, u->io_events, u->n_io_events);
if (u->pcm_handle) {
snd_pcm_drop(u->pcm_handle);