summaryrefslogtreecommitdiff
blob: a2d49edf0e898013bdca64a215bb493da9b3e31e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
https://bugs.gentoo.org/860876
https://bugs.gentoo.org/874312
--- a/fft.c
+++ b/fft.c
@@ -148,5 +148,5 @@
         printf("%i is reversed to %i and maps to %i %i\n", i, bitReverse[i], bitReverse[i] * 2, (bitReverse[i] * 2) + 1);
 #endif
-        sound_sample* ptr = &(input[bitReverse[i] * 2]);
+        const sound_sample* ptr = &(input[bitReverse[i] * 2]);
         *realptr++ = (ptr[0] + ptr[1]) / 2;
         *imagptr++ = 0;
--- a/mpg321.c
+++ b/mpg321.c
@@ -100,5 +100,5 @@
 pid_t output_pid;
 /* Not used for the moment. It only works for CBR http/ftp retrieved files */
-extern http_file_length;
+extern int http_file_length;
 #ifdef HAVE_ALSA
 /* ALSA Volume Range */
--- a/mpg321.h
+++ b/mpg321.h
@@ -177,4 +177,5 @@
 
 /* network functions */
+void do_basicauth();
 int tcp_open(char * address, int port);
 int udp_open(char * address, int port);
@@ -189,4 +190,5 @@
 enum mad_flow output(void *data, struct mad_header const *header, struct mad_pcm *pcm);
 int calc_length(char *file, buffer*buf );
+int calc_http_length(buffer *buf);
 
 static enum mad_flow handle_error(void *data, struct mad_stream *stream, struct mad_frame *frame);
@@ -199,6 +201,8 @@
 void check_ao_default_play_device();
 void check_default_play_device();
+int check_default_play_device_buffer();
 int playdevice_is_live();
 void open_ao_playdevice(struct mad_header const *header);
+ao_device *open_ao_playdevice_buffer(struct mad_header const *header);
 
 /* remote control (-R) functions */
@@ -230,4 +234,10 @@
 RETSIGTYPE handle_sigchld(int sig);
 
+#ifdef HAVE_ALSA
+int init_alsa_volume_control(char *name);
+long mpg321_alsa_get_volume();
+void mpg321_alsa_set_volume(long value);
+#endif
+
 /* FFT data structures */
 #define FFT_BUFFER_SIZE_LOG 9
@@ -243,5 +253,5 @@
 
 typedef short int sound_sample;
-//void fft_perform(const sound_sample *input, double *output, fft_state *state);
+void fft_perform(const sound_sample *input, double *output, fft_state *state);
 
 fft_state *fft_init(void);
--- a/options.c
+++ b/options.c
@@ -45,5 +45,5 @@
 extern int auth_enable;
 extern int auth_enable_var;
-extern remote_restart;
+extern int remote_restart;
 /*Basic Authentication Arguments*/
 char *basic_auth = NULL;
--- a/volume.c
+++ b/volume.c
@@ -29,5 +29,5 @@
 int init_alsa_volume_control(char *name)
 {
-	char *elemnam;
+	const char *elemnam;
 	snd_mixer_open(&mixer,0);
 	snd_mixer_attach(mixer,name);