MSACM: implement honouring of driver priority and enabled status at load time (try 2)

Alex Villací­s Lasso a_villacis at palosanto.com
Mon Jan 16 11:33:38 CST 2006


Mike McCormack wrote:

>
>
> Alex Villací­s Lasso wrote:
>
>> +                                }
>> +                            }
>> +                        }
>> +                    }
>> +                }
>> +            }
>> +        }
>> +    }
>> +}
>
>
> Hmm.  A 100 line function with 10 levels of indent...
>
> Any chance of rewriting this to reduce the level of indent?  Try using 
> some helper functions or return early.  You might understand it all 
> well, but this kind of code is difficult to follow and maintain.
>
> Mike

Now modified to reduce intentation level.

This patch reorders the driver list at load time to conform to the 
priority specified by HKCU\\Software\\Microsoft\\Multimedia\\Audio 
Compression Manager\\Priority v4.00 which is used by native msacm to 
save driver priority. Priority is encoded as

"PriorityN" => "1, msacm.DRIVERALIAS"

where N goes from 1 to the number of known drivers, DRIVERALIAS referes 
to the driver alias, and the value is prefixed with 1 for an enabled 
driver, or 0 for a disabled driver.

Changelog:
* Implement honouring of driver priority and enabled status at load time

Alex Villacís Lasso


-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine-msacm-05-driverPriority_load_try2.patch
Type: text/x-patch
Size: 5665 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060116/7b569e3d/wine-msacm-05-driverPriority_load_try2.patch


More information about the wine-patches mailing list