[PATCH] Fix return from PlaySoundA

James Hatheway james at macadamian.com
Wed Apr 25 12:03:41 CDT 2001


Hi guys,


In my application, it calls PlaySampleA with NULL parameters when it wants to
stop a sound sample from playing.  Currently WINE is returning FALSE in this
case.  However, my app has this PlaySample call wrapped around an MFC VERIFY
macro, causing the app to crash in debug mode..... not good.  Wrote a small
test app in Windows, turns out we should return TRUE here.  This patch changes
this.


-James

Test code:
==========
int main(int argc, char* argv[])
{
 int a;

    a =PlaySound("dogbark.wav", NULL, SND_LOOP|SND_ASYNC);
    printf ("Started playing dog barking, returned %d\n", a);

    getchar();
    a = PlaySound (NULL, NULL, SND_SYNC);
    //a = PlaySound ("dogbark.wav", NULL, SND_PURGE);
    printf ("Stopped playing dog barking, returned %d\n",a);
    return 0;
}

Changelog:
  James Hatheway - james at macadamian.com
  PlaySoundA should return TRUE when it stops playing sound.

Modified:
  dlls/winmm/mmsystem.c

--
James Hatheway
Software Designer - Macadamian Technologies, Inc.
james at macadamian.com ~ http://www.macadamian.com

  "Man könnte froh sein, wenn die Luft so rein wäre wie das Bier"
  "One could be happy if the air were as pure as the beer"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: playsound_fix.diff
Type: application/octet-stream
Size: 589 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20010425/1b5f4573/playsound_fix.obj


More information about the wine-patches mailing list