[Liboss-commit] CVS: liboss/lib esddsp.c,1.4,1.5
Brought to you by:
thesin
|
From: Alexander S. <mrv...@us...> - 2002-10-27 23:01:14
|
Update of /cvsroot/liboss/liboss/lib
In directory usw-pr-cvs1:/tmp/cvs-serv21824/lib
Modified Files:
esddsp.c
Log Message:
Enabling /dev/mixer emulation
Index: esddsp.c
===================================================================
RCS file: /cvsroot/liboss/liboss/lib/esddsp.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- esddsp.c 23 Oct 2002 01:28:13 -0000 1.4
+++ esddsp.c 27 Oct 2002 23:01:10 -0000 1.5
@@ -41,7 +41,6 @@
#include <esd.h>
-/* BSDI has this functionality, but not define :() */
#define REAL_LIBC libSystem_handle
typedef unsigned long request_t;
@@ -50,7 +49,7 @@
static int settings = 0, done = 0;
static char *ident = NULL, *mixer = NULL;
-static int use_mixer = 0;
+static int use_mixer = 1;
static void *libSystem_handle = NULL;
static int acquired_handle = 0;
@@ -98,8 +97,6 @@
ident = malloc (ESD_NAME_MAX);
strncpy (ident, (str ? str : "esddsp"), ESD_NAME_MAX);
- if (getenv ("ESDDSP_MIXER"))
- {
use_mixer = 1;
str = getenv ("HOME");
@@ -108,14 +105,6 @@
mixer = malloc (strlen (str) + strlen (ident) + 10);
sprintf (mixer, "%s/.esddsp_%s", str, ident);
}
- else
- {
- fprintf (stderr, "esddsp: can't get home directory\n");
- exit (1);
- }
-
- DPRINTF ("mixer settings file: %s\n", mixer);
- }
}
}
@@ -153,6 +142,7 @@
libSystem_handle = dlopen("/usr/lib/libSystem.dylib",RTLD_LAZY);
acquired_handle = 1;
}
+ dsp_init();
}
int oss_open (const char *pathname, int flags, va_list args)
@@ -165,8 +155,6 @@
if (!func)
func = (int (*) (const char *, int, mode_t)) dlsym (REAL_LIBC, "_open");
- dsp_init ();
-
mode = va_arg (args, int);
va_end (args);
@@ -234,11 +222,9 @@
*arg = 0x38;
break;
-#ifdef SNDCTL_DSP_GETCAPS
case SNDCTL_DSP_GETCAPS:
*arg = 0;
break;
-#endif
case SNDCTL_DSP_GETOSPACE:
{
@@ -289,7 +275,7 @@
return 0;
}
-int
+static int
mixctl (int fd, request_t request, void *argp)
{
static int esd = -1, player = -1;
|