summaryrefslogtreecommitdiffhomepage
path: root/mixlib/xmix_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'mixlib/xmix_device.c')
-rw-r--r--mixlib/xmix_device.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/mixlib/xmix_device.c b/mixlib/xmix_device.c
index c93153a..db343ad 100644
--- a/mixlib/xmix_device.c
+++ b/mixlib/xmix_device.c
@@ -1,7 +1,7 @@
/* -*-c-*- -------------- xmix_device.c :
* Implementation of the functions declared in xmix_device.h
* ------------------------------------------------------------------
- * Last change: Time-stamp: "2001-05-04 23:40:31 jao"
+ * Last change: Time-stamp: "2001-05-07 23:49:31 jao"
* ------------------------------------------------------------------
* Copyright (C) 2001 Free Software Foundation, Inc.
*
@@ -169,8 +169,15 @@ busy_ (const mix_device_t *dev)
return (!mix_io_is_ready (GET_CHANNEL_(dev)));
}
+static void
+destroy_ (mix_device_t *dev)
+{
+ if (dev->type != mix_dev_CONSOLE && GET_FILE_(dev) != NULL)
+ mix_file_delete (GET_FILE_(dev));
+}
+
static mix_device_vtable_t VTABLE_ = {
- write_, read_, ioc_, busy_
+ write_, read_, ioc_, busy_, destroy_
};
const mix_device_vtable_t * DEF_DEV_VTABLE_ = &VTABLE_;