Interface ALSimpleAudioBuffer.IALAudioBuffer
From Mitov Wiki Doc
This is a Beta Read Only version of this page. Please review and send recommendations to mitov@mitov.com. We will enable the editing as soon as we are happy with the overall Wiki site.
Package: AudioLabBasicPkg
Unit: ALSimpleAudioBuffer
Inherits: IMLMediaBuffer
Contents |
Syntax
Delphi:
type IALAudioBuffer = interface( IMLMediaBuffer )
Summary
Audio data buffer interface.
Description
Defines Audio data buffer interface.
Properties
- Item - Access to individual sample of individual audio channel of the audio data buffer.
- Channels - Access to individual audio channel of the audio data buffer.
Methods
- function GetChannels() : Cardinal - Returns the number of channels for the buffer data.
- function GetBitsPerSample() : Cardinal - Returns the bits per sample for the buffer data.
- function GetSamplesPerSecond() : Cardinal - Returns the Sample Rate in Audio Samples Per Second.
- function GetDataStep() : Cardinal - Returns the step in bytes between each 2 audio samples.
- function GetChannelMask() : TALSpeakers - Returns the channel mask indicating which channels (Speakers) are active.
- function GetSampleBitWidth() : Cardinal - Returns the size of each sample in number of bits.
- function GetWaveFormat() : TALWaveFormatExtensible - Returns the WaveFormatExtensible structure for the audio data in the buffer.
- function GetDataOffset() : Cardinal - Returns the offset from the beginning of the buffer where the format information ends and the real data starts. This method is rarely used.
- function Read() : PAnsiChar - Returns read only pointer to the buffer data.
- function Write() : PAnsiChar - Returns write pointer to the buffer data.
- function Modify() : PAnsiChar - Returns read and write pointer to the buffer data.
- function GetItem(Index : Cardinal; Channel : Cardinal) : Integer - Returns individual sample of individual audio channel of the audio data buffer.
- procedure SetItem(Index : Cardinal; Channel : Cardinal; AValue : Integer) - Sets value to individual sample of individual audio channel of the audio data buffer.
- procedure Add(Right : IALAudioBuffer) - Adds the values of the samples of another buffer to the corresponding samples of this buffer.
- procedure Subtract(Right : IALAudioBuffer) - Subtracts the samples in the buffer by the corresponding samples of another buffer.
- procedure Multiply(Right : IALAudioBuffer) - Multiples the samples in the buffer by the corresponding samples of another buffer.
- procedure Divide(Right : IALAudioBuffer) - Divides the samples in the buffer by the corresponding samples of another buffer.
- procedure SetValue(AValue : Integer) - Sets all samples of the buffer to a specified value.
- procedure AddValue(AValue : Integer) - Adds an integer value to each element of the buffer.
- procedure SubtractValue(AValue : Integer) - Subtracts an integer value from each element of the buffer.
- procedure MultiplyValue(AValue : Integer) - Multiplies an integer value to each element of the buffer.
- procedure DivideValue(AValue : Integer) - Divides each element of the buffer data by a value.
- procedure SetChannelValue(AChannel : Integer; AValue : Integer) - Sets all samples of a buffer channel to a specified value.
- procedure AddChannelValue(AChannel : Integer; AValue : Integer) - Adds an integer value to each element of a buffer channel.
- procedure SubChannelValue(AChannel : Integer; AValue : Integer) - Sets all samples of a buffer channel to a specified value.
- procedure MulChannelValue(AChannel : Integer; AValue : Integer) - Multiplies an integer value to each element of a buffer channel.
- procedure DivChannelValue(AChannel : Integer; AValue : Integer) - Divides each element of the buffer channel data by a value.
- procedure Zero() - Sets all the samples of the buffer to Zero (Silence).
- procedure MultiplyByReal(AValue : Real) - Multiplies the data in the buffer by a real.
- procedure Resize(Size : Cardinal; PreserveData : Boolean) - Resizes the array and the contained buffers.
- function GetChannel(AIndex : Cardinal) : ISLIntegerBuffer - Returns the channel data ad an ISLIntegerBuffer.
- function GetChannelAsReal(AIndex : Cardinal) : ISLRealBuffer - Returns the channel data ad an ISLRealBuffer.