*** play.c.orig Fri Dec 23 10:47:43 1994 --- play.c Thu Dec 29 10:29:04 1994 *************** *** 172,178 **** --- 172,183 ---- */ #include + + #ifdef SOLARIS + #include + #else #include + #endif /***************************************************************** * *************** *** 597,602 **** --- 602,612 ---- audio_start (int offset, char *port) { audio_info_t info; + + #ifdef SOLARIS + struct sigaction sig_act; + #endif + int portm = port_mask (port); /* Sanity check on the offset... don't want to have the user waiting *************** *** 626,635 **** --- 636,654 ---- int devtype; int *devspec = devspec_amd; + #ifdef SOLARIS + audio_device_t dev_id; + + ioctl (audio_device, AUDIO_GETDEV, &dev_id); + + if (!strcmp (dev_id.name, "SUNW,dbri")) devspec = devspec_dbri; + else if (!strcmp (dev_id.name, "SUNW,CS4231")) devspec = devspec_sparc5; + #else ioctl (audio_device, AUDIO_GETDEV, &devtype); if (devtype == AUDIO_DEV_SPEAKERBOX) devspec = devspec_dbri; else if (devtype == 5) devspec = devspec_sparc5; + #endif conversion_cookie = grok_for_conversion (&dst_format, &src_format, devspec); *************** *** 687,693 **** --- 706,724 ---- init_buffers (offset); + #ifdef SOLARIS + + sig_act.sa_handler = feed_device; + sigemptyset(&sig_act.sa_mask); + sig_act.sa_flags = 0; + sigaction(SIGPOLL,&sig_act,0); + + #else + signal (SIGPOLL, feed_device); + + #endif + ioctl (audio_device, I_SETSIG, S_OUTPUT); }