source: roaraudio/roarclients/roarphone.c @ 3007:40a4f2639fb6

Last change on this file since 3007:40a4f2639fb6 was 3007:40a4f2639fb6, checked in by phi, 15 years ago

added support to enable Speex Prep components

File size: 17.3 KB
Line 
1//roarphone.c:
2
3/*
4 *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2009
5 *
6 *  This file is part of roarclients a part of RoarAudio,
7 *  a cross-platform sound system for both, home and professional use.
8 *  See README for details.
9 *
10 *  This file is free software; you can redistribute it and/or modify
11 *  it under the terms of the GNU General Public License version 3
12 *  as published by the Free Software Foundation.
13 *
14 *  RoarAudio is distributed in the hope that it will be useful,
15 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 *  GNU General Public License for more details.
18 *
19 *  You should have received a copy of the GNU General Public License
20 *  along with this software; see the file COPYING.  If not, write to
21 *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
22 *
23 */
24
25#include <roaraudio.h>
26#include <libroardsp/libroardsp.h>
27#include <libroareio/libroareio.h>
28
29#if defined(ROAR_HAVE_LIBSPEEX) && !defined(ROAR_HAVE_LIBSPEEXDSP)
30#define _SPEEX_API_OLD
31#elif defined(ROAR_HAVE_LIBSPEEX) && defined(ROAR_HAVE_LIBSPEEXDSP)
32#define _SPEEX_API_NEW
33#endif
34
35#ifdef _SPEEX_API_OLD
36#include <speex/speex_echo.h>
37#endif
38
39#define TIMEDIV  100
40
41#define DRIVER  "oss"
42
43// anti echo:
44#define AE_NONE      0
45#define AE_SIMPLE    1
46#define AE_SPEEX     2
47#define AE_ROARD     3
48
49#define DTX_F        25
50
51#define CON_NONE     0x00
52#define CON_CON      0x01
53#define CON_STREAM   0x02
54
55struct {
56 int antiecho;
57 int samples;
58 int transcode;
59 int64_t dtx_threshold;
60 size_t jumbo_mtu;
61 int    ioflush_interval;
62 struct {
63  struct {
64   int downmix;
65   float lowp_freq;
66   int speex_prep;
67   int speex_prep_denoise;
68   int speex_prep_agc;
69   int speex_prep_vad;
70  } in;
71 } filter;
72} g_conf;
73
74int dtx_counter = 0;
75
76struct {
77 int state;
78 struct roar_connection con;
79 struct roar_stream     stream;
80 struct roar_vio_calls * svio;
81} g_cons;
82
83struct roar_bixcoder transcoder[1];
84
85struct {
86 struct roardsp_filterchain input;
87 struct roardsp_filterchain output;
88} g_filterchains;
89
90struct {
91 struct {
92  char key[ROAR_META_MAX_NAMELEN];
93  char value[LIBROAR_BUFFER_MSGDATA];
94 } tmp;
95 char * rn;
96 char * nick;
97 char * org;
98 char * email;
99 char * hp;
100 char * loc;
101 char * thumbnail;
102} g_meta;
103
104void usage (void) {
105 printf("roarphone [OPTIONS]...\n");
106
107 printf("\nServer Options:\n\n");
108
109 printf("  --server    SERVER   - Set server hostname\n"
110        "  --jumbo-mtu MTU      - Sets the MTU for Jumbo Packets\n"
111        "  --io-flush  INTERVAL - Flushs output every INTERVAL packets\n"
112       );
113
114 printf("\nAudio Options:\n\n");
115 printf("  --rate     RATE      - Set sample rate\n"
116        "  --bits     BITS      - Set bits per sample\n"
117        "  --chans    CHANNELS  - Set number of channels\n"
118       );
119
120 printf("\nAudio Filter Options:\n\n");
121 printf("  --afi-downmix        - Enable input downmixing\n"
122        "  --afi-lowpass FREQ   - Enable input lowpass at FREQ (in Hz)\n"
123        "  --afi-speex-prep     - Enable speex preprocessor\n"
124        "  --afi-speex-denoise  - Enable speex denoiser\n"
125        "  --afi-speex-agc      - Enable speex AGC\n"
126        "  --afi-speex-vad      - Enable speex VAD\n"
127       );
128
129 printf("\nCodec Options:\n\n");
130 printf("  --codec    CODEC     - Set the codec\n"
131        "  --transcode          - Use local transcodeing\n"
132       );
133
134 printf("\nDriver Options:\n\n");
135 printf("  --driver   DRIVER    - Set the driver\n"
136        "  --device   DEVICE    - Set the device\n"
137       );
138
139 printf("\nGeneral Options:\n\n");
140 printf("  --antiecho AEMODE    - Set the anti echo mode\n"
141        "  --threshold DTXTHRES - Set the DTX threshold, disabled by default\n"
142        "  --help               - Show this help\n"
143       );
144
145 printf("\nMeta Data Options:\n\n");
146 printf("  --m-rn    REALNAME   - Sets the real name\n"
147        "  --m-nick  NICK       - Sets the nick name\n"
148        "  --m-email EMAIL      - Sets the email address\n"
149        "  --m-hp    HOMEPAGE   - Sets the homepage URL\n"
150        "  --m-thumbn THUMBNAIL - Sets a URL to a thumbnail\n"
151        "  --m-loc   LOCATION   - Sets the location (room number)\n"
152        "  --m-org ORGANIZATION - Sets the organization/company name\n"
153       );
154}
155
156int open_stream (struct roar_vio_calls * vio, char * server, struct roar_audio_info * info) {
157 int fh;
158
159 g_cons.svio = vio;
160
161 if ( !(g_cons.state & CON_CON) )
162  if ( roar_simple_connect(&(g_cons.con), server, "roarphone") == -1 )
163   return -1;
164
165 g_cons.state |= CON_CON;
166
167 // TODO: find out if this can be done more nicely by using VIOs
168
169 if ( (fh = roar_simple_new_stream_obj(&(g_cons.con), &(g_cons.stream),
170                                       info->rate, info->channels, info->bits, info->codec,
171                                       ROAR_DIR_BIDIR
172                                      )) == -1 )
173  return -1;
174
175 roar_vio_open_fh_socket(vio, fh);
176
177 g_cons.state |= CON_STREAM;
178
179 return 0;
180}
181
182#define _SET_META(ivar,itype) if ( (ivar) != NULL ) {  \
183                              meta.value = (ivar);     \
184                              meta.type  = (itype);    \
185                              roar_stream_meta_set(&(g_cons.con), &(g_cons.stream), ROAR_META_MODE_SET, &meta); \
186                              }
187int set_meta (void) {
188 struct roar_meta   meta;
189
190 meta.value  = g_meta.tmp.value;
191 meta.key[0] = 0;
192 meta.type   = ROAR_META_TYPE_NONE;
193
194 roar_stream_meta_set(&(g_cons.con), &(g_cons.stream), ROAR_META_MODE_CLEAR, &meta);
195
196 _SET_META(g_meta.thumbnail, ROAR_META_TYPE_THUMBNAIL);
197 _SET_META(g_meta.loc,       ROAR_META_TYPE_LOCATION);
198 _SET_META(g_meta.hp,        ROAR_META_TYPE_HOMEPAGE);
199 _SET_META(g_meta.org,       ROAR_META_TYPE_ORGANIZATION);
200
201 if ( g_meta.nick != NULL ) {
202  if ( g_meta.rn  != NULL ) {
203   snprintf(g_meta.tmp.value, LIBROAR_BUFFER_MSGDATA-1, "%s (%s)", g_meta.rn, g_meta.nick);
204   g_meta.tmp.value[LIBROAR_BUFFER_MSGDATA-1] = 0;
205   _SET_META(g_meta.tmp.value, ROAR_META_TYPE_AUTHOR);
206  } else {
207   _SET_META(g_meta.nick, ROAR_META_TYPE_AUTHOR);
208  }
209 } else {
210  if ( g_meta.rn  != NULL ) {
211   _SET_META(g_meta.rn, ROAR_META_TYPE_AUTHOR);
212  }
213 }
214
215 // TODO: make this more nice...
216 if ( g_meta.email != NULL ) {
217  if ( g_meta.nick != NULL ) {
218   if ( g_meta.rn != NULL ) {
219    snprintf(g_meta.tmp.value, LIBROAR_BUFFER_MSGDATA-1, "%s (%s) <%s>", g_meta.rn, g_meta.nick, g_meta.email);
220   } else {
221    snprintf(g_meta.tmp.value, LIBROAR_BUFFER_MSGDATA-1, "%s <%s>", g_meta.nick, g_meta.email);
222   }
223  } else {
224   if ( g_meta.rn != NULL ) {
225    snprintf(g_meta.tmp.value, LIBROAR_BUFFER_MSGDATA-1, "%s <%s>", g_meta.rn, g_meta.email);
226   } else {
227    snprintf(g_meta.tmp.value, LIBROAR_BUFFER_MSGDATA-1, "<%s>", g_meta.email);
228   }
229  }
230  g_meta.tmp.value[LIBROAR_BUFFER_MSGDATA-1] = 0;
231  _SET_META(g_meta.tmp.value, ROAR_META_TYPE_CONTACT);
232 }
233
234 return 0;
235}
236
237#ifdef _SPEEX_API_OLD
238int anti_echo_speex16(int16_t * buf, int16_t * aebuf, size_t len, struct roar_audio_info * info) {
239 static SpeexEchoState * state = NULL;
240 size_t samples = info->rate / TIMEDIV;
241 static int16_t * obuf = NULL;
242
243 if ( info->channels != 1 )
244  return -1;
245
246 if (len != samples)
247  return -1;
248
249 ROAR_DBG("anti_echo_speex16(*) = ?");
250
251 if ( state == NULL ) {
252  if ( (state = speex_echo_state_init(samples, 100*samples)) == NULL )
253   return -1;
254
255  // todo: set sample rate.
256 }
257
258 ROAR_DBG("anti_echo_speex16(*) = ?");
259
260 if ( obuf == NULL ) {
261  if ( (obuf = malloc(2*samples)) == NULL )
262   return -1;
263 }
264
265 ROAR_DBG("anti_echo_speex16(*) = ?");
266
267/*
268 speex_echo_cancellation(state, buf, aebuf, obuf);
269*/
270
271 speex_echo_cancel(state, buf, aebuf, obuf, NULL);
272
273 memcpy(buf, obuf, 2*samples);
274
275 ROAR_DBG("anti_echo_speex16(*) = 0");
276
277 return 0;
278}
279#endif
280
281int anti_echo16(int16_t * buf, int16_t * aebuf, size_t len, struct roar_audio_info * info) {
282 size_t i;
283
284 switch (g_conf.antiecho) {
285  case AE_NONE:
286    return 0;
287   break;
288  case AE_SIMPLE:
289    for (i = 0; i < len; i++)
290     buf[i] -= aebuf[i];
291    return 0;
292   break;
293#ifdef _SPEEX_API_OLD
294  case AE_SPEEX:
295    return anti_echo_speex16(buf, aebuf, len, info);
296   break;
297#endif
298  case AE_ROARD:
299    return 0;
300   break;
301  default:
302    return -1;
303   break;
304 }
305
306 return -1;
307}
308
309int zero_if_noise16 (int16_t * data, size_t samples) {
310 int64_t rms = roar_rms2_1_16(data, samples);
311
312 if ( rms < g_conf.dtx_threshold ) {
313  if ( dtx_counter ) {
314   dtx_counter--;
315  } else {
316   memset(data, 0, samples*2);
317  }
318 } else {
319  dtx_counter = DTX_F;
320 }
321
322 return 0;
323}
324
325int run_stream (struct roar_vio_calls * s0, struct roar_vio_calls * s1, struct roar_audio_info * info) {
326 size_t len;
327 void * outbuf, * micbuf;
328 ssize_t outlen, miclen;
329 unsigned long int pkg_count = 0;
330
331 ROAR_DBG("run_stream(*): g_conf.samples = %i, info->bits = %i", g_conf.samples, info->bits);
332 len = g_conf.samples * info->bits / 8;
333 ROAR_DBG("run_stream(*): len=%lu", (unsigned long) len);
334
335 if ( (outbuf = malloc(2*len)) == NULL )
336  return -1;
337
338 micbuf = outbuf + len;
339
340 while (1) {
341  if ( (miclen = roar_vio_read(s0, micbuf, len)) <= 0 )
342   break;
343
344  if ( roardsp_fchain_num(&(g_filterchains.input)) ) {
345   if ( roardsp_fchain_calc(&(g_filterchains.input), micbuf, len) == -1 )
346    break;
347  }
348
349  if ( g_conf.dtx_threshold > 0 )
350   if ( info->bits == 16 )
351    zero_if_noise16(micbuf, miclen/2);
352
353  if ( g_conf.transcode ) {
354   if ( roar_bixcoder_write_packet(transcoder, micbuf, miclen) == -1 )
355    break;
356  } else {
357   if ( roar_vio_write(s1, micbuf, miclen) != miclen )
358    break;
359  }
360
361  if ( g_conf.ioflush_interval != -1 ) {
362   if ( !(pkg_count % g_conf.ioflush_interval) )
363    roar_vio_sync(s1);
364  }
365
366  if ( g_conf.transcode ) {
367   ROAR_DBG("run_stream(*): outbuf=%p, len=%lu", outbuf, (unsigned long) len);
368   if ( roar_bixcoder_read_packet(transcoder, outbuf, len) == -1 )
369    break;
370
371   outlen = len;
372  } else {
373   if ( (outlen = roar_vio_read(s1, outbuf, len)) <= 0 )
374    break;
375  }
376
377  if ( g_conf.antiecho != AE_NONE && info->bits == 16 )
378   anti_echo16(outbuf, micbuf, ROAR_MIN(miclen, outlen)/2, info);
379
380  if ( roardsp_fchain_num(&(g_filterchains.output)) ) {
381   if ( roardsp_fchain_calc(&(g_filterchains.output), outbuf, outlen) == -1 )
382    break;
383  }
384
385  if ( roar_vio_write(s0, outbuf, outlen) != outlen )
386   break;
387
388  pkg_count++;
389 }
390
391 free(outbuf);
392
393 return 0;
394}
395
396int main (int argc, char * argv[]) {
397 struct roar_audio_info info = {.rate     = ROAR_RATE_DEFAULT,
398                                .bits     = ROAR_BITS_DEFAULT,
399                                .channels = ROAR_CHANNELS_DEFAULT,
400                                .codec    = ROAR_CODEC_DEFAULT
401                               };
402 struct roar_audio_info dinfo;
403 struct roar_vio_calls dvio, svio, svio_jumbo, svio_real;
404 struct roar_vio_calls * svio_p;
405 struct roardsp_filter * filter;
406 char * driver   = DRIVER;
407 char * device   = NULL;
408 char * server   = NULL;
409 char * k;
410 int    i;
411 union {
412  int32_t i32;
413  size_t  size;
414 } tmp;
415
416 memset(&g_conf, 0, sizeof(g_conf));
417
418 g_conf.antiecho         = AE_ROARD;
419 g_conf.dtx_threshold    = -1;
420 g_conf.ioflush_interval = -1;
421
422 memset(&g_cons, 0, sizeof(g_cons));
423 g_cons.state = CON_NONE;
424
425 memset(&g_meta, 0, sizeof(g_meta));
426
427 roardsp_fchain_init(&(g_filterchains.input));
428 roardsp_fchain_init(&(g_filterchains.output));
429
430 for (i = 1; i < argc; i++) {
431  k = argv[i];
432
433  if ( strcmp(k, "--server") == 0 ) {
434   server = argv[++i];
435  } else if ( strcmp(k, "--jumbo-mtu") == 0 ) {
436   g_conf.jumbo_mtu = atoi(argv[++i]);
437  } else if ( strcmp(k, "--io-flush") == 0 ) {
438   g_conf.ioflush_interval = atoi(argv[++i]);
439  } else if ( strcmp(k, "--rate") == 0 ) {
440   info.rate = atoi(argv[++i]);
441  } else if ( strcmp(k, "--bits") == 0 ) {
442   info.bits = atoi(argv[++i]);
443  } else if ( strcmp(k, "--channels") == 0 || strcmp(k, "--chans") == 0 ) {
444   info.channels = atoi(argv[++i]);
445
446  } else if ( strcmp(k, "--afi-downmix") == 0 ) {
447   g_conf.filter.in.downmix = 1;
448  } else if ( strcmp(k, "--afi-lowpass") == 0 ) {
449   g_conf.filter.in.lowp_freq = atof(argv[++i]);
450  } else if ( strcmp(k, "--afi-speex-prep") == 0 ) {
451   g_conf.filter.in.speex_prep = 1;
452  } else if ( strcmp(k, "--afi-speex-denoise") == 0 ) {
453   g_conf.filter.in.speex_prep = 1;
454   g_conf.filter.in.speex_prep_denoise = 1;
455  } else if ( strcmp(k, "--afi-speex-agc") == 0 ) {
456   g_conf.filter.in.speex_prep = 1;
457   g_conf.filter.in.speex_prep_agc = 1;
458  } else if ( strcmp(k, "--afi-speex-vad") == 0 ) {
459   g_conf.filter.in.speex_prep = 1;
460   g_conf.filter.in.speex_prep_vad = 1;
461
462  } else if ( strcmp(k, "--codec") == 0 ) {
463   info.codec = roar_str2codec(argv[++i]);
464
465  } else if ( strcmp(k, "--driver") == 0 ) {
466   driver = argv[++i];
467  } else if ( strcmp(k, "--device") == 0 ) {
468   device = argv[++i];
469  } else if ( strcmp(k, "--antiecho") == 0 ) {
470   k = argv[++i];
471   if ( !strcmp(k, "none") ) {
472    g_conf.antiecho = AE_NONE;
473   } else if ( !strcmp(k, "simple") ) {
474    g_conf.antiecho = AE_SIMPLE;
475   } else if ( !strcmp(k, "speex") ) {
476    g_conf.antiecho = AE_SPEEX;
477   } else if ( !strcmp(k, "roard") ) {
478    g_conf.antiecho = AE_ROARD;
479   } else {
480    fprintf(stderr, "Error: unknown mode: %s\n", k);
481    return 1;
482   }
483  } else if ( strcmp(k, "--threshold") == 0 ) {
484   g_conf.dtx_threshold = atol(argv[++i]);
485
486   // use threshold^2 or threshold < 0 for not using DTX
487   if ( g_conf.dtx_threshold > 0 )
488    g_conf.dtx_threshold *= g_conf.dtx_threshold;
489  } else if ( strcmp(k, "--transcode") == 0 ) {
490   g_conf.transcode = 1;
491
492  // META DATA:
493  } else if ( strcmp(k, "--m-rn") == 0 ) {
494   g_meta.rn = argv[++i];
495  } else if ( strcmp(k, "--m-nick") == 0 ) {
496   g_meta.nick = argv[++i];
497  } else if ( strcmp(k, "--m-email") == 0 ) {
498   g_meta.email = argv[++i];
499  } else if ( strcmp(k, "--m-hp") == 0 ) {
500   g_meta.hp = argv[++i];
501  } else if ( strcmp(k, "--m-thumbn") == 0 ) {
502   g_meta.thumbnail = argv[++i];
503  } else if ( strcmp(k, "--m-loc") == 0 ) {
504   g_meta.loc = argv[++i];
505  } else if ( strcmp(k, "--m-org") == 0 ) {
506   g_meta.org = argv[++i];
507
508
509  } else if ( strcmp(k, "--help") == 0 ) {
510   usage();
511   return 0;
512  } else {
513   fprintf(stderr, "Error: unknown argument: %s\n", k);
514   usage();
515   return 1;
516  }
517 }
518
519 // ignore errors, maybe it will work even if this fails
520 // (btw. it will never fail without crashing the rest of the app ;)
521 roar_libroar_set_server(server);
522
523 if ( g_conf.antiecho == AE_SPEEX ) {
524  ROAR_WARN("Speex Antiecho is obsolete and may be removed in future versions. Use --antiecho roard");
525 }
526
527 g_conf.samples = info.channels * info.rate / TIMEDIV;
528
529 memcpy(&dinfo, &info, sizeof(dinfo));
530
531 if ( g_conf.transcode ) {
532  dinfo.bits  = 16;
533  dinfo.codec = ROAR_CODEC_DEFAULT;
534
535  switch (info.codec) {
536   case ROAR_CODEC_ALAW:
537   case ROAR_CODEC_MULAW:
538     info.bits = 8;
539    break;
540   case ROAR_CODEC_ROAR_CELT:
541     info.bits = 16;
542    break;
543   case ROAR_CODEC_ROAR_SPEEX:
544     info.bits = 16;
545    break;
546  }
547 }
548
549 if ( roar_cdriver_open(&dvio, driver, device, &dinfo, ROAR_DIR_BIDIR) == -1 ) {
550  ROAR_ERR("Can not open sound card.");
551  return 1;
552 }
553
554 ROAR_DBG("main(*): CALL open_stream(&svio, server, &info)");
555 if ( open_stream(&svio_real, server, &info) == -1 ) {
556  ROAR_ERR("Can not open connection to server.");
557  roar_vio_close(&dvio);
558  return 2;
559 }
560 ROAR_DBG("main(*): RET");
561
562 if ( roar_vio_open_re(&svio, &svio_real) == -1 ) {
563  ROAR_ERR("Can not open connection to server (RE VIO).");
564  roar_vio_close(&dvio);
565  return 2;
566 }
567
568 if ( g_conf.jumbo_mtu ) {
569  if ( roar_vio_open_jumbo(&svio_jumbo, &svio, g_conf.jumbo_mtu) == -1 ) {
570   roar_vio_close(&dvio);
571   roar_vio_close(&svio);
572   return 2;
573  }
574  svio_p = &svio_jumbo;
575 } else {
576  svio_p = &svio;
577 }
578
579 set_meta();
580
581#define _err(x) roar_vio_close(&dvio); roar_vio_close(&svio); return (x)
582
583 if ( g_conf.filter.in.downmix ) {
584  if ( roardsp_filter_new(&filter, &(g_cons.stream), ROARDSP_FILTER_DOWNMIX) == -1 ) {
585   _err(2);
586  }
587
588  if ( roardsp_fchain_add(&(g_filterchains.input), filter) == -1 ) {
589   _err(2);
590  }
591 }
592
593 if ( g_conf.filter.in.lowp_freq > 1 ) {
594  if ( roardsp_filter_new(&filter, &(g_cons.stream), ROARDSP_FILTER_LOWP) == -1 ) {
595   _err(2);
596  }
597
598  if ( roardsp_filter_ctl(filter, ROARDSP_FCTL_FREQ, &(g_conf.filter.in.lowp_freq)) == -1 ) {
599   _err(2);
600  }
601
602  if ( roardsp_fchain_add(&(g_filterchains.input), filter) == -1 ) {
603   _err(2);
604  }
605 }
606
607 if ( g_conf.filter.in.speex_prep ) {
608  if ( roardsp_filter_new(&filter, &(g_cons.stream), ROARDSP_FILTER_SPEEX_PREP) == -1 ) {
609   _err(2);
610  }
611
612  tmp.size = g_conf.samples;
613  if ( roardsp_filter_ctl(filter, ROARDSP_FCTL_PACKET_SIZE, &tmp) == -1 ) {
614   _err(2);
615  }
616
617  tmp.i32 = 0;
618
619  if ( g_conf.filter.in.speex_prep_denoise )
620   tmp.i32 |= ROARDSP_SPEEX_PREP_DENOISE_ON;
621
622  if ( g_conf.filter.in.speex_prep_agc )
623   tmp.i32 |= ROARDSP_SPEEX_PREP_AGC_ON;
624
625  if ( g_conf.filter.in.speex_prep_vad )
626   tmp.i32 |= ROARDSP_SPEEX_PREP_VAD_ON;
627
628  if ( roardsp_filter_ctl(filter, ROARDSP_FCTL_MODE, &tmp) == -1 ) {
629   _err(2);
630  }
631
632  if ( roardsp_fchain_add(&(g_filterchains.input), filter) == -1 ) {
633   _err(2);
634  }
635 }
636
637#undef _err
638
639 if ( g_conf.transcode ) {
640  dinfo.codec = info.codec;
641
642  if ( roar_bixcoder_init(transcoder, &dinfo, svio_p) == -1 ) {
643   roar_vio_close(&svio);
644   roar_vio_close(&dvio);
645   return 10;
646  }
647
648  // ignore errors as it may also work if this fails
649  roar_bixcoder_write_header(transcoder);
650  roar_bixcoder_read_header(transcoder);
651
652  g_conf.samples = 8 * roar_bixcoder_packet_size(transcoder, -1) / dinfo.bits;
653 }
654
655 ROAR_DBG("main(*): CALL run_stream(&dvio, &svio, &info);");
656 run_stream(&dvio, svio_p, &info);
657 ROAR_DBG("main(*): RET");
658
659 roar_bixcoder_close(transcoder);
660
661 roar_vio_close(svio_p);
662 roar_vio_close(&dvio);
663
664 roardsp_fchain_uninit(&(g_filterchains.input));
665 roardsp_fchain_uninit(&(g_filterchains.output));
666
667 roar_disconnect(&(g_cons.con));
668
669 return 0;
670}
671
672//ll
Note: See TracBrowser for help on using the repository browser.