source: roaraudio/roarclients/roarphone.c @ 3517:1a3218a3fc5b

Last change on this file since 3517:1a3218a3fc5b was 3517:1a3218a3fc5b, checked in by phi, 14 years ago

updated license headers, FSF moved office

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