Hi All,
I'm porting a Delphi 7 program to Lazarus and I cannot find a TMediaPlayer component. I need a MediaPlayer-like component so that I can play Micro$oft Windows .WAV (sound wave files).
Below is the code I'm trying to convert to Lazarus:
Any help will be appreciated.Code:var MediaPlayer1 : TMediaPlayer; .... procedure TMainForm.play_wave(sound_effect_wave_filename: string); begin if Want_Sound then begin // note: this 'if' test has deliberately NOT been // combined with the above 'if Want_sound' test // so that we only check 'if FileExists' when we want sound effects. // IOW - don't check FileExists if we don't want sound effects. if FileExists(sound_effect_wave_filename) then begin with MediaPlayer1 do begin filename := sound_effect_wave_filename; AutoRewind := true; Open; Wait := true; Play; Close; end; end; end; end;
Yours Sincerely and With Best Wishes,
pew { Peter_from_Hobart }
signing off from Hobart, Tasmania, Australia
(in Winter time here)
Bookmarks