piotr Member
Joined: 06 Apr 2004 Posts: 1
|
Posted: 06/04/04 08:36 Post subject: [WA] Loop sound |
|
|
Congratulations, WA is very god job.
However, i'm looking for simple method to loop played sounds, when i simply try to add Active:= True in OnDeactivate event, i recived out of memory error. |
|
Kambiz Administrator

Joined: 07 Mar 2003 Posts: 308
|
Posted: 11/04/04 14:22 Post subject: |
|
|
I did it in the following way, and it worked.
| Code: | unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, WaveIO, WaveOut, WavePlayers;
type
TForm1 = class(TForm)
AudioPlayer: TAudioPlayer;
cbActive: TCheckBox;
procedure AudioPlayerDeactivate(Sender: TObject);
procedure cbActiveClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.AudioPlayerDeactivate(Sender: TObject);
begin
AudioPlayer.Active := cbActive.Checked;
end;
procedure TForm1.cbActiveClick(Sender: TObject);
begin
AudioPlayer.Active := cbActive.Checked;
end;
end. |
|
|