Debian Codegraph @

rplayd/rplayd.h

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 /* $Id: rplayd.h,v 1.3 1999/03/10 07:58:04 boyns Exp $ */
2
3 /*
4 * Copyright (C) 1993-99 Mark R. Boyns <[email protected]>
5 *
6 * This file is part of rplay.
7 *
8 * rplay is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * rplay is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with rplay; see the file COPYING. If not, write to the
20 * Free Software Foundation, Inc.,
21 * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
22 */
23
24 #ifndef _rplayd_h
25 #define _rplayd_h
26
27 #ifdef HAVE_CONFIG_H
28 #include "config.h"
29 #endif
30 #include <sys/types.h>
31 #include "rplay.h"
32 #include "misc.h"
33 #include "audio.h"
34 #include "buffer.h"
35 #include "spool.h"
36
37 /* Report levels */
38 #define REPORT_NONE 0 /* Nothing. */
39 #define REPORT_ERROR 1 /* System and rplayd errors. */
40 #define REPORT_NOTICE 2 /* ... + RPTP connections, get, put, find */
41 #define REPORT_INFO 3 /* ... + play, stop, pause, continue, etc */
42 #define REPORT_DEBUG 4 /* ... + Debug messages. */
43
44 #define REPORT_MIN 0
45 #define REPORT_MAX 4
46
47 /* $Id: rplayd.h,v 1.3 1999/03/10 07:58:04 boyns Exp $ */
48 #define SET_BIT(w, bit) ( (w) |= (bit) )
49 #define CLR_BIT(w, bit) ( (w) &= ~(bit) )
50 #define BIT(w, bit) ( (w) & (bit) )
51 #define TOGGLE_BIT(w, bit) ( (w) ^= (bit) )
52
53 /* UIO_MAXIOV probably isn't defined so lets assume it's 16. */
54 #ifndef UIO_MAXIOV
55 #define UIO_MAXIOV 16
56 #endif
57
58 /* Table of audio parameters supported by the audio device. */
59 typedef struct
60 {
61 int sample_rate;
62 int format;
63 int bits;
64 int channels;
65 }
66 RPLAY_AUDIO_TABLE;
67 extern RPLAY_AUDIO_TABLE *rplay_audio_table;
68
69
70 /* Global variables that are declared in rplayd.c.
71 (See rplayd.c for descriptions) */
72
73 extern fd_set read_mask;
74 extern fd_set write_mask;
75 extern int debug;
76 extern int inetd;
77 extern int rptp_timeout;
78 extern char hostname[];
79 extern char *hostaddr;
80 extern int rplay_fd;
81 extern int rptp_fd;
82 #ifdef OTHER_RPLAY_PORTS
83 extern int other_rplay_fd;
84 extern int other_rptp_fd;
85 #endif
86 extern int curr_rate;
87 #ifndef HAVE_OSS
88 extern int curr_bufsize;
89 #endif /* !HAVE_OSS */
90 extern int rplayd_pid;
91 extern time_t starttime;
92 #ifdef AUTH
93 extern int auth_enabled;
94 #endif /* AUTH */
95 extern int rplay_priority_threshold;
96 extern char *rplay_audio_device;
97 #ifndef HAVE_OSS
98 extern int rplay_audio_bufsize;
99 #endif /* !HAVE_OSS */
100 extern int rplay_audio_rate;
101 extern int rplay_audio_sample_rate;
102 extern int rplay_audio_channels;
103 extern int rplay_audio_format;
104 extern int rplay_audio_precision;
105 extern int rplay_audio_port;
106 extern int audio_enabled;
107 extern int rplay_audio_volume;
108 extern int rplay_audio_match;
109 extern int rplay_audio_size;
110 extern char *rplay_audio_buf;
111 extern int max_rplay_audio_bufsize;
112 extern int rplay_audio_left_level;
113 extern int rplay_audio_right_level;
114
115 extern int optional_sample_rate;
116 extern int optional_precision;
117 extern int optional_channels;
118 extern int optional_format;
119 extern int optional_port;
120
121 extern int default_sample_rate;
122 extern int default_precision;
123 extern int default_channels;
124 extern int default_format;
125 extern int default_port;
126
127 #ifdef HAVE_OSS
128 extern int rplay_audio_fragsize;
129 extern int optional_fragsize;
130 extern int default_fragsize;
131 #endif /* HAVE_OSS */
132
133 extern int monitor_count;
134 extern BUFFER *monitor_buffers;
135
136 extern int errno;
137
138 #ifdef __STDC__
139 extern void usage ();
140 extern void done (int exit_value);
141 extern unsigned long inet_addr (char *);
142 extern char *inet_ntoa (struct in_addr);
143 extern void report (int level_mask, char *fmt,...);
144 extern void rplayd_read (int fd);
145 extern void rplayd_write (int nbytes);
146 extern void rplayd_init ();
147 extern int rplayd_play (RPLAY *rp, struct sockaddr_in sin);
148 extern int rplayd_stop (RPLAY *rp, struct sockaddr_in sin);
149 extern int rplayd_pause (RPLAY *rp, struct sockaddr_in sin);
150 extern int rplayd_continue (RPLAY *rp, struct sockaddr_in sin);
151 extern int rplayd_done (RPLAY *rp, struct sockaddr_in sin);
152 extern int rplayd_put (RPLAY *rp, struct sockaddr_in sin);
153 extern BUFFER *rplayd_status ();
154 extern void need_reset ();
155 extern int rplayd_audio_init ();
156 extern void rplayd_audio_match (SPOOL *sp);
157 #else
158 extern void usage ();
159 extern void done ( /* int exit_value */ );
160 extern unsigned long inet_addr ( /* char * */ );
161 extern char *inet_ntoa ( /* struct in_addr */ );
162 extern void report ( /* int level_mask, char *fmt, ... */ );
163 extern void rplayd_read ( /* int fd */ );
164 extern void rplayd_write ( /* int nbytes */ );
165 extern void rplayd_init ();
166 extern int rplayd_play ( /* RPLAY *rp, struct sockaddr_in sin */ );
167 extern int rplayd_stop ( /* RPLAY *rp, struct sockaddr_in sin */ );
168 extern int rplayd_pause ( /* RPLAY *rp, struct sockaddr_in sin */ );
169 extern int rplayd_continue ( /* RPLAY *rp, struct sockaddr_in sin */ );
170 extern int rplayd_done ( /* RPLAY *rp, struct sockaddr_in sin */ );
171 extern int rplayd_put ( /* RPLAY *rp, struct sockaddr_in sin */ );
172 extern BUFFER *rplayd_status ();
173 extern void need_reset ();
174 extern int rplayd_audio_init ();
175 extern void rplayd_audio_match ( /* SPOOL *sp */ );
176 #endif
177
178 /*
179 * Prototypes for the audio stubs:
180 */
181 #ifdef __STDC__
182 extern int rplay_audio_init ();
183 extern int rplay_audio_open ();
184 extern int rplay_audio_isopen ();
185 extern int rplay_audio_flush ();
186 extern int rplay_audio_close ();
187 extern int rplay_audio_write (char *buf, int nbytes);
188 extern int rplay_audio_audio_get_volume ();
189 extern int rplay_audio_audio_set_volume (int volume);
190 extern int rplay_audio_get_volume ();
191 extern int rplay_audio_set_volume (int volume);
192 #else
193 extern int rplay_audio_init ();
194 extern int rplay_audio_open ();
195 extern int rplay_audio_isopen ();
196 extern int rplay_audio_flush ();
197 extern int rplay_audio_close ();
198 extern int rplay_audio_write ( /* char *buf, int nbytes */ );
199 extern int rplay_audio_audio_get_volume ();
200 extern int rplay_audio_audio_set_volume ( /* int volume */ );
201 extern int rplay_audio_get_volume ();
202 extern int rplay_audio_set_volume ( /* int volume */ );
203 #endif
204
205 #endif /* _rplayd_h */