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/core/rawsig.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/core/rawsig.c')
-rw-r--r-- | apps/codecs/dumb/src/core/rawsig.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/apps/codecs/dumb/src/core/rawsig.c b/apps/codecs/dumb/src/core/rawsig.c new file mode 100644 index 0000000000..926c990655 --- /dev/null +++ b/apps/codecs/dumb/src/core/rawsig.c | |||
@@ -0,0 +1,44 @@ | |||
1 | /* _______ ____ __ ___ ___ | ||
2 | * \ _ \ \ / \ / \ \ / / ' ' ' | ||
3 | * | | \ \ | | || | \/ | . . | ||
4 | * | | | | | | || ||\ /| | | ||
5 | * | | | | | | || || \/ | | ' ' ' | ||
6 | * | | | | | | || || | | . . | ||
7 | * | |_/ / \ \__// || | | | ||
8 | * /_______/ynamic \____/niversal /__\ /____\usic /| . . ibliotheque | ||
9 | * / \ | ||
10 | * / . \ | ||
11 | * rawsig.c - Function to retrieve raw signal / / \ \ | ||
12 | * data from a DUH provided you know | < / \_ | ||
13 | * what type of signal it is. | \/ /\ / | ||
14 | * \_ / > / | ||
15 | * By entheh. | \ / / | ||
16 | * | ' / | ||
17 | * \__/ | ||
18 | */ | ||
19 | |||
20 | #include <stdlib.h> | ||
21 | |||
22 | #include "dumb.h" | ||
23 | #include "internal/dumb.h" | ||
24 | |||
25 | |||
26 | |||
27 | /* You have to specify the type of sigdata, proving you know what to do with | ||
28 | * the pointer. If you get it wrong, you can expect NULL back. | ||
29 | */ | ||
30 | sigdata_t *duh_get_raw_sigdata(DUH *duh, int sig, long type) | ||
31 | { | ||
32 | DUH_SIGNAL *signal; | ||
33 | |||
34 | if (!duh) return NULL; | ||
35 | |||
36 | if ((unsigned int)sig >= (unsigned int)duh->n_signals) return NULL; | ||
37 | |||
38 | signal = duh->signal[sig]; | ||
39 | |||
40 | if (signal && signal->desc->type == type) | ||
41 | return signal->sigdata; | ||
42 | |||
43 | return NULL; | ||
44 | } | ||