Commit f0fa9563 authored by Robert Riggs's avatar Robert Riggs Committed by Alexandre Julliard

More general code cleanup for readability.

A few more parameter validation checks. Return DS_OK rather than 0 in a number of functions. Fixed primary buffer ref count bug in CreateSoundBuffer(). Handle 1-3 byte sound fragments that would cause buffer overruns. Clear primary buffer with a neutral value instead of always 0 (because 128 is neutral for 8-bit sound). Fix bug with mixing 8-bit sound into the primary buffer. Broke out the main block in DSOUND_thread() to another function for readability. Handle "no audio" and "audio busy" cases properly when initializing dsound. Rename DllCanUnloadNow() to DSOUND_DllCanUnloadNow().
parent eee1ddc8
...@@ -4,7 +4,7 @@ type win32 ...@@ -4,7 +4,7 @@ type win32
0 stdcall DirectSoundCreate(ptr ptr ptr) DirectSoundCreate 0 stdcall DirectSoundCreate(ptr ptr ptr) DirectSoundCreate
1 stdcall DirectSoundEnumerateA(ptr ptr) DirectSoundEnumerate32A 1 stdcall DirectSoundEnumerateA(ptr ptr) DirectSoundEnumerate32A
2 stub DirectSoundEnumerateW 2 stub DirectSoundEnumerateW
3 stdcall DllCanUnloadNow() DllCanUnloadNow 3 stdcall DllCanUnloadNow() DSOUND_DllCanUnloadNow
4 stdcall DllGetClassObject(ptr ptr ptr) DSOUND_DllGetClassObject 4 stdcall DllGetClassObject(ptr ptr ptr) DSOUND_DllGetClassObject
5 stub DirectSoundCaptureCreate 5 stub DirectSoundCaptureCreate
6 stub DirectSoundCaptureEnumerateA 6 stub DirectSoundCaptureEnumerateA
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment