diff options
author | Michiel Van Der Kolk <not.valid@email.address> | 2005-03-17 20:50:03 +0000 |
---|---|---|
committer | Michiel Van Der Kolk <not.valid@email.address> | 2005-03-17 20:50:03 +0000 |
commit | 27be5bc72855a0fbbdae230bc144624c9eb85f5e (patch) | |
tree | b553f1321df924c4b744ffcab48dce5f4f081f7d /apps/codecs/dumb/src/it/itunload.c | |
parent | 7e7662bb716917ca431204f0113d400c1014f2e8 (diff) | |
download | rockbox-27be5bc72855a0fbbdae230bc144624c9eb85f5e.tar.gz rockbox-27be5bc72855a0fbbdae230bc144624c9eb85f5e.zip |
Initial check in dumb 0.9.2 - has a few usages of floating point that should
be rewritten to fixed point. seems to compile cleanly for iriver.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6197 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/dumb/src/it/itunload.c')
-rw-r--r-- | apps/codecs/dumb/src/it/itunload.c | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/apps/codecs/dumb/src/it/itunload.c b/apps/codecs/dumb/src/it/itunload.c new file mode 100644 index 0000000000..8f282bea2e --- /dev/null +++ b/apps/codecs/dumb/src/it/itunload.c | |||
@@ -0,0 +1,71 @@ | |||
1 | /* _______ ____ __ ___ ___ | ||
2 | * \ _ \ \ / \ / \ \ / / ' ' ' | ||
3 | * | | \ \ | | || | \/ | . . | ||
4 | * | | | | | | || ||\ /| | | ||
5 | * | | | | | | || || \/ | | ' ' ' | ||
6 | * | | | | | | || || | | . . | ||
7 | * | |_/ / \ \__// || | | | ||
8 | * /_______/ynamic \____/niversal /__\ /____\usic /| . . ibliotheque | ||
9 | * / \ | ||
10 | * / . \ | ||
11 | * itunload.c - Code to free an Impulse Tracker / / \ \ | ||
12 | * module from memory. | < / \_ | ||
13 | * | \/ /\ / | ||
14 | * By entheh. \_ / > / | ||
15 | * | \ / / | ||
16 | * | ' / | ||
17 | * \__/ | ||
18 | */ | ||
19 | |||
20 | #include <stdlib.h> | ||
21 | |||
22 | #include "dumb.h" | ||
23 | #include "internal/it.h" | ||
24 | |||
25 | |||
26 | |||
27 | void _dumb_it_unload_sigdata(sigdata_t *vsigdata) | ||
28 | { | ||
29 | if (vsigdata) { | ||
30 | DUMB_IT_SIGDATA *sigdata = vsigdata; | ||
31 | int n; | ||
32 | |||
33 | if (sigdata->order) | ||
34 | free(sigdata->order); | ||
35 | |||
36 | if (sigdata->instrument) | ||
37 | free(sigdata->instrument); | ||
38 | |||
39 | if (sigdata->sample) { | ||
40 | for (n = 0; n < sigdata->n_samples; n++) { | ||
41 | if (sigdata->sample[n].left) | ||
42 | free(sigdata->sample[n].left); | ||
43 | if (sigdata->sample[n].right) | ||
44 | free(sigdata->sample[n].right); | ||
45 | } | ||
46 | free(sigdata->sample); | ||
47 | } | ||
48 | |||
49 | if (sigdata->pattern) { | ||
50 | for (n = 0; n < sigdata->n_patterns; n++) | ||
51 | if (sigdata->pattern[n].entry) | ||
52 | free(sigdata->pattern[n].entry); | ||
53 | free(sigdata->pattern); | ||
54 | } | ||
55 | |||
56 | if (sigdata->midi) | ||
57 | free(sigdata->midi); | ||
58 | |||
59 | { | ||
60 | IT_CHECKPOINT *checkpoint = sigdata->checkpoint; | ||
61 | while (checkpoint) { | ||
62 | IT_CHECKPOINT *next = checkpoint->next; | ||
63 | _dumb_it_end_sigrenderer(checkpoint->sigrenderer); | ||
64 | free(checkpoint); | ||
65 | checkpoint = next; | ||
66 | } | ||
67 | } | ||
68 | |||
69 | free(vsigdata); | ||
70 | } | ||
71 | } | ||