[xmp] Fixes for Solaris

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
master
Claudio Matsuoka 14 years ago
parent f8f8e76ffb
commit 61897b7f65
  1. 6
      configure.ac
  2. 4
      src/sound.c
  3. 6
      src/sound_solaris.c

@ -76,6 +76,12 @@ openbsd*)
DRIVERS="${DRIVERS} sound_openbsd.o" DRIVERS="${DRIVERS} sound_openbsd.o"
fi fi
;; ;;
solaris*)
if test "${ac_cv_header_sys_audioio_h}" = "yes"; then
AC_DEFINE(SOUND_SOLARISD)
DRIVERS="${DRIVERS} sound_solaris.o"
fi
;;
cygwin*|mingw*) cygwin*|mingw*)
AC_DEFINE(SOUND_WIN32) AC_DEFINE(SOUND_WIN32)
DRIVERS="${DRIVERS} sound_win32.o" DRIVERS="${DRIVERS} sound_win32.o"

@ -9,6 +9,7 @@ extern struct sound_driver sound_win32;
extern struct sound_driver sound_coreaudio; extern struct sound_driver sound_coreaudio;
extern struct sound_driver sound_sndio; extern struct sound_driver sound_sndio;
extern struct sound_driver sound_openbsd; extern struct sound_driver sound_openbsd;
extern struct sound_driver sound_solaris;
extern struct sound_driver sound_bsd; extern struct sound_driver sound_bsd;
extern struct sound_driver sound_beos; extern struct sound_driver sound_beos;
@ -33,6 +34,9 @@ void init_sound_drivers()
#ifdef SOUND_BSD #ifdef SOUND_BSD
register_sound_driver(&sound_bsd); register_sound_driver(&sound_bsd);
#endif #endif
#ifdef SOUND_SOLARIS
register_sound_driver(&sound_solaris);
#endif
#ifdef SOUND_COREAUDIO #ifdef SOUND_COREAUDIO
register_sound_driver(&sound_coreaudio); register_sound_driver(&sound_coreaudio);
#endif #endif

@ -51,11 +51,11 @@ static int audioctl_fd;
static int init(struct options *options) static int init(struct options *options)
{ {
char **parm = options->driver_parm;
audio_info_t ainfo, ainfo2; audio_info_t ainfo, ainfo2;
int gain; int gain;
int bsize = 32 * 1024; int bsize = 32 * 1024;
int port; int port;
char *token, **parm;
AUDIO_INITINFO(&ainfo); AUDIO_INITINFO(&ainfo);
if ((audio_fd = open("/dev/audio", O_WRONLY)) == -1) if ((audio_fd = open("/dev/audio", O_WRONLY)) == -1)
@ -94,7 +94,7 @@ static int init(struct options *options)
gain = ainfo.play.gain; gain = ainfo.play.gain;
port = ainfo.play.port; port = ainfo.play.port;
parm_init(); parm_init(parm);
chkparm1("gain", gain = strtoul(token, NULL, 0)); chkparm1("gain", gain = strtoul(token, NULL, 0));
chkparm1("buffer", bsize = strtoul(token, NULL, 0)); chkparm1("buffer", bsize = strtoul(token, NULL, 0));
chkparm1("port", port = (int)*token) chkparm1("port", port = (int)*token)
@ -182,7 +182,7 @@ static char *help[] = {
NULL NULL
}; };
struct xmp_drv_info drv_solaris = { struct sound_driver sound_solaris = {
"solaris", "solaris",
"Solaris PCM audio", "Solaris PCM audio",
help, help,

Loading…
Cancel
Save