source: roaraudio/include/libroar/stream.h @ 506:8548c6327f60

Last change on this file since 506:8548c6327f60 was 506:8548c6327f60, checked in by phi, 16 years ago

added roar_stream_send_data()

File size: 1.7 KB
Line 
1//libroarstream.h:
2
3#ifndef _LIBROARSTREAM_H_
4#define _LIBROARSTREAM_H_
5
6#include "roaraudio.h"
7
8#define roar_dir2str(x)   ((x) == ROAR_DIR_PLAY   ? "play"   : (x) == ROAR_DIR_MONITOR ? "monitor" : \
9                           (x) == ROAR_DIR_FILTER ? "filter" : (x) == ROAR_DIR_RECORD  ? "record"  : \
10                           (x) == ROAR_DIR_OUTPUT ? "output" : "unknown")
11
12#define roar_codec2str(x) ((x) == ROAR_CODEC_PCM_S_LE  ? "pcm_s_le"  : (x) == ROAR_CODEC_PCM_S_BE  ? "pcm_s_be"  : \
13                           (x) == ROAR_CODEC_PCM_S_PDP ? "pcm_s_pdp" : (x) == ROAR_CODEC_MIDI_FILE ? "midi_file" : \
14                           "unknown" )
15
16struct roar_stream_info {
17 int block_size;
18 int pre_underruns;
19 int post_underruns;
20};
21
22int roar_stream_connect (struct roar_connection * con, struct roar_stream * s, int dir);
23
24int roar_stream_new     (struct roar_stream * s, unsigned int rate, unsigned int channels, unsigned int bits, unsigned int codec);
25
26int roar_stream_exec    (struct roar_connection * con, struct roar_stream * s);
27int roar_stream_connect_to (struct roar_connection * con, struct roar_stream * s, int type, char * host, int port);
28int roar_stream_connect_to_ask (struct roar_connection * con, struct roar_stream * s, int type, char * host, int port);
29
30int roar_stream_add_data (struct roar_connection * con, struct roar_stream * s, char * data, size_t len);
31
32int roar_stream_send_data (struct roar_connection * con, struct roar_stream * s, char * data, size_t len);
33
34int roar_stream_get_info (struct roar_connection * con, struct roar_stream * s, struct roar_stream_info * info);
35
36int roar_stream_s2m     (struct roar_stream * s, struct roar_message * m);
37int roar_stream_m2s     (struct roar_stream * s, struct roar_message * m);
38
39#endif
40
41//ll
Note: See TracBrowser for help on using the repository browser.