summaryrefslogtreecommitdiff
path: root/plugins/dumb/dumb-kode54/src/core/duhlen.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/dumb/dumb-kode54/src/core/duhlen.c')
-rw-r--r--plugins/dumb/dumb-kode54/src/core/duhlen.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/plugins/dumb/dumb-kode54/src/core/duhlen.c b/plugins/dumb/dumb-kode54/src/core/duhlen.c
new file mode 100644
index 00000000..2c3a3576
--- /dev/null
+++ b/plugins/dumb/dumb-kode54/src/core/duhlen.c
@@ -0,0 +1,42 @@
+/* _______ ____ __ ___ ___
+ * \ _ \ \ / \ / \ \ / / ' ' '
+ * | | \ \ | | || | \/ | . .
+ * | | | | | | || ||\ /| |
+ * | | | | | | || || \/ | | ' ' '
+ * | | | | | | || || | | . .
+ * | |_/ / \ \__// || | |
+ * /_______/ynamic \____/niversal /__\ /____\usic /| . . ibliotheque
+ * / \
+ * / . \
+ * duhlen.c - Functions to set and return the / / \ \
+ * length of a DUH. | < / \_
+ * | \/ /\ /
+ * By entheh. \_ / > /
+ * | \ / /
+ * Note that the length of a DUH is a constant | ' /
+ * stored in the DUH struct and in the DUH disk \__/
+ * format. It will be calculated on loading for
+ * other formats in which the length is not explicitly stored. Also note that
+ * it does not necessarily correspond to the length of time for which the DUH
+ * will generate samples. Rather it represents a suitable point for a player
+ * such as Winamp to stop, and in any good DUH it will allow for any final
+ * flourish to fade out and be appreciated.
+ */
+
+#include "dumb.h"
+#include "internal/dumb.h"
+
+
+
+long duh_get_length(DUH *duh)
+{
+ return duh ? duh->length : 0;
+}
+
+
+
+void duh_set_length(DUH *duh, long length)
+{
+ if (duh)
+ duh->length = length;
+}