summaryrefslogtreecommitdiff
path: root/apps/codecs/dumb/src/core/makeduh.c
diff options
context:
space:
mode:
authorMartin Arver <martin.arver@gmail.com>2006-12-11 21:01:14 +0000
committerMartin Arver <martin.arver@gmail.com>2006-12-11 21:01:14 +0000
commit7d820556e95ce8837eaa5baf2f6b5215a4b129ce (patch)
tree686899f7652fcd3c43c321ca53d99bbdfca42847 /apps/codecs/dumb/src/core/makeduh.c
parent440513ab6a51c5cc311ce8671180970279e4eaf9 (diff)
downloadrockbox-7d820556e95ce8837eaa5baf2f6b5215a4b129ce.zip
rockbox-7d820556e95ce8837eaa5baf2f6b5215a4b129ce.tar.gz
rockbox-7d820556e95ce8837eaa5baf2f6b5215a4b129ce.tar.bz2
rockbox-7d820556e95ce8837eaa5baf2f6b5215a4b129ce.tar.xz
Remove the files
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11719 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/dumb/src/core/makeduh.c')
-rw-r--r--apps/codecs/dumb/src/core/makeduh.c92
1 files changed, 0 insertions, 92 deletions
diff --git a/apps/codecs/dumb/src/core/makeduh.c b/apps/codecs/dumb/src/core/makeduh.c
deleted file mode 100644
index 1e422fb..0000000
--- a/apps/codecs/dumb/src/core/makeduh.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/* _______ ____ __ ___ ___
- * \ _ \ \ / \ / \ \ / / ' ' '
- * | | \ \ | | || | \/ | . .
- * | | | | | | || ||\ /| |
- * | | | | | | || || \/ | | ' ' '
- * | | | | | | || || | | . .
- * | |_/ / \ \__// || | |
- * /_______/ynamic \____/niversal /__\ /____\usic /| . . ibliotheque
- * / \
- * / . \
- * makeduh.c - Function to construct a DUH from / / \ \
- * its components. | < / \_
- * | \/ /\ /
- * By entheh. \_ / > /
- * | \ / /
- * | ' /
- * \__/
- */
-
-#include <stdlib.h>
-
-#include "dumb.h"
-#include "internal/dumb.h"
-
-
-
-static DUH_SIGNAL *make_signal(DUH_SIGTYPE_DESC *desc, sigdata_t *sigdata)
-{
- DUH_SIGNAL *signal;
-
- ASSERT((desc->start_sigrenderer && desc->end_sigrenderer) || (!desc->start_sigrenderer && !desc->end_sigrenderer));
- ASSERT(desc->sigrenderer_get_samples && desc->sigrenderer_get_current_sample);
-
- signal = malloc(sizeof(*signal));
-
- if (!signal) {
- if (desc->unload_sigdata)
- if (sigdata)
- (*desc->unload_sigdata)(sigdata);
- return NULL;
- }
-
- signal->desc = desc;
- signal->sigdata = sigdata;
-
- return signal;
-}
-
-
-
-DUH *make_duh(long length, int n_signals, DUH_SIGTYPE_DESC *desc[], sigdata_t *sigdata[])
-{
- DUH *duh = malloc(sizeof(*duh));
- int i;
- int fail;
-
- if (duh) {
- duh->n_signals = n_signals;
-
- duh->signal = malloc(n_signals * sizeof(*duh->signal));
-
- if (!duh->signal) {
- free(duh);
- duh = NULL;
- }
- }
-
- if (!duh) {
- for (i = 0; i < n_signals; i++)
- if (desc[i]->unload_sigdata)
- if (sigdata[i])
- (*desc[i]->unload_sigdata)(sigdata[i]);
- return NULL;
- }
-
- fail = 0;
-
- for (i = 0; i < n_signals; i++) {
- duh->signal[i] = make_signal(desc[i], sigdata[i]);
- if (!duh->signal[i])
- fail = 1;
- }
-
- if (fail) {
- unload_duh(duh);
- return NULL;
- }
-
- duh->length = length;
-
- return duh;
-}