diff src/linuxplay.c @ 282:c42ec1d1cded r21-0b39

Import from CVS: tag r21-0b39
author cvs
date Mon, 13 Aug 2007 10:33:18 +0200
parents c5d627a313b1
children 19dcec799385
line wrap: on
line diff
--- a/src/linuxplay.c	Mon Aug 13 10:32:23 2007 +0200
+++ b/src/linuxplay.c	Mon Aug 13 10:33:18 2007 +0200
@@ -127,10 +127,10 @@
    sampling format */
 unsigned char linuxplay_sndbuf[SNDBUFSZ];
 
-int           mix_fd    = -1;
-int           audio_vol = -1;
-int           audio_fd  = -1;
-char         *audio_dev = "";
+static int           mix_fd;
+static int           audio_vol;
+static int           audio_fd;
+static char	     *audio_dev = "/dev/dsp";
 
 typedef enum {fmtIllegal,fmtRaw,fmtVoc,fmtWave,fmtSunAudio} fmtType;
 
@@ -994,7 +994,7 @@
 
   /* The VoxWare-SDK discourages opening /dev/audio; opening /dev/dsp and
      properly intializing it via ioctl() is prefered */
-  if ((audio_fd=open((audio_dev="/dev/dsp"),
+  if ((audio_fd=open(audio_dev,
 		     (O_WRONLY|O_NDELAY),0)) < 0) {
     perror(audio_dev);
     if (mix_fd > 0 && mix_fd != audio_fd) { close(mix_fd); mix_fd = -1; }