1 | //vs.h: |
---|
2 | |
---|
3 | /* |
---|
4 | * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2010 |
---|
5 | * |
---|
6 | * This file is part of libroar 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 | * libroar 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 | * NOTE for everyone want's to change something and send patches: |
---|
25 | * read README and HACKING! There a addition information on |
---|
26 | * the license of this document you need to read before you send |
---|
27 | * any patches. |
---|
28 | * |
---|
29 | * NOTE for uses of non-GPL (LGPL,...) software using libesd, libartsc |
---|
30 | * or libpulse*: |
---|
31 | * The libs libroaresd, libroararts and libroarpulse link this lib |
---|
32 | * and are therefore GPL. Because of this it may be illigal to use |
---|
33 | * them with any software that uses libesd, libartsc or libpulse*. |
---|
34 | */ |
---|
35 | |
---|
36 | #ifndef _LIBROARVS_H_ |
---|
37 | #define _LIBROARVS_H_ |
---|
38 | |
---|
39 | #include "libroar.h" |
---|
40 | |
---|
41 | struct roar_vs; |
---|
42 | |
---|
43 | typedef struct roar_vs roar_vs_t; |
---|
44 | |
---|
45 | const char * roar_vs_strerr(int error); |
---|
46 | |
---|
47 | roar_vs_t * roar_vs_new_from_con(struct roar_connection * con, int * error); |
---|
48 | roar_vs_t * roar_vs_new(const char * server, const char * name, int * error); |
---|
49 | |
---|
50 | int roar_vs_stream(roar_vs_t * vss, const struct roar_audio_info * info, int dir, int * error); |
---|
51 | |
---|
52 | roar_vs_t * roar_vs_new_simple(const char * server, const char * name, int rate, int channels, int codec, int bits, int dir, int * error); |
---|
53 | |
---|
54 | #define roar_vs_new_playback(s,n,r,c,e,b,error) roar_vs_new_simple((s), (n), (r), (c), (e), (b), ROAR_DIR_PLAY, (error)) |
---|
55 | |
---|
56 | #define ROAR_VS_TRUE 1 |
---|
57 | #define ROAR_VS_FALSE 0 |
---|
58 | #define ROAR_VS_TOGGLE -1 |
---|
59 | #define ROAR_VS_ASK -2 |
---|
60 | |
---|
61 | int roar_vs_close(roar_vs_t * vss, int killit, int * error); |
---|
62 | |
---|
63 | ssize_t roar_vs_write(roar_vs_t * vss, const void * buf, size_t len, int * error); |
---|
64 | ssize_t roar_vs_read (roar_vs_t * vss, void * buf, size_t len, int * error); |
---|
65 | |
---|
66 | #define ROAR_VS_WAIT 1 |
---|
67 | #define ROAR_VS_NOWAIT 0 |
---|
68 | |
---|
69 | int roar_vs_sync (roar_vs_t * vss, int wait, int * error); |
---|
70 | |
---|
71 | int roar_vs_blocking (roar_vs_t * vss, int val, int * error); |
---|
72 | |
---|
73 | #define ROAR_VS_BACKEND_DEFAULT ROAR_VS_BACKEND_FIRST |
---|
74 | #define ROAR_VS_BACKEND_NONE -1 |
---|
75 | #define ROAR_VS_BACKEND_FIRST -2 |
---|
76 | #define ROAR_VS_BACKEND_MEAN -3 |
---|
77 | |
---|
78 | ssize_t roar_vs_latency(roar_vs_t * vss, int backend, int * error); |
---|
79 | |
---|
80 | int roar_vs_pause(roar_vs_t * vss, int val, int * error); |
---|
81 | |
---|
82 | int roar_vs_mute (roar_vs_t * vss, int val, int * error); |
---|
83 | |
---|
84 | int roar_vs_volume_mono (roar_vs_t * vss, float c, int * error); |
---|
85 | int roar_vs_volume_stereo (roar_vs_t * vss, float l, float r, int * error); |
---|
86 | |
---|
87 | int roar_vs_volume_get (roar_vs_t * vss, float * l, float * r, int * error); |
---|
88 | |
---|
89 | int roar_vs_meta (roar_vs_t * vss, struct roar_keyval * kv, size_t len, int * error); |
---|
90 | |
---|
91 | struct roar_connection * roar_vs_connection_obj(roar_vs_t * vss, int * error); |
---|
92 | struct roar_stream * roar_vs_stream_obj (roar_vs_t * vss, int * error); |
---|
93 | struct roar_vio_calls * roar_vs_vio_obj (roar_vs_t * vss, int * error); |
---|
94 | |
---|
95 | #define roar_vs_noop(v, error) roar_noop(roar_vs_connection_obj((v), (error))) |
---|
96 | |
---|
97 | #endif |
---|
98 | |
---|
99 | //ll |
---|