annotate src/aci2/aci/ati_audio.c @ 228:d2cbdbffc528

aci2: FreeCalypso +CGSN logic implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 16 Nov 2016 05:28:00 +0000
parents 67fe1b3f4bd7
children e0b9c21d7908
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
226
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * This ATI module and the AT commands implemented therein are a FreeCalypso
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 * addition. The purpose of these AT commands is to exercise the audio
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 * capabilities of the firmware - by using these commands, you should be
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 * able to emit sounds from the speaker or record voice from the microphone
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 * without needing to be in a call, and without bringing up GSM at all.
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 */
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 #ifndef ATI_AUDIO_C
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 #define ATI_AUDIO_C
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 #include "aci_all.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 #include <ctype.h>
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 #include <string.h>
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 #include "aci_cmh.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 #include "ati_cmd.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 #include "aci_cmd.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 #include "aci_io.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 #include "aci_cmd.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 #include "l4_tim.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 #include "line_edit.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 #include "aci_lst.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 #include "pcm.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 #include "audio.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 #include "aci.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 #include "rx.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 #include "pwr.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 #include "l4_tim.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 #ifdef GPRS
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 #ifdef DTI
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 #include "dti.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 #include "dti_conn_mng.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 #include "dti_cntrl_mng.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 #endif /* DTI */
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 #include "gaci.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 #include "gaci_cmh.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 #include "gaci_cmd.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 #endif /* GPRS */
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 #include "aci_mem.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 #include "aci_prs.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 #include "ati_int.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 #ifndef _SIMULATION_
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 #include "ffs/ffs.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 #endif
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 #ifdef FF_ATI_BAT
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 #include "typedefs.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 #include "gdd.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 #include "bat.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 #include "ati_bat.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 #endif /*FF_ATI_BAT*/
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 #include "audio/audio_api.h"
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 #include "audio.h" /* Condat */
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 /* AT@SND - emit sound through Condat API */
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 GLOBAL T_ATI_RSLT atAtSND ( char *cl, UBYTE srcId )
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 {
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 UBYTE sound_id = TONES_KEYBEEP;
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 cl = parse(cl, "x", &sound_id);
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 audio_PlaySoundID(AUDIO_SPEAKER, sound_id, 0, AUDIO_PLAY_ONCE);
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 return (ATI_CMPL);
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 }
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 static void audio_callback(void *event_from_audio)
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 {
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 /* do nothing at this time */
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 }
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 /* AT@E1 - play an E1 format melody */
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 GLOBAL T_ATI_RSLT atAtE1 ( char *cl, UBYTE srcId )
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 {
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 T_AUDIO_MELODY_E1_PARAMETER e1_param;
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 T_RV_RETURN return_path;
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 e1_param.melody_name[0] = 0;
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 cl = parse(cl, "s", (LONG)(sizeof(e1_param.melody_name) - 1),
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 e1_param.melody_name);
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 if (!e1_param.melody_name[0])
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 return (ATI_FAIL);
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 e1_param.loopback = AUDIO_MELODY_NO_LOOPBACK;
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 e1_param.melody_mode = AUDIO_MELODY_NORMAL_MODE;
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 return_path.addr_id = NULL;
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 return_path.callback_func = audio_callback;
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 if (audio_melody_E1_start(&e1_param, return_path) == AUDIO_OK)
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 return (ATI_CMPL);
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 else
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 return (ATI_FAIL);
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 }
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 /* AT@E2 - play an E2 format melody */
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 GLOBAL T_ATI_RSLT atAtE2 ( char *cl, UBYTE srcId )
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 {
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 T_AUDIO_MELODY_E2_PARAMETER e2_param;
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 T_RV_RETURN return_path;
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 e2_param.melody_E2_name[0] = 0;
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 cl = parse(cl, "s", (LONG)(sizeof(e2_param.melody_E2_name) - 1),
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 e2_param.melody_E2_name);
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112 if (!e2_param.melody_E2_name[0])
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113 return (ATI_FAIL);
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 e2_param.E2_loopback = AUDIO_MELODY_NO_LOOPBACK;
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 e2_param.melody_E2_mode = AUDIO_MELODY_NORMAL_MODE;
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 return_path.addr_id = NULL;
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 return_path.callback_func = audio_callback;
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 if (audio_melody_E2_start(&e2_param, return_path) == AUDIO_OK)
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120 return (ATI_CMPL);
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 else
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 return (ATI_FAIL);
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 }
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 /* AT@E2LSI - load melody E2 instrument list file */
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 GLOBAL T_ATI_RSLT atAtE2LSI ( char *cl, UBYTE srcId )
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127 {
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128 T_AUDIO_MELODY_E2_LOAD_FILE_INSTR_PARAMETER e2_lsi_param;
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130 e2_lsi_param.melody_E2_file_name[0] = 0;
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131 cl = parse(cl, "s", (LONG)(sizeof(e2_lsi_param.melody_E2_file_name)-1),
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132 e2_lsi_param.melody_E2_file_name);
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133 if (!e2_lsi_param.melody_E2_file_name[0])
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134 return (ATI_FAIL);
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136 if (audio_melody_E2_load_file_instruments(&e2_lsi_param) == AUDIO_OK)
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137 return (ATI_CMPL);
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138 else
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 return (ATI_FAIL);
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140 }
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141
67fe1b3f4bd7 aci2: added some AT commands for exercising audio functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142 #endif /* ATI_AUDIO_C */