[PATCH] MCI_SAVE should overwrite destination file.

James Hatheway james at macadamian.com
Fri Mar 23 13:36:10 CST 2001


Hi,

There is a bug in MCI_SAVE which is preventing my application from recording
sound properly.  Here is what is happening: when my app is about to initiate
recording, it creates a temp file using GetTempFileName() and caches the returned
name in a member variable, then calls MCI_OPEN with a blank filename. (causing
MCI to create its own temp file).  When recording is stopped, the app calls
MCI_SAVE with the filename it created earlier.  MCI_SAVE uses mmioRename
to rename mci's temp file to the one requested by the app.  mmioRename
does NOT overwrite files, so it fails... my app doesn't like this. :-)  I tested
in windows that MCI_SAVE WILL overwrite destination files.  So lets make sure
the destination file isn't there before calling mmioRename...

Changelog:
  James Hatheway - james at macadamian.com
  MCI_SAVE should overwrite its destination file.

Modified:
  dlls/winmm/mciwave/mciwave.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: mcisave_overwrite.diff
Type: application/octet-stream
Size: 1536 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20010323/626a5cac/mcisave_overwrite.obj


More information about the wine-patches mailing list