diff src/OSS4/audio.c @ 1244:d0f1e147cf62

now it saves VMIX volume between sessions
author Cristi Magherusan <majeru@atheme-project.org>
date Thu, 12 Jul 2007 18:21:23 +0300
parents 4cf6ccace89c
children aee4ebea943a
line wrap: on
line diff
--- a/src/OSS4/audio.c	Thu Jul 12 17:51:36 2007 +0300
+++ b/src/OSS4/audio.c	Thu Jul 12 18:21:23 2007 +0300
@@ -36,7 +36,7 @@
 
 #define NFRAGS		32
 
-static gint fd = 0,temp_vol=0x6464;
+static gint fd = 0;
 static char *buffer;
 static gboolean going, prebuffer, paused, unpause, do_pause, remove_prebuffer;
 static gint device_buffer_used, buffer_size, prebuffer_size, blk_size;
@@ -740,7 +740,7 @@
     int v;
     long cmd=SNDCTL_DSP_GETPLAYVOL;
     if(ioctl(fd, cmd, &v) == -1)
-        v=temp_vol;
+        v=vol;
     *r = (v & 0xFF00) >> 8;
     *l = (v & 0x00FF);
 }
@@ -749,8 +749,8 @@
 oss_set_volume(int l, int r)
 {   
     long cmd=SNDCTL_DSP_SETPLAYVOL;   
-    temp_vol = (r << 8) | l;
-    ioctl(fd, cmd, &temp_vol);
+    vol = (r << 8) | l;
+    ioctl(fd, cmd, &vol);
 }
 
 void