This demo converts stereo to mono. If the input is mono it is left as is, if the input is stereo it is converted to mono.
| Audio Processor | This demo converts stereo to mono. |
| Functions | |
| FormClose | This OnClose event prevents exceptions if he form is closed while playing. |
| Variables | |
| Buffers | We assume the input is 16 bits per sample. |
| Get Data | A all to Input.GetData(Buffer, Bytes) retrieves a part of the input component’s buffer (pointed to by Buffer) that contains The number of bytes returned in Bytes. |
| FillBuffer | EndOfInput is set to True when FillBuffer has encountered the end of data in AudioProcessor1.Input. |
A all to Input.GetData(Buffer, Bytes) retrieves a part of the input component’s buffer (pointed to by Buffer) that contains The number of bytes returned in Bytes.
See the Component Writer’s Guide on more detail about how GetData() operates.
This OnClose event prevents exceptions if he form is closed while playing.
procedure TForm1.FormClose( Sender: TObject; var Action: TCloseAction )