add sync_destroy_device()

This commit is contained in:
Erik Faye-Lund 2010-01-09 20:46:50 +01:00
parent 76d3fc55f7
commit 14244a2d0d
3 changed files with 8 additions and 1 deletions

View File

@ -99,6 +99,12 @@ struct sync_device *sync_create_device(const char *base)
return d; return d;
} }
void sync_destroy_device(struct sync_device *d)
{
free(d->base);
sync_data_deinit(&d->data);
}
#ifdef SYNC_PLAYER #ifdef SYNC_PLAYER
static int load_track_data(struct sync_track *t, const char *path) static int load_track_data(struct sync_track *t, const char *path)

View File

@ -13,7 +13,7 @@ extern "C" {
#endif #endif
struct sync_device { struct sync_device {
const char *base; char *base;
struct sync_data data; struct sync_data data;
#ifndef SYNC_PLAYER #ifndef SYNC_PLAYER

View File

@ -13,6 +13,7 @@ struct sync_device;
struct sync_track; struct sync_track;
struct sync_device *sync_create_device(const char *); struct sync_device *sync_create_device(const char *);
void sync_destroy_device(struct sync_device *);
#ifndef SYNC_PLAYER #ifndef SYNC_PLAYER
struct sync_cb { struct sync_cb {