diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2001-05-07 23:02:25 +0000 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2001-05-07 23:02:25 +0000 |
commit | 93d52e994ccf5597413180c5a3c401286112891d (patch) | |
tree | e257f69fd1fe3bf47f696de64b64d1f06321f391 /mixlib/xmix_device.c | |
parent | 20e1cc2617c6774ce646fcf9f60029dd131442d4 (diff) | |
download | mdk-93d52e994ccf5597413180c5a3c401286112891d.tar.gz mdk-93d52e994ccf5597413180c5a3c401286112891d.tar.bz2 |
mix_device_t: virtual destructor added
Diffstat (limited to 'mixlib/xmix_device.c')
-rw-r--r-- | mixlib/xmix_device.c | 11 |
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_; |