summaryrefslogtreecommitdiffhomepage
path: root/mixlib/mix_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'mixlib/mix_device.c')
-rw-r--r--mixlib/mix_device.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/mixlib/mix_device.c b/mixlib/mix_device.c
index 2f3f702..d40ea98 100644
--- a/mixlib/mix_device.c
+++ b/mixlib/mix_device.c
@@ -19,10 +19,27 @@
*
*/
-
#include "mix_file.h"
#include "xmix_device.h"
+/*
+ Set the directory for mix device files (by default, it's ".")
+ If the dir does not exist, it is created.
+*/
+gboolean
+mix_device_set_dir (const gchar *dirname)
+{
+ if (mix_stat_dir (dirname, "devices"))
+ {
+ if (DEV_DIR_) g_free (DEV_DIR_);
+ DEV_DIR_ = g_strdup (dirname);
+ return TRUE;
+ }
+ else
+ return FALSE;
+}
+
+
mix_device_t *
mix_device_new (mix_device_type_t type)
{