comparison src/linuxplay.c @ 98:0d2f883870bc r20-1b1

Import from CVS: tag r20-1b1
author cvs
date Mon, 13 Aug 2007 09:13:56 +0200
parents 131b0175ea99
children fe104dbd9147
comparison
equal deleted inserted replaced
97:498bf5da1c90 98:0d2f883870bc
59 #include <config.h> 59 #include <config.h>
60 #endif 60 #endif
61 61
62 #include <errno.h> 62 #include <errno.h>
63 #include <fcntl.h> 63 #include <fcntl.h>
64 #include <linux/soundcard.h> 64 #ifdef __FreeBSD__
65 # include <machine/soundcard.h>
66 #else
67 # include <linux/soundcard.h>
68 #endif
65 #include <stdio.h> 69 #include <stdio.h>
66 #include <stdlib.h> 70 #include <stdlib.h>
67 #include <string.h> 71 #include <string.h>
68 #include <sys/fcntl.h> 72 #include <sys/fcntl.h>
69 #include <sys/file.h> 73 #include <sys/file.h>
86 #else 90 #else
87 #define UNUSED(x) 91 #define UNUSED(x)
88 #define __inline__ 92 #define __inline__
89 #endif 93 #endif
90 94
91 static __sighandler_t sighup_handler; 95 static void (*sighup_handler)(int);
92 static __sighandler_t sigint_handler; 96 static void (*sigint_handler)(int);
93 97
94 /* Maintain global variable for keeping parser state information; this struct 98 /* Maintain global variable for keeping parser state information; this struct
95 is set to zero before the first invocation of the parser. The use of a 99 is set to zero before the first invocation of the parser. The use of a
96 global variable prevents multiple concurrent executions of this code, but 100 global variable prevents multiple concurrent executions of this code, but
97 this does not happen anyways... */ 101 this does not happen anyways... */
980 984
981 /* The VoxWare-SDK discourages direct manipulation of the mixer device as 985 /* The VoxWare-SDK discourages direct manipulation of the mixer device as
982 this could lead to problems, when multiple sound cards are installed */ 986 this could lead to problems, when multiple sound cards are installed */
983 mix_fd = audio_fd; 987 mix_fd = audio_fd;
984 988
985 sighup_handler = signal(SIGHUP,(__sighandler_t)sighandler); 989 sighup_handler = signal(SIGHUP, sighandler);
986 sigint_handler = signal(SIGINT,(__sighandler_t)sighandler); 990 sigint_handler = signal(SIGINT, sighandler);
987 991
988 if (!audio_init(mix_fd,audio_fd,fmt,speed,tracks,&volume,&sndcnv)) 992 if (!audio_init(mix_fd,audio_fd,fmt,speed,tracks,&volume,&sndcnv))
989 goto END_OF_PLAY; 993 goto END_OF_PLAY;
990 audio_vol = volume; 994 audio_vol = volume;
991 995