• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2008-2009 SVOX AG, Baslerstr. 30, 8048 Zuerich, Switzerland
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 /**
17  * @file picoctrl.h
18  *
19  * Copyright (C) 2008-2009 SVOX AG, Baslerstr. 30, 8048 Zuerich, Switzerland
20  * All rights reserved.
21  *
22  * History:
23  * - 2009-04-20 -- initial version
24  *
25  */
26 
27 #ifndef PICOCTRL_H_
28 #define PICOCTRL_H_
29 
30 #include "picodefs.h"
31 #include "picoos.h"
32 #include "picorsrc.h"
33 #include "picodata.h"
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 #if 0
39 }
40 #endif
41 
42 #define PICOCTRL_MAX_PROC_UNITS 25
43 
44 /* temporarily increased for preprocessing
45 #define PICOCTRL_DEFAULT_ENGINE_SIZE 200000
46 */
47 #define PICOCTRL_DEFAULT_ENGINE_SIZE 1000000
48 
49 typedef struct picoctrl_engine * picoctrl_Engine;
50 
51 picoos_int16 picoctrl_isValidEngineHandle(picoctrl_Engine this);
52 
53 picoctrl_Engine picoctrl_newEngine (
54         picoos_MemoryManager mm,
55         picorsrc_ResourceManager rm,
56         const picoos_char * voiceName
57         );
58 
59 void picoctrl_disposeEngine(
60         picoos_MemoryManager mm,
61         picorsrc_ResourceManager rm,
62         picoctrl_Engine * this
63         );
64 
65 pico_status_t picoctrl_engFeedText(
66         picoctrl_Engine engine,
67         picoos_char * text,
68         picoos_int16  textSize,
69         picoos_int16 * bytesPut);
70 
71 pico_status_t picoctrl_engReset(
72         picoctrl_Engine engine,
73         picoos_int32 resetMode);
74 
75 picoos_Common picoctrl_engGetCommon(picoctrl_Engine this);
76 
77 picodata_step_result_t picoctrl_engFetchOutputItemBytes(
78         picoctrl_Engine engine,
79         picoos_char * buffer,
80         picoos_int16 bufferSize,
81         picoos_int16  * bytesReceived
82 );
83 
84 void picoctrl_engResetExceptionManager(
85         picoctrl_Engine this
86         );
87 
88 
89 picodata_step_result_t picoctrl_getLastScheduledPU(
90         picoctrl_Engine engine
91         );
92 
93 picodata_step_result_t picoctrl_getLastProducedItemType(
94         picoctrl_Engine engine
95         );
96 
97 #ifdef __cplusplus
98 }
99 #endif
100 
101 #endif /*PICOCTRL_H_*/
102