[PATCH 3/6] wineoss.drv: Add MMDevAPI driver

Alexandre Julliard julliard at winehq.org
Mon Apr 25 10:34:42 CDT 2011


Andrew Eikum <aeikum at codeweavers.com> writes:

> +{
> +    int i, mixer_fd;
> +    oss_sysinfo sysinfo;
> +    static int print_once = 0;
> +
> +    TRACE("%d %p %p %p\n", flow, ids, num, def_index);
> +
> +    mixer_fd = open("/dev/mixer", O_RDONLY, 0);
> +    if(mixer_fd < 0){
> +        ERR("OSS /dev/mixer doesn't seem to exist\n");
> +        return AUDCLNT_E_SERVICE_NOT_RUNNING;
> +    }
> +
> +    if(ioctl(mixer_fd, SNDCTL_SYSINFO, &sysinfo) < 0){
> +        close(mixer_fd);
> +
> +        if(errno == EINVAL){
> +            ERR("OSS version too old, need at least OSSv4\n");
> +            return AUDCLNT_E_SERVICE_NOT_RUNNING;

You'll need a configure check too, things like the oss_sysinfo type
don't exist on OSSv3.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list