BlueTank ACB-BF592
Revision | d57a6af28bb80143800956d8501aa370defdc9b0 (tree) |
---|---|
Time | 2012-09-09 10:21:41 |
Author | Shinichiro <shinta.main.jp@gmai...> |
Commiter | Shinichiro |
Added for UZURA.
@@ -0,0 +1,81 @@ | ||
1 | + | |
2 | +=========================================== | |
3 | + | |
4 | + Petit Audio Framework | |
5 | + | |
6 | + # # ####### # # ###### # | |
7 | + # # # # # # # # # | |
8 | + # # # # # # # # # | |
9 | + # # # # # ###### # # | |
10 | + # # # # # # # ####### | |
11 | + # # # # # # # # # | |
12 | + ##### ####### ##### # # # # | |
13 | + | |
14 | + Copyright(C) 2012 Shinichiro Nakamura | |
15 | + | |
16 | +=========================================== | |
17 | + | |
18 | +1. What's the UZURA? | |
19 | + | |
20 | + UZURA is a audio framework using micro controller. | |
21 | + It provides simple API for processing audio data. | |
22 | + | |
23 | +2. Application Interfaces | |
24 | + | |
25 | + 2-1. The handler and the fields | |
26 | + | |
27 | + 2-1-1. UZURA handler | |
28 | + | |
29 | + typedef struct UZURA UZURA; | |
30 | + | |
31 | + UZURA handler is the UZURA handler. | |
32 | + | |
33 | + #define UZURA_LEVEL_INPUT(P) ((P)->input) | |
34 | + #define UZURA_LEVEL_OUTPUT(P) ((P)->output) | |
35 | + #define UZURA_USER_DATA(P) ((P)->user_data) | |
36 | + | |
37 | + /** | |
38 | + * @brief Volume Memory. | |
39 | + */ | |
40 | + typedef struct { | |
41 | + uint32_t left; /**< Left. */ | |
42 | + uint32_t right; /**< Right. */ | |
43 | + } level_t; | |
44 | + | |
45 | + struct UZURA { | |
46 | + UZURA_EFFECT_FUNC effect; /**< Effect callback. */ | |
47 | + UZURA_SYSTEM_FUNC system; /**< System callback. */ | |
48 | + level_t input; /**< Input volume. */ | |
49 | + level_t output; /**< Output volume. */ | |
50 | + void *user_data; /**< User external object. */ | |
51 | + }; | |
52 | + | |
53 | + 2-2. The callback functions | |
54 | + | |
55 | + 2-1-2. Effect callback function | |
56 | + | |
57 | + typedef void (*UZURA_EFFECT_FUNC)(UZURA *p, const int32_t *src, int32_t *des, int32_t count); | |
58 | + | |
59 | + UZURA_EFFECT_FUNC is the UZURA effect callback function. | |
60 | + | |
61 | + 2-1.3. System callback function | |
62 | + | |
63 | + typedef void (*UZURA_SYSTEM_FUNC)(UZURA *p); | |
64 | + | |
65 | + UZURA_SYSTEM_FUNC is the UZURA system callback function. | |
66 | + | |
67 | + 2-3. UZURA Application interfaces | |
68 | + | |
69 | + 2-3-1. Initializer | |
70 | + | |
71 | + void uzura_init(UZURA *p, void *user_data); | |
72 | + | |
73 | + 2-3-2. Setup functions | |
74 | + | |
75 | + void uzura_set_effect(UZURA *p, UZURA_EFFECT_FUNC effect); | |
76 | + void uzura_set_system(UZURA *p, UZURA_SYSTEM_FUNC system); | |
77 | + | |
78 | + 2-3-3. Execute | |
79 | + | |
80 | + void uzura_execute(UZURA *p); | |
81 | + |