dsound: fix format handling on invalid format to never fail
commit75d5460f274aaf13f49476def7c85843c59936b6
authorMaarten Lankhorst <maarten.lankhorst@canonical.com>
Mon, 23 Mar 2015 08:14:34 +0000 (23 09:14 +0100)
committerMaarten Lankhorst <dev@mblankhorst.nl>
Wed, 23 Dec 2015 18:04:52 +0000 (23 19:04 +0100)
tree1fdc5dc7a7c7ea760da3f8bc1924f6943381d4aa
parent7edcdfbb5cde62c7f0220056ac4fe4059226173e
dsound: fix format handling on invalid format to never fail

For the users still on oss4 this is probably useful. This is more of
a theoretical concern than practical, since nobody uses primary mode.
And even if someone did, they would have to find a format that was
unsupported, like IEEE float would probably be the easiest to trigger.

This patch now forces everything to a single call to DSOUND_ReopenDevice,
which will either fail and keep previous state, or succeed.
dlls/dsound/dsound.c
dlls/dsound/dsound_convert.c
dlls/dsound/dsound_main.c
dlls/dsound/dsound_private.h
dlls/dsound/mixer.c
dlls/dsound/primary.c