label lossless WMA as WMA3/Lossless
[soepkiptng.git] / src / soepkiptng_play / signals.c
blob120577dd0f3cf7a64c0c77fe6b0c94e6d1f8c321
2 #include "signals.h"
3 #include "output.h"
4 #include "polllib.h"
5 #include "buffer.h"
6 #include "input.h"
8 static void sighup(int s)
10 if(output_running()) {
11 output_stop();
12 } else {
13 output_start();
17 static void sigusr1(int s)
19 input_flush();
20 output_reset();
23 static void sigusr2(int s)
25 if(output_running()) {
26 output_stop();
30 static void sigalarm(int s)
32 if((byte_counter_resetcountdown = buffer_length) == 0) {
33 song_counter++;
34 byte_counter = 0;
39 void signals_init()
41 register_signal(SIGUSR1, sigusr1);
42 register_signal(SIGUSR2, sigusr2);
43 register_signal(SIGALRM, sigalarm);
44 register_signal(SIGHUP, sighup);