Re:TMediaplayer sound Recorder
In article <3acdde9...@news1.vip.uk.com>, "it_rover" <l...@rover66.fsnet.co.uk>
writes:
Quote
>I have written a sound recorder program with Tmediaplayer
>but when I rewind part way and want to record over something
>the new recording gets inserted instead of overwriting the old sounds
>is ther any easy way to overwrite.
The short answer is No <g>
Insert is the default operation for window's MCI_RECORD command, and Delphi
does not have an easy way to override this (at least in D3).
The long answer is that the outline of what you must do is ...
In MediaPlayer.OnClick ...
If Button = btRecord then begin
DoDefault := false;
Set dwItem of MCI_STATUS_PARMS to MCI_STATUS_POSITION
Call mciSendCommand(MCI_STATUS .... with additional flag of MCI_STATUS_ITEM
Set dwFrom in MCI_RECORD_PARMS to the position you have obtained
Call mciSendCommand(MCI_RECORD ... with additional flags of MCI_FROM and
MCI_RECORD_OVERWRITE
end;
The additional flags are extra to optional MCI_WAIT and MCI_NOTIFY flags
mciSendString _might_ be easier, but there's still as much knowledge to
acquire, even if the code is less <g>.
Dig in MMSystem.hlp or MultiMedia.hlp for assistance on these calls. The
MediaPlayer hides a _lot_ of "grunt work" for you.
Alan Lloyd
alangll...@aol.com