Date: Sun, 28 Dec 2003 00:49:22 +0100 (CET) From: Gerald Pfeifer <gerald@pfeifer.com> To: Mathew Kanner <mat@cnd.mcgill.ca>, multimedia@freebsd.org Cc: Travis Poppe <tlp@LiquidX.org> Subject: Re: The latest WINE and /dev/mixer* Message-ID: <Pine.BSF.4.58.0312280037370.13134@acrux.dbai.tuwien.ac.at> In-Reply-To: <20031227144106.35943fff.tlp@LiquidX.org> References: <20031227144106.35943fff.tlp@LiquidX.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Mathew Kanner wrote: > A brief look at the wine source shows that they are relying on > the SOUND_MIXER_INFO ioctl if defined. We define it but we don't > support it [...] > We can't easily implement the ioctl because we don't carry > specific device string info with the mixer device. (nor any of the > other fields in the struct mixer_info) Ouch. Now that's _really_ bad! That way we cannot even use autoconf to detect support for the SOUND_MIXER_INFO ioctl; why do we pretent to support something which we actually don't? > An easy hack would be to #undef SOUND_MIXER_INFO at the top of > wine/dlls/winmm/wineoss/audio.c (but after the includes) > > Good luck, and if it works, please submit a PR with the patch > for the wine port. Travis confirmed that this worked for him. How about the patch below? Index: audio.c =================================================================== RCS file: /home/wine/wine/dlls/winmm/wineoss/audio.c,v retrieving revision 1.108 diff -u -3 -p -r1.108 audio.c --- audio.c 12 Dec 2003 05:55:26 -0000 1.108 +++ audio.c 27 Dec 2003 23:48:35 -0000 @@ -544,10 +544,15 @@ static BOOL OSS_WaveOutInit(OSS_DEVICE* strncpy(ossdev->out_caps.szPname, info.name, sizeof(info.name)); TRACE("%s\n", ossdev->ds_desc.szDesc); } else { - ERR("%s: can't read info!\n", ossdev->mixer_name); + ERR("%s: cannot read SOUND_MIXER_INFO!\n", ossdev->mixer_name); +#ifndef __FreeBSD__ + /* FreeBSD up to at least 5.2 provides this ioctl, but does + * implement it properly, so ignore errors on that platform. + */ OSS_CloseDevice(ossdev); close(mixer); return FALSE; +#endif } } else { ERR("%s: %s\n", ossdev->mixer_name , strerror( errno )); Would you mind double checking that, Travis? What do you think, Mathew? Gerald PS: I'm the maintainer of the emulators/wine port, so I could add this patch to the port and, more importantly, submit it upstream as well. -- Gerald Pfeifer (Jerry) gerald@pfeifer.com http://www.pfeifer.com/gerald/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.58.0312280037370.13134>