Board index » delphi » Recording a NEW .WAV through TMediaPlayer

Recording a NEW .WAV through TMediaPlayer

Has anyone managed to do this?  I've managed to record to an existing
.WAV, but creation of a new one *seems* to be beyond the scope of
TMediaPlayer (in fact, looking at the source, I *thought* I could see
on good reason why it wouldn't) ...

Any help appreciated.

Cheers,

Russ.

 

Re:Recording a NEW .WAV through TMediaPlayer


In article 2689...@news.demon.co.uk, sco...@cheddary.demon.co.uk (Russ Garner) writes:

Quote
>Has anyone managed to do this?  I've managed to record to an existing
>..WAV, but creation of a new one *seems* to be beyond the scope of
>TMediaPlayer (in fact, looking at the source, I *thought* I could see
>on good reason why it wouldn't) ...

>Russ.

A:  uses MMSystem;

    procedure TForm1.PrepareNewWave;
    var
      DevID: LongInt;
    begin
    DevID:=mciSendString('open new type waveaudio alias tmp',nil,0,0);
    DevID:=mciSendString('save tmp c:\tmp.wav',nil,0,0);
    DevID:=mciSendString('close tmp',nil,0,0);
    MediaPlayer1.Filename:='c:\tmp.wav';
    MediaPlayer1.Open;
    end;

Brst regards,
Michael Vincze
vin...@ti.com

Other Threads