DELPHI 1
TWave - non-visual component for playing .WAV files or resources.

v1.02 (c) a.lee 1997

Properties
  -OPTIONS
    woSync      - The sound is played synchronously and the 
                  function does not return until the sound ends.
    woNoDefault - If the sound can't be found, the function returns 
                  silently without playing the default sound.
    woLoop      - The sound will continue to play repeatedly.
    woNoStop    - If a sound is currently playing, the function 
                  will immediately return FALSE without playing 
                  the requested sound.

  WhereWave
    (wwInFile   - WaveName -> file name
     wwInExe)   - WaveName -> resource name

  WaveName      - file or resource name
  ResourceType  - resource type ('WAVE' for example)

Methods
  function Execute : boolean;   - Play sound!
  function StopSound : boolean; - no comment

Exceptions
  [All generated through Abort]

PS
  How to make .WAV in resource?

Create file wavetest.rc

MYSUPERSOUND WAVE c:\...\...\thewave.wav
             ^^^^ - resource type you defined 
                    You must spicify it in ResourceType property

Then creating *.res file (brcc wavetest.rc)

Append to our programm

{$R wavetest.res}

In programm write

procedure [Form1].Button1Click(...);
begin
  with Wave1 do
    begin
      WaveName := 'MYSUPERSOUND';
      ResourceType := 'WAVE';
      WhereWave := wwInExe;
      if not Execute
      then
        MessageDlg('Somthing wrong', mtError, [mb_ok], 0);
    end;
end;

So, wish you good luck.

Ali Butaev
E-mail: alee@datacom.ru
