diff options
author | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-04-18 20:39:04 +0000 |
---|---|---|
committer | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-04-18 20:39:04 +0000 |
commit | 05d3596822603531a364b4429bd323bd350a0411 (patch) | |
tree | b08805dd7a8829f3f9baa361c15d0fa9a95546bc /mixer.c | |
parent | 2fa840b3388ffc0ed1edab5a4c4007e16b0a505d (diff) | |
download | mpv-05d3596822603531a364b4429bd323bd350a0411.tar.bz2 mpv-05d3596822603531a364b4429bd323bd350a0411.tar.xz |
some code cleanup
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@513 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mixer.c')
-rw-r--r-- | mixer.c | 13 |
1 files changed, 2 insertions, 11 deletions
@@ -7,20 +7,14 @@ #include "mixer.h" -#define DEV_MIXER "/dev/mixer" - char * mixer_device=NULL; -char * devname=NULL; int mixer_usemaster=0; void mixer_getvolume( int *l,int *r ) { int fd,v,cmd,devs; - if ( !mixer_device ) devname=strdup( DEV_MIXER ); - else devname=strdup( mixer_device ); - fd=open( devname,O_RDONLY ); - free( devname ); + fd=open( mixer_device,O_RDONLY ); if ( fd != -1 ) { ioctl( fd,SOUND_MIXER_READ_DEVMASK,&devs ); @@ -43,10 +37,7 @@ void mixer_setvolume( int l,int r ) { int fd,v,cmd,devs; - if ( !mixer_device ) devname=strdup( DEV_MIXER ); - else devname=strdup( mixer_device ); - fd=open( devname,O_RDONLY ); - free( devname ); + fd=open( mixer_device,O_RDONLY ); if ( fd != -1 ) { ioctl( fd,SOUND_MIXER_READ_DEVMASK,&devs ); |