TCustomRVMicrophone.OnOpenWavFile, OnReadWavFile, OnCloseWavFile

<< Click to display table of contents >>

TCustomRVMicrophone.OnOpenWavFile, OnReadWavFile, OnCloseWavFile

The events occur when reading sound from a WAV file.

type // defined in MRVType unit
  TRVOpenWavFileEvent = procedure(Sender: TObject;

    WavSampleCount, WavSamplesPerSec,
    WavBitsPerSample, WavChanneles : Integer) of object;
  TRVReadWavFileEvent = procedure(Sender: TObject;

    CurSample, Samples: Integer) of object;
  TRVCloseWavFileEvent = procedure(Sender: TObject;

    CurSample, SampleCount: Integer) of object;

 
property OnOpenWavFile: TRVOpenWavFileEvent;
property OnReadWavFile: TRVReadWavFileEvent;
property OnCloseWavFile: TRVCloseWavFileEvent;

OnOpenWavFile occurs when WAV file is opened.

Parameters:

WavSampleCount – count of sound samples in the file

WavSamplesPerSec – sample rate

WavBitsPerSample – bit depth

WavChanneles – count of channels

 

OnReadWavFile occurs while WAV file is read.

Parameters:

CurSample – number of the current sound sample

SampleCount – total count of sound samples in the file

 

OnCloseWavFile occurs when WAV file is closed.

Parameters:

CurSample – number of the last read sound sample

SampleCount – total count of sound samples in the file

If CurSample<SampleCount, processing was aborted. If CurSample=SampleCount, the file is processed competely.

 

See also:

SourceType

WAVFileName