[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"
fi
;;
solaris*)
if test "${ac_cv_header_sys_audioio_h}" = "yes"; then
AC_DEFINE(SOUND_SOLARISD)
DRIVERS="${DRIVERS} sound_solaris.o"
fi
;;
cygwin*|mingw*)
AC_DEFINE(SOUND_WIN32)
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_sndio;
extern struct sound_driver sound_openbsd;
extern struct sound_driver sound_solaris;
extern struct sound_driver sound_bsd;
extern struct sound_driver sound_beos;
@ -33,6 +34,9 @@ void init_sound_drivers()
#ifdef SOUND_BSD
register_sound_driver(&sound_bsd);
#endif
#ifdef SOUND_SOLARIS
register_sound_driver(&sound_solaris);
#endif
#ifdef SOUND_COREAUDIO
register_sound_driver(&sound_coreaudio);
#endif

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

Loading…
Cancel
Save