output/roar: reorder methods

This commit is contained in:
Max Kellermann 2011-09-17 20:10:26 +02:00
parent 0bd0e2a3ec
commit 950772ab8a

View File

@ -125,20 +125,6 @@ roar_init(G_GNUC_UNUSED const struct audio_format *audio_format,
return self;
}
static void
roar_close(void *data)
{
roar_t * self = data;
g_mutex_lock(self->lock);
self->alive = false;
if (self->vss != NULL)
roar_vs_close(self->vss, ROAR_VS_TRUE, &(self->err));
self->vss = NULL;
roar_disconnect(&(self->con));
g_mutex_unlock(self->lock);
}
static void
roar_finish(void *data)
{
@ -217,6 +203,20 @@ roar_open(void *data, struct audio_format *audio_format, GError **error)
return true;
}
static void
roar_close(void *data)
{
roar_t * self = data;
g_mutex_lock(self->lock);
self->alive = false;
if (self->vss != NULL)
roar_vs_close(self->vss, ROAR_VS_TRUE, &(self->err));
self->vss = NULL;
roar_disconnect(&(self->con));
g_mutex_unlock(self->lock);
}
static void
roar_cancel(void *data)
{