[PATCH] wineoss.drv: Trim the sub-device part of the device path
aeikum at codeweavers.com
Mon Oct 10 15:57:06 CDT 2011
On my FreeBSD 8.2 VM, the audio devices have names like "/dev/pcm0.vp0",
where the ".vp0" part means the first virtual device within the first
actual pcm device. Trying to open the "/dev/pcm0.vp0" device twice fails
as that virtual device is already open. However, opening the parent
"/dev/pcm0" device many times succeeds, as FreeBSD automatically
reassigns the request to a free virtual device.
Unfortunately, the device enumeration methods as implemented by FreeBSD
list the specific virtual device paths instead of the more useful parent
device path. So this patch trims that part off to allow multiple device
open requests to succeed.
Hopefully no other OSS implementation uses a period in the device name
meaningfully... the 4Front OSS implementation does not, anyway.
dlls/wineoss.drv/mmdevdrv.c | 58 +++++++++++++++++++++++++++++++++++-------
1 files changed, 48 insertions(+), 10 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4720 bytes
Desc: not available
More information about the wine-patches