Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d73c9063
Commit
d73c9063
authored
Mar 23, 2001
by
James Hatheway
Committed by
Alexandre Julliard
Mar 23, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- MCI_SAVE should overwrite its destination file.
- widClose() is sometimes failing... MCI (in WAVE_mciRecordCallback) shouldn't queue up buffers if it knows we are no longer recording.
parent
95153363
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
4 deletions
+24
-4
mciwave.c
dlls/winmm/mciwave/mciwave.c
+24
-4
No files found.
dlls/winmm/mciwave/mciwave.c
View file @
d73c9063
...
...
@@ -861,9 +861,16 @@ static void CALLBACK WAVE_mciRecordCallback(HWAVEOUT hwo, UINT uMsg,
wmw
->
dwPosition
+=
count
;
wmw
->
dwRemaining
-=
count
;
waveInAddBuffer
(
wmw
->
hWave
,
lpWaveHdr
,
sizeof
(
*
lpWaveHdr
));
TRACE
(
"after mmioWrite dwPosition=%lu
\n
"
,
wmw
->
dwPosition
);
if
(
wmw
->
dwStatus
==
MCI_MODE_RECORD
)
{
/* Only queue up another buffer if we are recording. We could receive this
message also when waveInReset() is called, since it notifies on all wave
buffers that are outstanding. Queueing up more sometimes causes waveInClose
to fail. */
waveInAddBuffer
(
wmw
->
hWave
,
lpWaveHdr
,
sizeof
(
*
lpWaveHdr
));
TRACE
(
"after mmioWrite dwPosition=%lu
\n
"
,
wmw
->
dwPosition
);
}
SetEvent
(
wmw
->
hEvent
);
break
;
default:
...
...
@@ -1215,7 +1222,7 @@ static DWORD WAVE_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
static
DWORD
WAVE_mciSave
(
UINT
wDevID
,
DWORD
dwFlags
,
LPMCI_SAVE_PARMS
lpParms
)
{
WINE_MCIWAVE
*
wmw
=
WAVE_mciGetOpenDev
(
wDevID
);
DWORD
ret
=
MCIERR_FILE_NOT_SAVED
;
DWORD
ret
=
MCIERR_FILE_NOT_SAVED
,
tmpRet
;
WPARAM
wparam
=
MCI_NOTIFY_FAILURE
;
TRACE
(
"%d, %08lX, %p);
\n
"
,
wDevID
,
dwFlags
,
lpParms
);
...
...
@@ -1233,6 +1240,19 @@ static DWORD WAVE_mciSave(UINT wDevID, DWORD dwFlags, LPMCI_SAVE_PARMS lpParms)
ret
=
mmioClose
(
wmw
->
hFile
,
0
);
/*
If the destination file already exists, it has to be overwritten. (Behaviour
verified in Windows (2000)). If it doesn't overwrite, it is breaking one of
my applications. We are making use of mmioRename, which WILL NOT overwrite
the destination file (which is what Windows does, also verified in Win2K)
So, lets delete the destination file before calling mmioRename. If the
destination file DOESN'T exist, the delete will fail silently. Let's also be
careful not to lose our previous error code.
*/
tmpRet
=
GetLastError
();
DeleteFileA
(
lpParms
->
lpfilename
);
SetLastError
(
tmpRet
);
if
(
0
==
mmioRenameA
(
wmw
->
openParms
.
lpstrElementName
,
lpParms
->
lpfilename
,
0
,
0
))
{
ret
=
ERROR_SUCCESS
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment