diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-08-12 20:53:29 -0400 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2012-08-12 20:54:50 -0400 |
commit | df196504f9bf223d911ef8edb91203195bdf0c9d (patch) | |
tree | 4ee03edf20dc1e099e02456ab6871f834fd1d091 | |
parent | c84b0657f1b05637e6b436791b0f41b9f32d199f (diff) | |
download | mirror-ponymix-df196504f9bf223d911ef8edb91203195bdf0c9d.tar.gz mirror-ponymix-df196504f9bf223d911ef8edb91203195bdf0c9d.tar.bz2 mirror-ponymix-df196504f9bf223d911ef8edb91203195bdf0c9d.zip |
remove pa_mainloop_api from pulseaudio_t
We don't need to carry this around on the pulse struct.
-rw-r--r-- | pulsemix.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -102,7 +102,6 @@ struct io_t { struct pulseaudio_t { pa_context *cxt; pa_mainloop *mainloop; - pa_mainloop_api *mainloop_api; enum connectstate state; int success; @@ -548,12 +547,10 @@ static int set_default(struct pulseaudio_t *pulse, struct io_t *dev) return !pulse->success; } -static void pulse_init(struct pulseaudio_t *pulse, const char *clientname) +static void pulse_init(struct pulseaudio_t *pulse) { - /* allocate */ pulse->mainloop = pa_mainloop_new(); - pulse->mainloop_api = pa_mainloop_get_api(pulse->mainloop); - pulse->cxt = pa_context_new(pulse->mainloop_api, clientname); + pulse->cxt = pa_context_new(pa_mainloop_get_api(pulse->mainloop), "lolpulse"); pulse->state = STATE_CONNECTING; pulse->head = NULL; @@ -749,7 +746,7 @@ int main(int argc, char *argv[]) } /* initialize connection */ - pulse_init(&pulse, "lolpulse"); + pulse_init(&pulse); if (pulse_connect(&pulse) != 0) return 1; |