@@ -41,7 +41,6 @@ static void *open_dl(const char *dl_path) {
4141 return dlopen (dl_path , RTLD_NOW );
4242
4343#endif
44-
4544}
4645
4746static void * load_symbol (void * handle , const char * symbol ) {
@@ -55,7 +54,6 @@ static void *load_symbol(void *handle, const char *symbol) {
5554 return dlsym (handle , symbol );
5655
5756#endif
58-
5957}
6058
6159static void close_dl (void * handle ) {
@@ -69,7 +67,6 @@ static void close_dl(void *handle) {
6967 dlclose (handle );
7068
7169#endif
72-
7370}
7471
7572static void print_dl_error (const char * message ) {
@@ -83,16 +80,15 @@ static void print_dl_error(const char *message) {
8380 fprintf (stderr , "%s with '%s'.\n" , message , dlerror ());
8481
8582#endif
86-
8783}
8884
8985static struct option long_options [] = {
90- {"library_path" , required_argument , NULL , 'l' },
91- {"model_path" , required_argument , NULL , 'm' },
92- {"keyword_path" , required_argument , NULL , 'k' },
93- {"sensitivity" , required_argument , NULL , 't' },
94- {"access_key" , required_argument , NULL , 'a' },
95- {"wav_path" , required_argument , NULL , 'w' },
86+ {"library_path" , required_argument , NULL , 'l' },
87+ {"model_path" , required_argument , NULL , 'm' },
88+ {"keyword_path" , required_argument , NULL , 'k' },
89+ {"sensitivity" , required_argument , NULL , 't' },
90+ {"access_key" , required_argument , NULL , 'a' },
91+ {"wav_path" , required_argument , NULL , 'w' },
9692};
9793
9894void print_usage (const char * program_name ) {
@@ -156,8 +152,8 @@ int picovoice_main(int argc, char *argv[]) {
156152 exit (1 );
157153 }
158154
159- pv_status_t (* pv_porcupine_init_func )(const char * , const char * , int32_t , const char * const * , const float * , pv_porcupine_t * * )
160- = load_symbol (porcupine_library , "pv_porcupine_init" );
155+ pv_status_t (* pv_porcupine_init_func )(const char * , const char * , int32_t , const char * const * , const float * , pv_porcupine_t * * ) =
156+ load_symbol (porcupine_library , "pv_porcupine_init" );
161157 if (!pv_porcupine_init_func ) {
162158 print_dl_error ("failed to load 'pv_porcupine_init'" );
163159 exit (1 );
@@ -169,8 +165,7 @@ int picovoice_main(int argc, char *argv[]) {
169165 exit (1 );
170166 }
171167
172- pv_status_t (* pv_porcupine_process_func )(pv_porcupine_t * , const int16_t * , int32_t * ) =
173- load_symbol (porcupine_library , "pv_porcupine_process" );
168+ pv_status_t (* pv_porcupine_process_func )(pv_porcupine_t * , const int16_t * , int32_t * ) = load_symbol (porcupine_library , "pv_porcupine_process" );
174169 if (!pv_porcupine_process_func ) {
175170 print_dl_error ("failed to load 'pv_porcupine_process'" );
176171 exit (1 );
@@ -243,8 +238,7 @@ int picovoice_main(int argc, char *argv[]) {
243238 struct timeval after ;
244239 gettimeofday (& after , NULL );
245240
246- total_cpu_time_usec +=
247- (double ) (after .tv_sec - before .tv_sec ) * 1e6 + (double ) (after .tv_usec - before .tv_usec );
241+ total_cpu_time_usec += (double ) (after .tv_sec - before .tv_sec ) * 1e6 + (double ) (after .tv_usec - before .tv_usec );
248242 total_processed_time_usec += (pv_porcupine_frame_length_func () * 1e6 ) / pv_sample_rate_func ();
249243
250244 if (keyword_index != -1 ) {
@@ -269,14 +263,14 @@ int main(int argc, char *argv[]) {
269263#if defined(_WIN32 ) || defined(_WIN64 )
270264
271265#define UTF8_COMPOSITION_FLAG (0)
272- #define NULL_TERMINATED (-1)
266+ #define NULL_TERMINATED (-1)
273267
274268 LPWSTR * wargv = CommandLineToArgvW (GetCommandLineW (), & argc );
275269 if (wargv == NULL ) {
276270 fprintf (stderr , "CommandLineToArgvW failed\n" );
277271 exit (1 );
278272 }
279-
273+
280274 char * utf8_argv [argc ];
281275
282276 for (int i = 0 ; i < argc ; ++ i ) {
0 commit comments