On 2010/10/08 23:22, Denis Krjuchkov <alcoh...@gmail.com> wrote:
> I've implemented mixer for win32 output plugin.

Thanks Dennis, I've pulled your patches.  That rename makes sense!

> I'm not sure whenever implementation is free from race conditions.
> WinMM API itself is thread-safe.
> But there could be issues with closing output device while it is being 
> queried for current volume.

Can happen if the output fails.  The mixer mutex is held during mixer
plugin method calls, but there is no automatic safeguard against the
output device closing (due to failure) in the middle.

You could solve this by acquiring the output lock in
winmm_output_get_handle(), and add winmm_output_put_handle() which
releases this lock.  That requires the plugin to know whether it's
open or not.

I'm not sure if other plugins are affected by this problem.  That's
worth checking.

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to