FreeCalypso > hg > tcs211-l1-reconst
annotate chipsetsw/layer1/audio_cust0/l1audio_cust.c @ 277:c33c56a03312
l1audio_cust.c: initial import from LoCosto source
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 14 Mar 2017 04:20:44 +0000 |
parents | e92a17fee1c1 |
children | 65afc3a5f6b0 |
rev | line source |
---|---|
277
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1 /************* Revision Controle System Header ************* |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2 * GSM Layer 1 software |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
3 * L1AUDIO_CUST.C |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
4 * |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
5 * Filename l1audio_cust.c |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
6 * Copyright 2003 (C) Texas Instruments |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
7 * |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
8 ************* Revision Controle System Header *************/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
9 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
10 /************************************/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
11 /* Include files... */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
12 /************************************/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
13 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
14 #include "l1_macro.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
15 #include "l1_confg.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
16 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
17 #if (AUDIO_TASK == 1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
18 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
19 #include "l1_types.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
20 #include "sys_types.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
21 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
22 #if (CODE_VERSION == SIMULATION) && (AUDIO_SIMULATION) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
23 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
24 #include "tc_defs.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
25 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
26 #include <stdlib.h> |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
27 #include <string.h> |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
28 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
29 #include "iq.h" // Debug / Init hardware ("eva3.lib") |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
30 #include "l1_ver.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
31 #include "l1_const.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
32 #include "l1_signa.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
33 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
34 #if TESTMODE |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
35 #include "l1tm_defty.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
36 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
37 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
38 #include "l1audio_const.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
39 #include "l1audio_cust.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
40 #include "l1audio_defty.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
41 #include "l1audio_msgty.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
42 #include "l1audio_varex.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
43 #include "l1audio_signa.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
44 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
45 #if (L1_GTT == 1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
46 #include "l1gtt_const.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
47 #include "l1gtt_defty.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
48 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
49 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
50 #if (L1_MP3 == 1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
51 #include "l1mp3_defty.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
52 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
53 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
54 #if (L1_MIDI == 1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
55 #include "l1midi_defty.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
56 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
57 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
58 #if (L1_AAC == 1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
59 #include "l1aac_defty.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
60 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
61 #include "l1_defty.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
62 #include "cust_os.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
63 #include "l1_msgty.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
64 #include "l1_varex.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
65 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
66 #include "l1_mftab.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
67 #include "l1_tabs.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
68 #include "l1_ctl.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
69 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
70 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
71 #include "l1_time.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
72 #include "l1_scen.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
73 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
74 #if L1_GPRS |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
75 #include "l1p_cons.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
76 #include "l1p_msgt.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
77 #include "l1p_deft.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
78 #include "l1p_vare.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
79 #include "l1p_tabs.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
80 #include "l1p_macr.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
81 #include "l1p_sign.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
82 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
83 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
84 #include "sim_cfg.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
85 #include "sim_cons.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
86 #include "sim_def.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
87 #include "sim_var.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
88 #include "sim_prot.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
89 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
90 #include "audio_sim_cons.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
91 #include "audio_sim_def.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
92 #include "mmi_simul.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
93 #include "audio_sim_var.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
94 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
95 #else |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
96 // Layer1 and debug include files. |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
97 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
98 #include <ctype.h> |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
99 #include <string.h> |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
100 #include <math.h> |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
101 #include "l1_ver.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
102 #include "l1_const.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
103 #include "l1_signa.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
104 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
105 #if TESTMODE |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
106 #include "l1tm_defty.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
107 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
108 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
109 #include "l1audio_const.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
110 #include "l1audio_cust.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
111 #include "l1audio_defty.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
112 #include "l1audio_msgty.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
113 #include "l1audio_varex.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
114 #include "l1audio_signa.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
115 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
116 #if (L1_GTT == 1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
117 #include "l1gtt_const.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
118 #include "l1gtt_defty.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
119 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
120 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
121 #if (L1_MP3 == 1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
122 #include "l1mp3_defty.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
123 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
124 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
125 #if (L1_MIDI == 1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
126 #include "l1midi_defty.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
127 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
128 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
129 #include "l1_defty.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
130 #include "cust_os.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
131 #include "l1_msgty.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
132 #include "tpudrv.h" // TPU drivers. ("eva3.lib") |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
133 #include "l1_varex.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
134 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
135 #include "l1_proto.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
136 #include "l1_mftab.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
137 #include "l1_tabs.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
138 #include "mem.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
139 #include "armio.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
140 #include "timer.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
141 #include "timer1.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
142 #include "dma.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
143 #include "inth.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
144 #include "ulpd.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
145 #include "rhea_arm.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
146 #include "clkm.h" // Clockm ("eva3.lib") |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
147 #include "l1_ctl.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
148 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
149 #include "l1_time.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
150 #if L2_L3_SIMUL |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
151 #include "l1_scen.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
152 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
153 #if (AUDIO_L1_STANDALONE) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
154 #include "mmi_simul.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
155 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
156 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
157 #if (OP_RIV_AUDIO == 1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
158 #if (MELODY_E1) || (VOICE_MEMO) || (SPEECH_RECO) || (L1_EXT_AUDIO_MGT) || (MELODY_E2) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
159 #include "rv_general.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
160 #include "audio_api.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
161 #include "audio_structs_i.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
162 #include "audio_var_i.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
163 #include "audio_ffs_i.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
164 #include "audio_const_i.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
165 #include "audio_error_hdlr_i.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
166 #include "ffs/ffs_api.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
167 #include "audio_macro_i.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
168 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
169 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
170 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
171 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
172 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
173 #include "l1_trace.h" |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
174 //extern void L1_trace_string(char *s); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
175 //extern void L1_trace_char (char s); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
176 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
177 /**************************************/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
178 /* Prototypes for L1 ASYNCH task */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
179 /**************************************/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
180 #if (SPEECH_RECO) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
181 void Cust_srback_save_model (UWORD8 database, UWORD8 index, API *RAM_address); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
182 void Cust_srback_save_speech (UWORD8 database, UWORD8 index, UWORD16 *start_buffer, UWORD16 *stop_buffer, UWORD16 *start_speech, UWORD16 *stop_speech); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
183 void Cust_srback_load_model (UWORD8 database, UWORD8 index, API *RAM_address); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
184 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
185 UWORD8 Cust_get_pointer (UWORD16 **ptr, UWORD16 *buffer_size, UWORD8 session_id); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
186 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
187 #if (L1_EXT_AUDIO_MGT) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
188 void Cust_ext_audio_mgt_hisr(void); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
189 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
190 void l1a_bt_audio_noti_process(void); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
191 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
192 /**************************************/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
193 /* External prototypes */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
194 /**************************************/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
195 #if (OP_RIV_AUDIO == 1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
196 #if (SPEECH_RECO) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
197 extern void audio_sr_error_trace(UINT8 error_id); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
198 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
199 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
200 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
201 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
202 /***************************************/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
203 /* Global variables for MP3 management */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
204 /***************************************/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
205 #if (L1_MP3 == 1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
206 UWORD8 mp3_tempbuf_idx; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
207 UWORD16 Cust_get_pointer_mp3_last_buffer_size; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
208 BOOL Cust_get_pointer_mp3_buffer_last; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
209 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
210 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
211 /***************************************/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
212 /* Global variables for AAC management */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
213 /***************************************/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
214 #if (L1_AAC == 1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
215 UWORD8 aac_tempbuf_idx; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
216 UWORD16 Cust_get_pointer_aac_last_buffer_size; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
217 BOOL Cust_get_pointer_aac_buffer_last; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
218 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
219 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
220 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
221 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
222 #if (SPEECH_RECO) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
223 /*-------------------------------------------------------*/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
224 /* Cust_srback_save_model() */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
225 /*-------------------------------------------------------*/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
226 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
227 /* Parameters : database */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
228 /* index */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
229 /* RAM_address */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
230 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
231 /* Return : none */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
232 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
233 /* Description : save the model into a database. */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
234 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
235 /*-------------------------------------------------------*/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
236 void Cust_srback_save_model (UWORD8 database, UWORD8 index, API *RAM_address) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
237 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
238 #if (AUDIO_SIMULATION) || (AUDIO_L1_STANDALONE) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
239 UWORD16 model_size; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
240 UWORD16 *ptr_dst; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
241 UWORD8 frame_size; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
242 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
243 // initialize the pointer to the database |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
244 ptr_dst = sr_mmi_database[database][index].model; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
245 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
246 // look the size of the model in model frame unit (16 words unit) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
247 model_size = *RAM_address++; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
248 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
249 // save the header of the model |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
250 *ptr_dst++ = model_size; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
251 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
252 while( (model_size != 0) && |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
253 (l1_srback_com.emergency_stop == FALSE) ) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
254 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
255 frame_size = SC_SR_MODEL_FRAME_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
256 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
257 while ( (frame_size != 0) && |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
258 (l1_srback_com.emergency_stop == FALSE) ) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
259 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
260 *ptr_dst++ = *RAM_address++; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
261 frame_size--; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
262 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
263 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
264 model_size--; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
265 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
266 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
267 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
268 #if (OP_RIV_AUDIO == 1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
269 T_FFS_FD ffs_fd; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
270 UWORD16 model_size; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
271 UWORD8 i; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
272 char *p_model_path; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
273 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
274 if (p_audio_gbl_var->speech_reco.sr_enroll.state != AUDIO_SR_ENROLL_IDLE) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
275 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
276 ffs_fd = p_audio_gbl_var->speech_reco.sr_enroll.sr_ffs_fd; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
277 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
278 else |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
279 if (p_audio_gbl_var->speech_reco.sr_update.state != AUDIO_SR_UPDATE_IDLE) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
280 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
281 /* reach the path of the corresponding model */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
282 p_model_path = p_audio_gbl_var->speech_reco.sr_update.p_database; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
283 for (i=0; i<index; i++) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
284 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
285 p_model_path += AUDIO_PATH_NAME_MAX_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
286 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
287 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
288 ffs_fd = ffs_open(p_model_path, |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
289 FFS_O_CREATE | FFS_O_WRONLY | FFS_O_TRUNC | FFS_O_APPEND); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
290 if ( ffs_fd <= 0) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
291 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
292 audio_sr_error_trace(AUDIO_ENTITY_MODEL_NO_SAVED); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
293 return; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
294 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
295 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
296 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
297 /* look the size of the model in model frame unit (16 words unit) */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
298 model_size = ((*RAM_address)<<1); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
299 model_size *= SC_SR_MODEL_FRAME_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
300 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
301 /* save the model in flash */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
302 if (ffs_write(ffs_fd, (void *)RAM_address, model_size) <= EFFS_OK) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
303 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
304 audio_sr_error_trace(AUDIO_ENTITY_MODEL_NO_SAVED); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
305 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
306 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
307 /* close the model file flash */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
308 if (ffs_close(ffs_fd) != EFFS_OK) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
309 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
310 audio_sr_error_trace(AUDIO_ENTITY_MODEL_NO_SAVED); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
311 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
312 #endif // OP_RIV_AUDIO |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
313 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
314 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
315 /*-------------------------------------------------------*/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
316 /* Cust_srback_save_speech() */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
317 /*-------------------------------------------------------*/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
318 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
319 /* Parameters : database */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
320 /* index */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
321 /* start_buffer */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
322 /* stop_buffer */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
323 /* start_speech */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
324 /* stop_speech */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
325 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
326 /* Return : none */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
327 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
328 /* Description : save the speech from a circular buffer */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
329 /* to a database. And add the end VM mask */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
330 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
331 /*-------------------------------------------------------*/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
332 void Cust_srback_save_speech (UWORD8 database, UWORD8 index, UWORD16 *start_buffer, UWORD16 *stop_buffer, UWORD16 *start_speech, UWORD16 *stop_speech) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
333 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
334 #if (AUDIO_SIMULATION) || (AUDIO_L1_STANDALONE) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
335 UWORD16 *ptr_dst; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
336 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
337 // initialize the pointer to the database |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
338 ptr_dst = sr_mmi_database[database][index].speech; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
339 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
340 // The speech samples can be in two positions in the circular buffer: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
341 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
342 // Position 1: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
343 // [.............XXXXXXXXXXXXX.............] |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
344 // ^ ^ ^ ^ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
345 // | | | | |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
346 // start_buffer start_speech stop_speech stop_buffer |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
347 if (start_speech < stop_speech) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
348 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
349 while ( (start_speech < stop_speech) && |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
350 (l1_srback_com.emergency_stop == FALSE) ) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
351 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
352 *ptr_dst++ = *start_speech++; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
353 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
354 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
355 // Write the end VM mask |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
356 *ptr_dst = SC_VM_END_MASK; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
357 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
358 else |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
359 // Position 2: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
360 // [XXXXXXXXXXXX..............XXXXXXXXXXXXX] |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
361 // ^ ^ ^ ^ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
362 // | | | | |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
363 // start_buffer stop_speech start_speech stop_buffer |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
364 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
365 while ( (start_speech < stop_buffer) && |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
366 (l1_srback_com.emergency_stop == FALSE) ) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
367 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
368 *ptr_dst++ = *start_speech++; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
369 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
370 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
371 while ( (start_buffer < stop_speech) && |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
372 (l1_srback_com.emergency_stop == FALSE) ) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
373 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
374 *ptr_dst++ = *start_buffer++; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
375 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
376 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
377 // Write the end VM mask |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
378 *ptr_dst = SC_VM_END_MASK; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
379 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
380 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
381 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
382 #if (OP_RIV_AUDIO == 1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
383 T_FFS_FD ffs_fd; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
384 UWORD16 speech_size; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
385 char *p_model_path, |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
386 sr_speech_path[AUDIO_SR_PATH_NAME_MAX_SIZE]; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
387 UWORD8 i; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
388 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
389 if (p_audio_gbl_var->speech_reco.sr_enroll.state !=AUDIO_SR_ENROLL_IDLE ) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
390 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
391 ffs_fd = p_audio_gbl_var->speech_reco.sr_enroll.voice_ffs_fd; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
392 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
393 else |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
394 if (p_audio_gbl_var->speech_reco.sr_update.state != AUDIO_SR_UPDATE_IDLE) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
395 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
396 /* reach the path of the corresponding model */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
397 p_model_path = p_audio_gbl_var->speech_reco.sr_update.p_database; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
398 for (i=0; i<index; i++) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
399 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
400 p_model_path += AUDIO_PATH_NAME_MAX_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
401 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
402 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
403 /* build the speech path name */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
404 speech_size = ( strlen(p_model_path)- 3); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
405 strncpy(sr_speech_path, p_model_path, speech_size); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
406 sr_speech_path[speech_size] = 0; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
407 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
408 ffs_fd = ffs_open(sr_speech_path, |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
409 FFS_O_CREATE | FFS_O_WRONLY | FFS_O_TRUNC | FFS_O_APPEND); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
410 if (ffs_fd <= 0) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
411 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
412 audio_sr_error_trace(AUDIO_ENTITY_SPEECH_NO_SAVED); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
413 return; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
414 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
415 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
416 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
417 // The speech samples can be in two positions in the circular buffer: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
418 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
419 // Position 1: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
420 // [.............XXXXXXXXXXXXX.............] |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
421 // ^ ^ ^ ^ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
422 // | | | | |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
423 // start_buffer start_speech stop_speech stop_buffer |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
424 if (start_speech < stop_speech) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
425 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
426 /* Calculate the size of the speech file */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
427 speech_size = (stop_speech - start_speech)<<1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
428 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
429 /* save the model in flash */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
430 if (ffs_write(ffs_fd, (void *)start_speech, speech_size) <= EFFS_OK) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
431 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
432 audio_sr_error_trace(AUDIO_ENTITY_SPEECH_NO_SAVED); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
433 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
434 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
435 else |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
436 // Position 2: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
437 // [XXXXXXXXXXXX..............XXXXXXXXXXXXX] |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
438 // ^ ^ ^ ^ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
439 // | | | | |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
440 // start_buffer stop_speech start_speech stop_buffer |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
441 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
442 /* Calculate the size of the speech file */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
443 speech_size = (stop_buffer - start_speech)<<1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
444 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
445 /* save the model in flash */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
446 if (ffs_write(ffs_fd, (void *)start_speech, speech_size) <= EFFS_OK) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
447 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
448 audio_sr_error_trace(AUDIO_ENTITY_SPEECH_NO_SAVED); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
449 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
450 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
451 /* Calculate the size of the speech file */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
452 speech_size = (stop_speech - start_buffer)<<1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
453 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
454 /* save the model in flash */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
455 if (ffs_write(ffs_fd, (void *)start_speech, speech_size) <= EFFS_OK) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
456 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
457 audio_sr_error_trace(AUDIO_ENTITY_SPEECH_NO_SAVED); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
458 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
459 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
460 // Write the end VM mask |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
461 speech_size = SC_VM_END_MASK; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
462 if (ffs_write(ffs_fd, (void *)(&speech_size), 2) <= EFFS_OK) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
463 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
464 audio_sr_error_trace(AUDIO_ENTITY_MODEL_NO_SAVED); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
465 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
466 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
467 /* close the speech file flash */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
468 if (ffs_close(ffs_fd) != EFFS_OK) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
469 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
470 audio_sr_error_trace(AUDIO_ENTITY_MODEL_NO_SAVED); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
471 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
472 #endif // OP_RIV_AUDIO |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
473 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
474 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
475 /*-------------------------------------------------------*/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
476 /* Cust_srback_load_model() */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
477 /*-------------------------------------------------------*/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
478 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
479 /* Parameters : database */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
480 /* index */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
481 /* RAM_address */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
482 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
483 /* Return : none */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
484 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
485 /* Description : load the model into the API. */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
486 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
487 /*-------------------------------------------------------*/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
488 void Cust_srback_load_model (UWORD8 database, UWORD8 index, API *RAM_address) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
489 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
490 #if (AUDIO_SIMULATION) || (AUDIO_L1_STANDALONE) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
491 UWORD16 model_size; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
492 UWORD16 *ptr_src; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
493 UWORD8 frame_size; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
494 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
495 // initialize the pointer to the database |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
496 ptr_src = sr_mmi_database[database][index].model; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
497 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
498 // look the size of the model in model frame unit (16 words unit) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
499 model_size = *ptr_src++; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
500 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
501 // save the header of the model |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
502 *RAM_address++ = model_size; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
503 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
504 while( (model_size != 0) && |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
505 (l1_srback_com.emergency_stop == FALSE) ) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
506 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
507 frame_size = SC_SR_MODEL_FRAME_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
508 while ( (frame_size != 0) && |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
509 (l1_srback_com.emergency_stop == FALSE) ) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
510 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
511 *RAM_address++ = *ptr_src++; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
512 frame_size--; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
513 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
514 model_size--; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
515 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
516 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
517 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
518 #if (OP_RIV_AUDIO == 1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
519 char *p_model_path; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
520 T_FFS_FD ffs_fd; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
521 UWORD8 i; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
522 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
523 if (p_audio_gbl_var->speech_reco.sr_reco.state !=AUDIO_SR_RECO_IDLE ) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
524 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
525 p_model_path = p_audio_gbl_var->speech_reco.sr_reco.p_database; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
526 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
527 else |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
528 if (p_audio_gbl_var->speech_reco.sr_update.state != AUDIO_SR_UPDATE_IDLE) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
529 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
530 p_model_path = p_audio_gbl_var->speech_reco.sr_update.p_database; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
531 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
532 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
533 /* reach the path of the corresponding model */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
534 for (i=0; i<index; i++) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
535 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
536 p_model_path += AUDIO_PATH_NAME_MAX_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
537 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
538 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
539 /* open the model file flash */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
540 ffs_fd = ffs_open(p_model_path, FFS_O_RDONLY); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
541 if ( ffs_fd <= 0) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
542 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
543 audio_sr_error_trace(AUDIO_ENTITY_MODEL_NO_LOAD); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
544 return; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
545 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
546 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
547 /* download the model to the API buffer */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
548 if (ffs_read(ffs_fd, (void *)RAM_address, (SC_SR_MODEL_API_SIZE<<1)) <= EFFS_OK) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
549 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
550 audio_sr_error_trace(AUDIO_ENTITY_MODEL_NO_LOAD); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
551 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
552 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
553 /* close the model file flash */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
554 if (ffs_close(ffs_fd) != EFFS_OK) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
555 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
556 audio_sr_error_trace(AUDIO_ENTITY_MODEL_NO_LOAD); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
557 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
558 #endif // OP_RIV_AUDIO |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
559 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
560 #endif // SPEECH_RECO |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
561 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
562 /*-------------------------------------------------------*/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
563 /* Cust_get_pointer */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
564 /*-------------------------------------------------------*/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
565 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
566 /* Parameters : ptr */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
567 /* buffer_size */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
568 /* session_id */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
569 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
570 /* Return : error_id : */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
571 /* DATA_AVAILABLE: 0, no error occured */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
572 /* SESSION_ERROR: 1, wrong session id */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
573 /* POINTER_ERROR: 2, wrong ptr */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
574 /* DATA_AVAIL_ERROR: 3, no more data */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
575 /* available */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
576 /* DATA_LAST: 4, last buffer available */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
577 /* buffer_size */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
578 /* ptr */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
579 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
580 /* Description : */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
581 /* The L1 calls this function to request new data buffer */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
582 /* (requested size: buffer_size). This function returns */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
583 /* the description of the new data buffer */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
584 /* (start address: ptr and the size: buffer_size) */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
585 /* Moreover, the L1 indicates the position of the last */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
586 /* data used via the ptr argument. */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
587 /* Note that this function can be returns an error. */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
588 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
589 /*-------------------------------------------------------*/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
590 UWORD8 Cust_get_pointer (UWORD16 **ptr, UWORD16 *buffer_size, UWORD8 session_id) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
591 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
592 #if (AUDIO_SIMULATION) || (AUDIO_L1_STANDALONE) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
593 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
594 UWORD8 database_id, word_index; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
595 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
596 switch (session_id & 0x0F) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
597 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
598 #if (MELODY_E1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
599 // Melody E1 0 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
600 case 0: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
601 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
602 if (*ptr == NULL) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
603 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
604 *ptr = (UWORD16 *)&melody_0; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
605 *buffer_size = SC_MELODY_0_SCORE_SIZE>>1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
606 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
607 else |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
608 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
609 *buffer_size = SC_MELODY_0_SCORE_SIZE>>1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
610 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
611 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
612 return(DATA_AVAILABLE); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
613 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
614 //omaps00090550 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
615 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
616 // Melody E1 1 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
617 case 1: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
618 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
619 if (*ptr == NULL) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
620 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
621 *ptr = (UWORD16 *)&melody_1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
622 *buffer_size = SC_MELODY_1_SCORE_SIZE>>1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
623 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
624 else |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
625 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
626 *buffer_size = SC_MELODY_1_SCORE_SIZE>>1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
627 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
628 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
629 return(DATA_AVAILABLE); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
630 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
631 //omaps00090550 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
632 #endif // MELODY_E1 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
633 #if (VOICE_MEMO) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
634 // Voice memo play |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
635 case 2: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
636 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
637 if (*ptr == NULL) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
638 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
639 *ptr = (UWORD16 *)&voice_memo_buffer; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
640 *buffer_size = SC_VM_BUFFER_SIZE>>1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
641 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
642 else |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
643 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
644 *buffer_size = (SC_VM_BUFFER_SIZE>>1) + 1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
645 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
646 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
647 return(DATA_AVAILABLE); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
648 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
649 //omaps00090550 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
650 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
651 // Voice memo record |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
652 case 3: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
653 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
654 if (*ptr == NULL) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
655 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
656 *ptr = (UWORD16 *)&voice_memo_buffer; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
657 *buffer_size = SC_VM_BUFFER_SIZE>>1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
658 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
659 else |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
660 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
661 *buffer_size = (SC_VM_BUFFER_SIZE>>1) + 1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
662 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
663 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
664 return(DATA_AVAILABLE); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
665 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
666 //omaps00090550 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
667 #endif // VOICE_MEMO |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
668 #if (SPEECH_RECO) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
669 case 4: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
670 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
671 database_id = 0; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
672 word_index = (session_id & 0xF0)>>4; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
673 *ptr = (UWORD16 *)&(sr_mmi_database[database_id][word_index].speech); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
674 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
675 *buffer_size = SC_SR_MMI_DB_SPEECH_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
676 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
677 return(DATA_AVAILABLE); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
678 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
679 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
680 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
681 case 5: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
682 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
683 database_id = 1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
684 word_index = (session_id & 0xF0)>>4; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
685 *ptr = (UWORD16 *)&(sr_mmi_database[database_id][word_index].speech); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
686 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
687 *buffer_size = SC_SR_MMI_DB_SPEECH_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
688 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
689 return(DATA_AVAILABLE); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
690 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
691 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
692 #endif // SPEECH_RECO |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
693 #if (MELODY_E2 && FIR) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
694 // Melody E2 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
695 // Tchaikowski |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
696 case 6: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
697 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
698 if (*ptr == NULL) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
699 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
700 *ptr = (UWORD16 *)&Tchaikowski_danse_russe; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
701 *buffer_size = TCHAIKOWSKI_DANSE_RUSSE>>1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
702 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
703 else |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
704 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
705 *buffer_size = TCHAIKOWSKI_DANSE_RUSSE>>1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
706 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
707 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
708 return(DATA_AVAILABLE); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
709 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
710 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
711 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
712 // Small melody |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
713 case 7: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
714 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
715 if (*ptr == NULL) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
716 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
717 *ptr = (UWORD16 *)&Small_melody_E2; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
718 *buffer_size = SMALL_MELODY_E2>>1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
719 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
720 else |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
721 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
722 *buffer_size = SMALL_MELODY_E2>>1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
723 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
724 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
725 return(DATA_AVAILABLE); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
726 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
727 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
728 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
729 // CPU load |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
730 case 8: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
731 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
732 if (*ptr == NULL) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
733 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
734 *ptr = (UWORD16 *)&Cpu_load_E2; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
735 *buffer_size = CPU_LOAD_E2>>1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
736 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
737 else |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
738 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
739 *buffer_size = CPU_LOAD_E2>>1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
740 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
741 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
742 return(DATA_AVAILABLE); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
743 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
744 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
745 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
746 // USA hymn |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
747 case 9: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
748 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
749 if (*ptr == NULL) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
750 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
751 *ptr = (UWORD16 *)&Usa_E2; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
752 *buffer_size = USA_E2>>1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
753 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
754 else |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
755 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
756 *buffer_size = USA_E2>>1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
757 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
758 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
759 return(DATA_AVAILABLE); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
760 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
761 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
762 #endif // MELODY_E2 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
763 #if (L1_VOICE_MEMO_AMR) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
764 // Voice memo amr play |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
765 case 10: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
766 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
767 if (*ptr == NULL) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
768 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
769 *ptr = (UWORD16 *)&voice_memo_buffer; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
770 *buffer_size = SC_VM_BUFFER_SIZE>>1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
771 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
772 else |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
773 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
774 *buffer_size = (SC_VM_BUFFER_SIZE>>1) + 1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
775 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
776 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
777 return(DATA_AVAILABLE); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
778 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
779 //omaps00090550 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
780 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
781 // Voice memo record |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
782 case 11: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
783 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
784 if (*ptr == NULL) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
785 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
786 *ptr = (UWORD16 *)&voice_memo_buffer; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
787 *buffer_size = SC_VM_BUFFER_SIZE>>1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
788 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
789 else |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
790 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
791 *buffer_size = (SC_VM_BUFFER_SIZE>>1) + 1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
792 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
793 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
794 return(DATA_AVAILABLE); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
795 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
796 //omaps00090550 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
797 #endif // L1_VOICE_MEMO_AMR |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
798 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
799 #if (L1_MIDI == 1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
800 // MIDI |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
801 case 12: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
802 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
803 extern struct MIDI_FILE midi_file; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
804 UWORD8 **ptr_char=(UWORD8 **)ptr; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
805 static UWORD8 *last_ptr; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
806 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
807 if(*ptr_char==NULL) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
808 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
809 midi_file_offset=0; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
810 *ptr_char=&(midi_file.midi_file_buffer[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
811 last_ptr=*ptr_char; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
812 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
813 // All MIDI file available due to SMF1 format constraints |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
814 // For SMF0, *buffer_size should be set to MIDI_BUFFER_SIZE |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
815 *buffer_size=midi_file.midi_file_size; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
816 return DATA_LAST; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
817 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
818 else |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
819 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
820 *buffer_size=MIDI_BUFFER_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
821 *ptr_char=last_ptr+MIDI_BUFFER_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
822 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
823 // Check if pointer is out of bounds |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
824 if(*ptr_char > &(midi_file.midi_file_buffer[0])+midi_file.midi_file_size-1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
825 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
826 *ptr_char=&(midi_file.midi_file_buffer[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
827 return DATA_AVAIL_ERROR; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
828 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
829 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
830 // Check if it's the last valid buffer |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
831 if((*ptr_char+*buffer_size) > &(midi_file.midi_file_buffer[0])+midi_file.midi_file_size-1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
832 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
833 *buffer_size=MIDI_BUFFER_SIZE-(UWORD16)(*ptr_char+MIDI_BUFFER_SIZE-&(midi_file.midi_file_buffer[0])-midi_file.midi_file_size+1); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
834 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
835 // Update offset in the MIDI file |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
836 midi_file_offset+=*ptr_char-last_ptr; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
837 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
838 last_ptr=*ptr_char; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
839 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
840 return DATA_LAST; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
841 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
842 else |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
843 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
844 // Update offset in the MIDI file |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
845 midi_file_offset+=*ptr_char-last_ptr; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
846 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
847 last_ptr=*ptr_char; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
848 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
849 return DATA_AVAILABLE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
850 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
851 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
852 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
853 #endif // L1_MIDI |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
854 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
855 #if L1_PCM_EXTRACTION |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
856 case 13: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
857 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
858 *ptr = (UWORD16 *)&pcm_download_buffer; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
859 *buffer_size = SC_PCM_DOWNLOAD_BUFFER_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
860 return DATA_AVAILABLE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
861 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
862 //omaps00090550 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
863 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
864 case 14: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
865 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
866 *ptr = (UWORD16 *)&pcm_upload_buffer; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
867 *buffer_size = SC_PCM_UPLOAD_BUFFER_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
868 return DATA_AVAILABLE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
869 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
870 //omaps00090550 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
871 #endif /* L1_PCM_EXTRACTION */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
872 default: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
873 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
874 return(SESSION_ERROR); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
875 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
876 //omaps00090550 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
877 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
878 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
879 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
880 #if (OP_RIV_AUDIO == 1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
881 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
882 #if (MELODY_E1) || (VOICE_MEMO) || (MELODY_E2) || (L1_VOICE_MEMO_AMR) || (L1_EXT_AUDIO_MGT) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
883 UWORD8 index_l1, *current_ptr_8; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
884 UWORD16 *current_ptr, *size_ptr, *end_ptr; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
885 UWORD32 current, end; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
886 T_AUDIO_FFS_SESSION *p_session; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
887 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
888 #if (L1_AUDIO_DRIVER == 1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
889 T_AUDIO_DRIVER_SESSION *p_driver_session = NULL; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
890 UINT8 channel_id; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
891 xSignalHeaderRec *msg; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
892 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
893 /* special handling for features in driver */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
894 if ((session_id == AUDIO_VM_AMR_RECORD_SESSION_ID) || |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
895 (session_id == AUDIO_VM_AMR_PLAY_SESSION_ID) || |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
896 (session_id == AUDIO_EXT_MIDI_SESSION_ID)) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
897 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
898 channel_id = 0; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
899 /* find active channel_id associated to session_id */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
900 while ( (channel_id < AUDIO_DRIVER_MAX_CHANNEL)&& |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
901 ((p_audio_gbl_var->audio_driver_session[channel_id].session_info.state == AUDIO_DRIVER_CHANNEL_WAIT_INIT)|| |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
902 (p_audio_gbl_var->audio_driver_session[channel_id].session_req.session_id != session_id)) ) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
903 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
904 channel_id++; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
905 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
906 /* get driver session */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
907 if(channel_id < AUDIO_DRIVER_MAX_CHANNEL) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
908 p_driver_session = &(p_audio_gbl_var->audio_driver_session[channel_id]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
909 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
910 /* first buffer, index_l1 = 0 */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
911 if(p_driver_session != NULL) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
912 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
913 if (*ptr == NULL) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
914 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
915 *ptr = (UWORD16 *)(p_driver_session->session_info.buffer[0].p_start_pointer); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
916 *buffer_size = (p_driver_session->session_info.buffer[0].size >> 1); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
917 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
918 return(DATA_AVAILABLE); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
919 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
920 /* following buffers */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
921 else |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
922 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
923 /* prepare notification */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
924 msg = os_alloc_sig(sizeof(T_L1_AUDIO_DRIVER_IND)); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
925 DEBUGMSG(status,NU_ALLOC_ERR) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
926 msg->SignalCode = L1_AUDIO_DRIVER_IND; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
927 ((T_L1_AUDIO_DRIVER_IND *)msg->SigP)->channel_id = channel_id; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
928 ((T_L1_AUDIO_DRIVER_IND *)msg->SigP)->p_buffer = NULL; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
929 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
930 /* fill message with current buffer for record */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
931 index_l1 = p_driver_session->session_info.index_l1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
932 if (session_id == AUDIO_VM_AMR_RECORD_SESSION_ID) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
933 ((T_L1_AUDIO_DRIVER_IND *)msg->SigP)->p_buffer = |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
934 (UWORD16 *)p_driver_session->session_info.buffer[index_l1].p_start_pointer; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
935 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
936 /* give new buffer = index_l1++ % nb_buffer */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
937 p_driver_session->session_info.index_l1++; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
938 if ((p_driver_session->session_info.index_l1) == (p_driver_session->session_req.nb_buffer)) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
939 p_driver_session->session_info.index_l1 =(UINT8)( 0);//omaps |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
940 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
941 /* Update new current buffer parameters */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
942 index_l1 = (UWORD8)(p_driver_session->session_info.index_l1);//oamps |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
943 *ptr = (UWORD16 *)(p_driver_session->session_info.buffer[index_l1].p_start_pointer); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
944 *buffer_size = (p_driver_session->session_info.buffer[index_l1].size >> 1); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
945 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
946 // Send confirmation message... |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
947 os_send_sig(msg, L1C1_QUEUE); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
948 DEBUGMSG(status,NU_SEND_QUEUE_ERR) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
949 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
950 return (DATA_AVAILABLE); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
951 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
952 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
953 return(DATA_AVAIL_ERROR); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
954 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
955 /* Other features */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
956 else |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
957 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
958 #endif // L1_AUDIO_DRIVER |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
959 p_session = &(p_audio_gbl_var->audio_ffs_session[session_id]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
960 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
961 switch (p_session->session_info.cust_get_pointer_state) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
962 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
963 case AUDIO_CUST_GET_POINTER_INIT: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
964 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
965 /* the first buffer, the index_l1 is already OK so the index_l1 doesn't change */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
966 index_l1 = |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
967 p_session->session_info.index_l1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
968 *ptr = |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
969 (UWORD16 *)(p_session->session_info.buffer[index_l1].p_start_pointer); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
970 *buffer_size = |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
971 (p_session->session_info.buffer[index_l1].size>>1); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
972 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
973 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
974 p_session->session_info.cust_get_pointer_state = |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
975 AUDIO_CUST_GET_POINTER_NORMAL; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
976 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
977 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
978 case AUDIO_CUST_GET_POINTER_NORMAL: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
979 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
980 /* in loopback mode, when the melody restarts, the L1 pointer management is different */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
981 if ( (*buffer_size == 0) && |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
982 (p_session->session_req.loop_mode == TRUE) ) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
983 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
984 p_session->session_info.cust_get_pointer_state = |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
985 AUDIO_CUST_GET_POINTER_LOOP; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
986 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
987 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
988 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
989 /* The index_l1 needs to be changed */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
990 p_session->session_info.index_l1++; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
991 if (p_session->session_info.index_l1 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
992 == AUDIO_MAX_FFS_BUFFER_PER_SESSION) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
993 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
994 p_session->session_info.index_l1 = 0; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
995 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
996 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
997 index_l1 = |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
998 p_session->session_info.index_l1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
999 *ptr = |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1000 (UWORD16 *)(p_session->session_info.buffer[index_l1].p_start_pointer); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1001 *buffer_size = |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1002 (p_session->session_info.buffer[index_l1].size>>1); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1003 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1004 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1005 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1006 case AUDIO_CUST_GET_POINTER_LOOP: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1007 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1008 /* in loopback mode, the next melody data is contiguous to the first */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1009 /* if it's the end of the buffer , we use the next buffer */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1010 index_l1 = |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1011 p_session->session_info.index_l1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1012 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1013 current_ptr = (UWORD16 *)(*ptr); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1014 current_ptr_8 = (UWORD8 *)(*ptr); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1015 end_ptr = (UWORD16 *)(p_session->session_info.buffer[index_l1].p_stop_pointer); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1016 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1017 if ( current_ptr >= end_ptr ) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1018 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1019 p_session->session_info.index_l1++; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1020 if (p_session->session_info.index_l1 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1021 == AUDIO_MAX_FFS_BUFFER_PER_SESSION) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1022 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1023 p_session->session_info.index_l1 = 0; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1024 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1025 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1026 index_l1 = |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1027 p_session->session_info.index_l1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1028 *ptr = |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1029 (UWORD16 *)(p_session->session_info.buffer[index_l1].p_start_pointer); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1030 *buffer_size = |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1031 (p_session->session_info.buffer[index_l1].size>>1); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1032 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1033 else |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1034 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1035 // Realign the pointer to the next 16 bit in case of melody E2 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1036 current = (UWORD32)current_ptr_8; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1037 if (current & 0x01) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1038 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1039 current_ptr_8++; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1040 *ptr = (UWORD16 *)current_ptr_8; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1041 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1042 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1043 end = (UWORD32)end_ptr; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1044 current = (UWORD32)current_ptr; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1045 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1046 *buffer_size = (UWORD16)((end-current)>>1); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1047 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1048 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1049 p_session->session_info.cust_get_pointer_state = |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1050 AUDIO_CUST_GET_POINTER_NORMAL; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1051 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1052 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1053 } /* switch(p_session->session_info.cust_get_pointer_state) */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1054 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1055 return(DATA_AVAILABLE); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1056 #if (L1_AUDIO_DRIVER == 1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1057 } // added |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1058 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1059 #endif // MELODY_E1 || VOICE_MEMO || MELODY_E2 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1060 #endif // OP_RIV_AUDIO |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1061 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1062 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1063 #if (AUDIO_SIMULATION) || (AUDIO_L1_STANDALONE) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1064 /*-------------------------------------------------------*/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1065 /* Cust_get_next_buffer_status */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1066 /*-------------------------------------------------------*/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1067 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1068 /* Parameters : */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1069 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1070 /* Return : */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1071 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1072 /* Description : */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1073 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1074 /*-------------------------------------------------------*/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1075 UWORD8 Cust_get_next_buffer_status(void) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1076 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1077 return (FALSE); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1078 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1079 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1080 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1081 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1082 #if (AUDIO_SIMULATION) || (AUDIO_L1_STANDALONE) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1083 /*-------------------------------------------------------*/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1084 /* Cust_get_pointer_next_buffer */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1085 /*-------------------------------------------------------*/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1086 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1087 /* Parameters : ptr */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1088 /* buffer_size */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1089 /* session_id */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1090 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1091 /* Return : error_id : */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1092 /* DATA_AVAILABLE: 0, no error occured */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1093 /* SESSION_ERROR: 1, wrong session id */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1094 /* POINTER_ERROR: 2, wrong ptr */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1095 /* DATA_AVAIL_ERROR: 3, no more data */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1096 /* available */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1097 /* DATA_LAST: 4, returned buffer is the */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1098 /* last */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1099 /* buffer_size */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1100 /* ptr */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1101 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1102 /* Description : */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1103 /* This function acts the same as Cust_get_pointer() but */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1104 /* does not send notification to upper layers to free */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1105 /* current buffer */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1106 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1107 /*-------------------------------------------------------*/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1108 UWORD8 Cust_get_pointer_next_buffer(UWORD16 **ptr, |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1109 UWORD16 *buffer_size, |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1110 UWORD8 session_id) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1111 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1112 #if (L1_MP3 == 1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1113 extern UWORD32 mp3_file_size; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1114 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1115 #if (L1_AAC == 1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1116 extern UWORD32 aac_file_size; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1117 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1118 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1119 switch(session_id&0x0F) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1120 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1121 #if (L1_MP3 == 1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1122 case 13: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1123 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1124 if(*ptr==NULL) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1125 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1126 // Reset flag |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1127 Cust_get_pointer_mp3_buffer_last=FALSE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1128 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1129 // Set pointer to first buffer with corresponding size |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1130 mp3_tempbuf_idx=0; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1131 *ptr=mp3_tempbuf0; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1132 *buffer_size=C_MP3_L1STANDALONE_BUFFER_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1133 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1134 Cust_get_pointer_mp3_last_buffer_size=C_MP3_L1STANDALONE_BUFFER_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1135 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1136 #if (CODE_VERSION == NOT_SIMULATION) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1137 if(mp3_file_size<C_MP3_L1STANDALONE_BUFFER_SIZE) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1138 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1139 *buffer_size=(UWORD16)mp3_file_size; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1140 Cust_get_pointer_mp3_buffer_last=TRUE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1141 return DATA_LAST; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1142 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1143 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1144 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1145 return DATA_AVAILABLE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1146 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1147 else |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1148 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1149 switch(mp3_tempbuf_idx) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1150 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1151 case 0: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1152 *ptr=mp3_tempbuf1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1153 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1154 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1155 case 1: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1156 *ptr=mp3_tempbuf0; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1157 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1158 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1159 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1160 // Swap buffer index |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1161 mp3_tempbuf_idx^=1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1162 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1163 *buffer_size=Cust_get_pointer_mp3_last_buffer_size; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1164 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1165 if(Cust_get_pointer_mp3_buffer_last==FALSE) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1166 return DATA_AVAILABLE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1167 else |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1168 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1169 if(l1a_l1s_com.mp3_task.parameters.loopback==TRUE) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1170 Cust_get_pointer_mp3_buffer_last=FALSE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1171 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1172 return DATA_LAST; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1173 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1174 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1175 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1176 //omaps00090550 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1177 #endif // L1_MP3 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1178 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1179 #if (L1_AAC == 1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1180 case 14: // session id for AAC |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1181 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1182 if(*ptr==NULL) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1183 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1184 // Reset flag |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1185 Cust_get_pointer_aac_buffer_last=FALSE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1186 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1187 // Set pointer to first buffer with corresponding size |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1188 aac_tempbuf_idx=0; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1189 *ptr=aac_tempbuf0; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1190 *buffer_size=C_AAC_L1STANDALONE_BUFFER_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1191 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1192 Cust_get_pointer_aac_last_buffer_size=C_AAC_L1STANDALONE_BUFFER_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1193 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1194 #if (CODE_VERSION == NOT_SIMULATION) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1195 if(aac_file_size<C_AAC_L1STANDALONE_BUFFER_SIZE) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1196 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1197 *buffer_size=(UWORD16)aac_file_size; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1198 Cust_get_pointer_aac_buffer_last=TRUE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1199 return DATA_LAST; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1200 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1201 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1202 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1203 return DATA_AVAILABLE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1204 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1205 else |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1206 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1207 switch(aac_tempbuf_idx) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1208 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1209 case 0: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1210 *ptr=aac_tempbuf1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1211 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1212 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1213 case 1: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1214 *ptr=aac_tempbuf0; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1215 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1216 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1217 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1218 // Swap buffer index |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1219 aac_tempbuf_idx^=1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1220 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1221 *buffer_size=Cust_get_pointer_aac_last_buffer_size; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1222 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1223 if(Cust_get_pointer_aac_buffer_last==FALSE) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1224 return DATA_AVAILABLE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1225 else |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1226 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1227 if(l1a_l1s_com.aac_task.parameters.loopback==TRUE) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1228 Cust_get_pointer_aac_buffer_last=FALSE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1229 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1230 return DATA_LAST; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1231 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1232 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1233 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1234 //omaps00090550 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1235 #endif // L1_AAC |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1236 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1237 default: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1238 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1239 return SESSION_ERROR; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1240 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1241 //omaps00090550 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1242 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1243 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1244 #endif // (AUDIO_SIMULATION) || (AUDIO_L1_STANDALONE) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1245 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1246 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1247 #if (AUDIO_SIMULATION) || (AUDIO_L1_STANDALONE) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1248 /*------------------------------------------------------------------*/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1249 /* Cust_get_pointer_notify */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1250 /*------------------------------------------------------------------*/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1251 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1252 /* Parameters : ptr */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1253 /* session_id */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1254 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1255 /* Return : n/a */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1256 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1257 /* Description : */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1258 /* This function sends notification to upper layers to */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1259 /* fill next buffer. */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1260 /* This function should be used with Cust_get_pointer_next_buffer() */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1261 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1262 /*------------------------------------------------------------------*/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1263 void Cust_get_pointer_notify(UWORD8 session_id) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1264 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1265 switch(session_id&0x0F) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1266 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1267 #if (L1_MP3 == 1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1268 case 13: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1269 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1270 #if (CODE_VERSION == NOT_SIMULATION) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1271 UWORD32 size; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1272 UWORD8 *dst; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1273 extern UWORD32 mp3_file_size; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1274 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1275 // Check if file is ending |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1276 if(mp3_file_offset+C_MP3_L1STANDALONE_BUFFER_SIZE > mp3_file_size) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1277 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1278 size=mp3_file_size-mp3_file_offset; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1279 Cust_get_pointer_mp3_buffer_last=TRUE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1280 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1281 else |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1282 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1283 size=C_MP3_L1STANDALONE_BUFFER_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1284 Cust_get_pointer_mp3_buffer_last=FALSE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1285 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1286 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1287 switch(mp3_tempbuf_idx) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1288 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1289 case 0: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1290 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1291 // L1 is working on buffer 0 -> fill buffer 1 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1292 dst=(UWORD8 *)mp3_tempbuf1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1293 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1294 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1295 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1296 case 1: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1297 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1298 // L1 is working on buffer 1 -> fill buffer 0 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1299 dst=(UWORD8 *)mp3_tempbuf0; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1300 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1301 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1302 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1303 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1304 memcpy(dst,(UWORD8 *)mp3_file+mp3_file_offset,size); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1305 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1306 // Update MP3 read offset |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1307 mp3_file_offset+=C_MP3_L1STANDALONE_BUFFER_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1308 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1309 // Rewind if loopback mode is on |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1310 if((l1a_l1s_com.mp3_task.parameters.loopback==TRUE) && |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1311 (Cust_get_pointer_mp3_buffer_last==TRUE)) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1312 mp3_file_offset=0; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1313 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1314 // Keep track of buffer size |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1315 Cust_get_pointer_mp3_last_buffer_size=(UWORD16)size; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1316 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1317 #else // CODE_VERSION == NOT_SIMULATION |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1318 UWORD16 i; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1319 UWORD8 *dst; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1320 switch(mp3_tempbuf_idx) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1321 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1322 case 0: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1323 dst=(UWORD8 *)mp3_tempbuf1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1324 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1325 case 1: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1326 dst=(UWORD8 *)mp3_tempbuf0; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1327 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1328 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1329 for(i=0; i<C_MP3_L1STANDALONE_BUFFER_SIZE/2; i++) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1330 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1331 dst[2*i] =0x12; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1332 dst[2*i+1]=0x24; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1333 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1334 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1335 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1336 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1337 #endif // L1_MP3 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1338 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1339 #if (L1_AAC == 1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1340 case 14: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1341 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1342 #if (CODE_VERSION == NOT_SIMULATION) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1343 UWORD32 size; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1344 UWORD8 *dst; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1345 extern UWORD32 aac_file_size; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1346 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1347 // Check if file is ending |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1348 if(aac_file_offset+C_AAC_L1STANDALONE_BUFFER_SIZE > aac_file_size) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1349 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1350 size=aac_file_size-aac_file_offset; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1351 Cust_get_pointer_aac_buffer_last=TRUE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1352 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1353 else |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1354 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1355 size=C_AAC_L1STANDALONE_BUFFER_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1356 Cust_get_pointer_aac_buffer_last=FALSE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1357 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1358 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1359 switch(aac_tempbuf_idx) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1360 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1361 case 0: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1362 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1363 // L1 is working on buffer 0 -> fill buffer 1 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1364 dst=(UWORD8 *)aac_tempbuf1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1365 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1366 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1367 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1368 case 1: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1369 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1370 // L1 is working on buffer 1 -> fill buffer 0 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1371 dst=(UWORD8 *)aac_tempbuf0; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1372 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1373 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1374 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1375 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1376 memcpy(dst,(UWORD8 *)aac_file+aac_file_offset,size); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1377 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1378 // Update AAC read offset |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1379 aac_file_offset+=C_AAC_L1STANDALONE_BUFFER_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1380 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1381 // Rewind if loopback mode is on |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1382 if((l1a_l1s_com.aac_task.parameters.loopback==TRUE) && |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1383 (Cust_get_pointer_aac_buffer_last==TRUE)) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1384 aac_file_offset=0; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1385 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1386 // Keep track of buffer size |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1387 Cust_get_pointer_aac_last_buffer_size=(UWORD16)size; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1388 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1389 #else // CODE_VERSION == NOT_SIMULATION |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1390 UWORD16 i; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1391 UWORD8 *dst; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1392 switch(aac_tempbuf_idx) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1393 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1394 case 0: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1395 dst=(UWORD8 *)aac_tempbuf1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1396 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1397 case 1: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1398 dst=(UWORD8 *)aac_tempbuf0; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1399 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1400 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1401 for(i=0; i<C_AAC_L1STANDALONE_BUFFER_SIZE/2; i++) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1402 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1403 dst[2*i] =0x10; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1404 dst[2*i+1]=0x20; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1405 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1406 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1407 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1408 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1409 #endif // L1_AAC |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1410 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1411 } // switch(session_id&0x0F) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1412 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1413 #endif // (AUDIO_SIMULATION) || (AUDIO_L1_STANDALONE) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1414 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1415 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1416 #if (MELODY_E2 && FIR) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1417 /*-------------------------------------------------------*/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1418 /* Cust_audio_melody_E2_load_instrument */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1419 /*-------------------------------------------------------*/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1420 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1421 /* Parameters : customer_instrument_id: */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1422 /* Identifier of the instrument */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1423 /* API_address */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1424 /* address where the insturment */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1425 /* is downloaded */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1426 /* allowed_size */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1427 /* maximum size of the instrument */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1428 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1429 /* Return : instrument_size : */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1430 /* size of the insturment downloaded in */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1431 /* 16-bit word */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1432 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1433 /* Description : */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1434 /* The audio background task calls this function to */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1435 /* request to the MMI to download a new instrument */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1436 /* description at the API_address. */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1437 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1438 /*-------------------------------------------------------*/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1439 UWORD16 Cust_audio_melody_E2_load_instrument (UWORD8 customer_instrument_id, |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1440 API *API_address, |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1441 UWORD16 allowed_size) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1442 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1443 #if (AUDIO_SIMULATION) || (AUDIO_L1_STANDALONE) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1444 UWORD16 instrument_size = 0, i, *instrument_ptr; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1445 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1446 // default.lsi file: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1447 // 0 piano31 0x0 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1448 // 1 piano15 0x1 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1449 // 2 pia_811 0x2 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1450 // 3 eba_2536 0x3 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1451 // 4 tsax_255 0x4 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1452 // 5 asax_124 0x5 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1453 // 6 clar_121 0x6 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1454 // 7 clar_130 0x7 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1455 // 8 stdr_515 0x8 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1456 // 9 timp_661 0x9 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1457 // 10 agog_406 0xA |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1458 // 11 wood_110 0xB |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1459 // 12 vib_3836 0xC |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1460 // 13 xylo_120 0xD |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1461 // 14 xylo_315 0xE |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1462 // 15 xylo_516 0xF |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1463 // 16 kali_215 0x10 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1464 // 17 viol_231 0x11 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1465 // 18 viol_215 0x12 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1466 // 19 viol_211 0x13 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1467 // 20 viol_108 0x14 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1468 // 21 flut_436 0x15 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1469 // 22 flut_308 0x16 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1470 // 23 porg_131 0x17 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1471 // 24 acco_211 0x18 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1472 // 25 stng_231 0x19 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1473 // 26 stng_058 0x1A |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1474 // 27 ldsa_131 0x1B |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1475 // 28 sin7 0x1C |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1476 // 29 egu_3036 0x1D |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1477 // 30 jgui_215 0x1E |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1478 // 31 banj_315 0x1F |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1479 // 32 trum_231 0x20 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1480 // 33 tromb31 0x21 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1481 // 34 cho_2116 0x22 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1482 // 35 vooh_331 0x23 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1483 // 36 crc_1210 0x24 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1484 // 37 chc_1210 0x25 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1485 // 38 ohc_1610 0x26 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1486 // 39 lbon_121 0x27 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1487 // 40 esn_0210 0x28 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1488 // 41 crc_0210 0x29 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1489 // 42 ric_0210 0x2A |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1490 // 43 bdm_0122 0x2B |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1491 // 44 vib_0415 0x2C |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1492 // 45 ngu_0343 0x2D |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1493 // 46 sgu_0230 0x2E |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1494 // 47 xyl_0315 0x2F |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1495 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1496 switch (customer_instrument_id) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1497 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1498 case 0: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1499 // Piano31.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1500 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1501 instrument_size = MELODY_E2_PIANO31_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1502 instrument_ptr = (UWORD16 *)(&melody_E2_piano31[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1503 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1504 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1505 case 1: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1506 // Piano15.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1507 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1508 instrument_size = MELODY_E2_PIANO15_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1509 instrument_ptr = (UWORD16 *)(&melody_E2_piano15[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1510 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1511 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1512 case 2: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1513 // Pia_811.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1514 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1515 instrument_size = MELODY_E2_PIA_811_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1516 instrument_ptr = (UWORD16 *)(&melody_E2_pia_811[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1517 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1518 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1519 case 3: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1520 // eba_2536.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1521 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1522 instrument_size = MELODY_E2_EBA_2536_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1523 instrument_ptr = (UWORD16 *)(&melody_E2_eba_2536[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1524 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1525 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1526 case 4: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1527 // tsax_255.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1528 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1529 instrument_size = MELODY_E2_TSAX_255_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1530 instrument_ptr = (UWORD16 *)(&melody_E2_tsax_255[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1531 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1532 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1533 case 5: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1534 // asax_124.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1535 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1536 instrument_size = MELODY_E2_ASAX_124_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1537 instrument_ptr = (UWORD16 *)(&melody_E2_asax_124[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1538 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1539 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1540 case 6: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1541 // clar_121.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1542 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1543 instrument_size = MELODY_E2_CLAR_121_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1544 instrument_ptr = (UWORD16 *)(&melody_E2_clar_121[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1545 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1546 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1547 case 7: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1548 // clar_130.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1549 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1550 instrument_size = MELODY_E2_CLAR_130_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1551 instrument_ptr = (UWORD16 *)(&melody_E2_clar_130[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1552 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1553 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1554 case 8: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1555 // stdr_515.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1556 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1557 instrument_size = MELODY_E2_STDR_515_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1558 instrument_ptr = (UWORD16 *)(&melody_E2_stdr_515[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1559 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1560 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1561 case 9: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1562 // timp_661.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1563 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1564 instrument_size = MELODY_E2_TIMP_661_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1565 instrument_ptr = (UWORD16 *)(&melody_E2_timp_661[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1566 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1567 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1568 case 10: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1569 // agog_406.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1570 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1571 instrument_size = MELODY_E2_AGOG_406_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1572 instrument_ptr = (UWORD16 *)(&melody_E2_agog_406[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1573 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1574 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1575 case 11: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1576 // wood_110.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1577 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1578 instrument_size = MELODY_E2_WOOD_110_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1579 instrument_ptr = (UWORD16 *)(&melody_E2_wood_110[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1580 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1581 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1582 case 12: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1583 // vib_3836.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1584 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1585 instrument_size = MELODY_E2_VIB_3836_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1586 instrument_ptr = (UWORD16 *)(&melody_E2_vib_3836[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1587 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1588 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1589 case 13: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1590 // xylo_120.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1591 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1592 instrument_size = MELODY_E2_XYLO_120_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1593 instrument_ptr = (UWORD16 *)(&melody_E2_xylo_120[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1594 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1595 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1596 case 14: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1597 // xylo_315.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1598 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1599 instrument_size = MELODY_E2_XYLO_315_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1600 instrument_ptr = (UWORD16 *)(&melody_E2_xylo_315[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1601 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1602 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1603 case 15: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1604 // xylo_516.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1605 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1606 instrument_size = MELODY_E2_XYLO_516_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1607 instrument_ptr = (UWORD16 *)(&melody_E2_xylo_516[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1608 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1609 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1610 case 16: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1611 // kali_215.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1612 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1613 instrument_size = MELODY_E2_KALI_215_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1614 instrument_ptr = (UWORD16 *)(&melody_E2_kali_215[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1615 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1616 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1617 case 17: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1618 // viol_231 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1619 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1620 instrument_size = MELODY_E2_VIOL_231_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1621 instrument_ptr = (UWORD16 *)(&melody_E2_viol_231[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1622 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1623 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1624 case 18: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1625 // viol_215.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1626 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1627 instrument_size = MELODY_E2_VIOL_215_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1628 instrument_ptr = (UWORD16 *)(&melody_E2_viol_215[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1629 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1630 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1631 case 19: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1632 // viol_211.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1633 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1634 instrument_size = MELODY_E2_VIOL_211_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1635 instrument_ptr = (UWORD16 *)(&melody_E2_viol_211[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1636 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1637 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1638 case 20: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1639 // viol_108.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1640 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1641 instrument_size = MELODY_E2_VIOL_108_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1642 instrument_ptr = (UWORD16 *)(&melody_E2_viol_108[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1643 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1644 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1645 case 21: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1646 // flut_436 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1647 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1648 instrument_size = MELODY_E2_FLUT_436_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1649 instrument_ptr = (UWORD16 *)(&melody_E2_flut_436[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1650 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1651 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1652 case 22: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1653 // flut_308.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1654 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1655 instrument_size = MELODY_E2_FLUT_308_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1656 instrument_ptr = (UWORD16 *)(&melody_E2_flut_308[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1657 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1658 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1659 case 23: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1660 // porg_131 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1661 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1662 instrument_size = MELODY_E2_PORG_131_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1663 instrument_ptr = (UWORD16 *)(&melody_E2_porg_131[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1664 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1665 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1666 case 24: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1667 // acco_211.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1668 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1669 instrument_size = MELODY_E2_ACCO_211_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1670 instrument_ptr = (UWORD16 *)(&melody_E2_acco_211[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1671 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1672 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1673 case 25: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1674 // stng_231 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1675 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1676 instrument_size = MELODY_E2_STNG_231_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1677 instrument_ptr = (UWORD16 *)(&melody_E2_stng_231[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1678 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1679 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1680 case 26: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1681 // stng_058.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1682 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1683 instrument_size = MELODY_E2_STNG_058_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1684 instrument_ptr = (UWORD16 *)(&melody_E2_stng_058[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1685 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1686 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1687 case 27: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1688 // ldsa_131 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1689 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1690 instrument_size = MELODY_E2_LDSA_131_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1691 instrument_ptr = (UWORD16 *)(&melody_E2_ldsa_131[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1692 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1693 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1694 case 28: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1695 // sin7.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1696 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1697 instrument_size = MELODY_E2_SIN7_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1698 instrument_ptr = (UWORD16 *)(&melody_E2_sin7[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1699 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1700 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1701 case 29: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1702 // Egu_3036.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1703 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1704 instrument_size = MELODY_E2_EGU_3036_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1705 instrument_ptr = (UWORD16 *)(&melody_E2_egu_3036[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1706 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1707 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1708 case 30: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1709 // Jgui_215.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1710 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1711 instrument_size = MELODY_E2_JGUI_215_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1712 instrument_ptr = (UWORD16 *)(&melody_E2_jgui_215[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1713 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1714 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1715 case 31: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1716 // Banj_315.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1717 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1718 instrument_size = MELODY_E2_BANJ_315_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1719 instrument_ptr = (UWORD16 *)(&melody_E2_banj_315[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1720 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1721 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1722 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1723 case 32: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1724 // trum_231 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1725 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1726 instrument_size = MELODY_E2_TRUM_231_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1727 instrument_ptr = (UWORD16 *)(&melody_E2_trum_231[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1728 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1729 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1730 case 33: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1731 // tromb31 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1732 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1733 instrument_size = MELODY_E2_TROMB31_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1734 instrument_ptr = (UWORD16 *)(&melody_E2_tromb31[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1735 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1736 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1737 case 34: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1738 // cho_2116 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1739 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1740 instrument_size = MELODY_E2_CHO_2116_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1741 instrument_ptr = (UWORD16 *)(&melody_E2_cho_2116[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1742 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1743 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1744 case 35: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1745 // vooh_331.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1746 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1747 instrument_size = MELODY_E2_VOOH_331_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1748 instrument_ptr = (UWORD16 *)(&melody_E2_vooh_331[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1749 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1750 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1751 case 36: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1752 // crc_1210.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1753 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1754 instrument_size = MELODY_E2_CRC_1210_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1755 instrument_ptr = (UWORD16 *)(&melody_E2_crc_1210[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1756 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1757 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1758 case 37: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1759 // chc_1210.mwa |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1760 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1761 instrument_size = MELODY_E2_CHC_1210_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1762 instrument_ptr = (UWORD16 *)(&melody_E2_chc_1210[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1763 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1764 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1765 case 38: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1766 // ohc_1610 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1767 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1768 instrument_size = MELODY_E2_OHC_1610_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1769 instrument_ptr = (UWORD16 *)(&melody_E2_ohc_1610[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1770 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1771 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1772 case 39: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1773 // lbon_121 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1774 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1775 instrument_size = MELODY_E2_LBON_121_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1776 instrument_ptr = (UWORD16 *)(&melody_E2_lbon_121[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1777 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1778 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1779 case 40: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1780 // esn_0210 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1781 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1782 instrument_size = MELODY_E2_ESN_0210_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1783 instrument_ptr = (UWORD16 *)(&melody_E2_esn_0210[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1784 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1785 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1786 case 41: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1787 // crc_0210 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1788 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1789 instrument_size = MELODY_E2_CRC_0210_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1790 instrument_ptr = (UWORD16 *)(&melody_E2_crc_0210[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1791 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1792 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1793 case 42: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1794 // ric_0210 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1795 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1796 instrument_size = MELODY_E2_RIC_0210_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1797 instrument_ptr = (UWORD16 *)(&melody_E2_ric_0210[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1798 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1799 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1800 case 43: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1801 // bdm_0122 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1802 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1803 instrument_size = MELODY_E2_BDM_0122_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1804 instrument_ptr = (UWORD16 *)(&melody_E2_bdm_0122[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1805 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1806 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1807 case 44: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1808 // vib_0415 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1809 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1810 instrument_size = MELODY_E2_VIB_0415_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1811 instrument_ptr = (UWORD16 *)(&melody_E2_vib_0415[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1812 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1813 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1814 case 45: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1815 // ngu_0343 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1816 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1817 instrument_size = MELODY_E2_NGU_0343_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1818 instrument_ptr = (UWORD16 *)(&melody_E2_ngu_0343[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1819 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1820 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1821 case 46: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1822 // sgu_0230 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1823 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1824 instrument_size = MELODY_E2_SGU_0230_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1825 instrument_ptr = (UWORD16 *)(&melody_E2_sgu_0230[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1826 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1827 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1828 case 47: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1829 // xyl_0315 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1830 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1831 instrument_size = MELODY_E2_XYL_0315_MWA_SIZE; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1832 instrument_ptr = (UWORD16 *)(&melody_E2_xyl_0315[0]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1833 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1834 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1835 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1836 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1837 i = instrument_size; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1838 while ( (i != 0) && |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1839 (l1a_l1s_com.melody0_e2_task.parameters.emergency_stop == FALSE) ) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1840 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1841 *API_address++ = *instrument_ptr++; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1842 i--; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1843 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1844 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1845 return(instrument_size); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1846 #endif // (AUDIO_SIMULATION) || (AUDIO_L1_STANDALONE) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1847 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1848 #if (OP_RIV_AUDIO == 1) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1849 #ifndef _WINDOWS |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1850 T_FFS_FD ffs_fd_1, ffs_fd_2; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1851 T_FFS_STAT stat; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1852 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1853 /* Nb of instruments in the .lsi file */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1854 INT8 i = 0; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1855 INT16 instrument_id = -1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1856 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1857 /* basic structure of the .lsi file */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1858 T_AUDIO_MELODY_E2_ID_NAME file_E2; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1859 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1860 /**** Find the size of the .lsi file ****/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1861 /* the .lsi file is stores into the flash */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1862 /* check if the .lsi file exists */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1863 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1864 ffs_fd_1 = ffs_open(p_audio_gbl_var->melody_E2_load_file_instruments.instrument_file_name, |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1865 FFS_O_RDONLY ); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1866 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1867 if (ffs_fd_1 < EFFS_OK) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1868 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1869 audio_melody_E2_error_trace(AUDIO_ENTITY_LOAD_FILE_INSTR_ERROR); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1870 return (0); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1871 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1872 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1873 /* find the .mwa file */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1874 while ( (i < p_audio_gbl_var->melody_E2_load_file_instruments.nb_of_instruments) && |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1875 (customer_instrument_id != instrument_id)) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1876 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1877 /* Load the instruments file from the FFS */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1878 if ( (ffs_read ( ffs_fd_1, |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1879 (&file_E2), |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1880 (sizeof(INT8) + AUDIO_PATH_NAME_MAX_SIZE))) < EFFS_OK ) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1881 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1882 AUDIO_SEND_TRACE("AUDIO MELODY E2: impossible to load the .lsi file", RV_TRACE_LEVEL_ERROR); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1883 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1884 /* Close the file */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1885 ffs_close(ffs_fd_1); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1886 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1887 return (0); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1888 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1889 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1890 instrument_id = file_E2.id; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1891 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1892 /* Close the file */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1893 ffs_close(ffs_fd_1); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1894 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1895 if (i == p_audio_gbl_var->melody_E2_load_file_instruments.nb_of_instruments) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1896 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1897 AUDIO_SEND_TRACE("AUDIO MELODY E2: the instrument doesn't exist in the .lsi file", RV_TRACE_LEVEL_ERROR); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1898 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1899 return (0); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1900 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1901 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1902 /* Open the corresponding .mwa file */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1903 ffs_fd_2 = ffs_open( file_E2.melody_name, |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1904 FFS_O_RDONLY ); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1905 if (ffs_fd_2 < EFFS_OK) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1906 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1907 AUDIO_SEND_TRACE("AUDIO MELODY E2: impossible to open the .mwa file instruments", RV_TRACE_LEVEL_ERROR); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1908 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1909 /* Close the .mwa file */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1910 ffs_close(ffs_fd_2); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1911 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1912 return (0); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1913 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1914 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1915 /* download the instrument description */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1916 ffs_stat(file_E2.melody_name,&stat); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1917 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1918 /* check if the file contains some data */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1919 if (stat.size ==0) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1920 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1921 /* the file doesn't contains data */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1922 /* an error is generated */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1923 audio_melody_E2_error_trace(AUDIO_ENTITY_FILE_ERROR); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1924 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1925 /* Close the .mwa file */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1926 ffs_close(ffs_fd_2); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1927 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1928 return(0); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1929 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1930 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1931 /* check if there's enough memory in the API for this instrument */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1932 if (allowed_size < (stat.size>>1)) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1933 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1934 /* an error is generated */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1935 audio_melody_E2_error_trace(AUDIO_ERROR_INSTRUMENT_SIZE); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1936 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1937 /* Close the .mwa file */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1938 ffs_close(ffs_fd_2); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1939 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1940 return(0); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1941 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1942 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1943 ffs_read ( ffs_fd_2, |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1944 (void *)API_address, |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1945 stat.size ); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1946 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1947 /* Close the file */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1948 ffs_close(ffs_fd_2); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1949 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1950 return((stat.size>>1)); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1951 #endif //_WINDOWS |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1952 #endif // OP_RIV_AUDIO |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1953 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1954 #endif // MELODY_E2 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1955 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1956 #if (L1_EXT_AUDIO_MGT) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1957 /*-------------------------------------------------------*/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1958 /* Cust_ext_audio_mgt_hisr */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1959 /*-------------------------------------------------------*/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1960 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1961 /* Parameters : none */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1962 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1963 /* Return : none */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1964 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1965 /* Description : */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1966 /* handle the DMA interrupt in order to request a new */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1967 /* buffer */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1968 /* */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1969 /*-------------------------------------------------------*/ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1970 void Cust_ext_audio_mgt_hisr() |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1971 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1972 UWORD8 error_id = 0; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1973 UWORD16 requested_size = l1a_l1s_com.stereopath_drv_task.parameters.frame_number*2; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1974 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1975 error_id = Cust_get_pointer((UWORD16 **)&l1a_l1s_com.stereopath_drv_task.parameters.source_buffer_address, |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1976 &requested_size, |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1977 l1s.ext_audio_mgt.session_id); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1978 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1979 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1980 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1981 void l1a_bt_audio_noti_process() |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1982 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1983 UINT8 channel_id=0; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1984 void *p_message = NULL; //omaps00090550 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1985 T_RVF_MB_STATUS mb_status; //omaps00090550 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1986 T_AUDIO_DRIVER_SESSION *p_session; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1987 T_RV_RETURN *return_path; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1988 /* find active channel_id associated to session_id */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1989 while ( (channel_id < AUDIO_DRIVER_MAX_CHANNEL)&& |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1990 ((p_audio_gbl_var->audio_driver_session[channel_id].session_info.state == AUDIO_DRIVER_CHANNEL_WAIT_INIT)|| |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1991 (p_audio_gbl_var->audio_driver_session[channel_id].session_req.session_id != AUDIO_EXT_MIDI_SESSION_ID)) ) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1992 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1993 channel_id++; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1994 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1995 /* get driver session */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1996 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1997 p_session = &(p_audio_gbl_var->audio_driver_session[channel_id]); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1998 p_session->session_info.index_l1=1-p_session->session_info.index_l1; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1999 return_path = &(p_session->session_req.return_path); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2000 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2001 /* Translate the l1 message into the Riviera compliant message */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2002 /* Allocate the Riviera buffer */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2003 mb_status = rvf_get_buf ( p_audio_gbl_var->mb_external, |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2004 sizeof (T_AUDIO_DRIVER_NOTIFICATION), |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2005 (T_RVF_BUFFER **) (&p_message)); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2006 /* If insufficient resources, then report a memory error and abort. */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2007 if (mb_status == RVF_RED) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2008 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2009 /* the memory is insufficient to continue the non regression test */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2010 AUDIO_SEND_TRACE("AUDIO entity has no memory for driver notification",RV_TRACE_LEVEL_ERROR); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2011 return; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2012 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2013 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2014 /* Fill the message ID + parameters */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2015 ((T_AUDIO_DRIVER_NOTIFICATION *)p_message)->header.msg_id = AUDIO_DRIVER_NOTIFICATION_MSG; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2016 ((T_AUDIO_DRIVER_NOTIFICATION *)p_message)->channel_id = channel_id; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2017 ((T_AUDIO_DRIVER_NOTIFICATION *)p_message)->p_buffer = NULL; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2018 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2019 /* send answer */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2020 if (return_path->callback_func == NULL) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2021 rvf_send_msg (return_path->addr_id, p_message); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2022 else |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2023 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2024 (*return_path->callback_func)((void *)(p_message)); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2025 rvf_free_buf((T_RVF_BUFFER *)p_message); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2026 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2027 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2028 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2029 //NAVC start/stop/read energy |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2030 // Parameters :d_navc_start_stop_read // 1=start,2=stop,3=read energy |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2031 // UWORD32 d_navc_ctrl_status_energy_val |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2032 // 0=action not performed,1=action perf, xxx-value |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2033 // Description : this function will called to start/stop the NAVC and also to read the energy value during call |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2034 //The bit map of d_navc_ctrl_status is as follows. |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2035 // Bit 0: Start command: If 1 NAVC start. Set to 1 by MCU , Reset by DSp after module start Bit 1: Stop command : |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2036 // If 1 NAVC stop. Set to 1 by MCU , Reset by DSP after module stop. Bit 15: Status: Set and reset by DSP. If 1 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2037 // module is active. If 0 module is not active. |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2038 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2039 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2040 UWORD32 Cust_navc_ctrl_status(UWORD8 d_navc_start_stop_read) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2041 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2042 UWORD32 d_navc_ctrl_status_energy_val=0; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2043 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2044 switch (d_navc_start_stop_read) |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2045 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2046 case 1: /* Start NAVC */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2047 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2048 if((l1s_dsp_com.dsp_ndb_ptr->d_navc_ctrl_status & 0x8000)==0)l1s_dsp_com.dsp_ndb_ptr->d_navc_ctrl_status |= 0x01; //check 15th bit and if not active-put the last bit to 1 to start |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2049 d_navc_ctrl_status_energy_val=1; //indicates action performed |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2050 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2051 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2052 case 2: /* Stop NAVC */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2053 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2054 if((l1s_dsp_com.dsp_ndb_ptr->d_navc_ctrl_status & 0x8000)==0x8000)l1s_dsp_com.dsp_ndb_ptr->d_navc_ctrl_status |= 0x02; //check 15th bit and if active-put the last bit to 1 to start |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2055 d_navc_ctrl_status_energy_val=1; //indicates action performed |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2056 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2057 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2058 case 3: /* NAVC read energy */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2059 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2060 if((l1s_dsp_com.dsp_ndb_ptr->d_navc_ctrl_status & 0x8000) == 0x8000)//check 15th bit and if active- read the value-- |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2061 { |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2062 d_navc_ctrl_status_energy_val = l1s_dsp_com.dsp_ndb_ptr->d_vad_noise_ene_ndb[0]; //MSB part |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2063 d_navc_ctrl_status_energy_val= (d_navc_ctrl_status_energy_val<<16)|(l1s_dsp_com.dsp_ndb_ptr->d_vad_noise_ene_ndb[1]); //MSB <<16 | LSB - indicates the energy value |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2064 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2065 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2066 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2067 /*intended fall through */ |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2068 default: |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2069 break; |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2070 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2071 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2072 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2073 #if (L1_NAVC_TRACE == 1) //to see the NAVC trace |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2074 l1_trace_navc(d_navc_start_stop_read,d_navc_ctrl_status_energy_val); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2075 #endif |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2076 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2077 return (d_navc_ctrl_status_energy_val); |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2078 } |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2079 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2080 #endif // AUDIO_TASK== 1 |
c33c56a03312
l1audio_cust.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2081 |