ACS_AudioMix

Classes that mix audio.

Summary
ACS_AudioMixClasses that mix audio.
Enumerations
TAudioMixerModeThis enumeration represents the different modes of operation for a TAudioMixer.
TAudioMixerThis component can mix or concatenate two input audio streams.
Properties
Input1Use this property to set the first input stream to be mixed or concatenated.
Input2Use this property to set the second input stream to be mixed or concatenated.
ModeThis property sets the mode for the TAudioMixer.
TRealTimeMixerThis component can mix two input audio streams in real timr.
Properties
Input1Use this property to set the first input stream to be mixed.
Input2Use this property to set the second input stream to be mixed or concatenated.
OutSampleRateUse this property to set the output sample rate for the mixer.
OutBitsPerSampleUse this property to set the output number of bits per sample for the mixer.
OutChannelsUse this property to set the number of channels for the mixer.

Enumerations

TAudioMixerMode

This enumeration represents the different modes of operation for a TAudioMixer.

amMixthe mixer mixes input streams and the size of the resulting stream is equal to the size of the longest input stream.
amConcatenatethe two streams are concatenated together and the size of the resulting stream is the sum of the sizes of the input streams.  Input1 is written before Input2.

TAudioMixer

This component can mix or concatenate two input audio streams.  Unlike other stream converter components, TAudioMixer component has two input properties: Input1 and Input2.  The input streams should have the same number of channels and sample rates (but may have a different number of bits per sample).  Note that input streams may be of different sizes.  In amMix mode the streams start at the same time, but the longer stream will play alone after the shorter stream has ended.  In amConcatenate mode the second input will play after the first input has ended.  Volume1 and Volume2 properties can contronl level of the first and second input respectively in both mixing and concatenation modes.

This cpmonent decends from TAuInput.

Summary
Properties
Input1Use this property to set the first input stream to be mixed or concatenated.
Input2Use this property to set the second input stream to be mixed or concatenated.
ModeThis property sets the mode for the TAudioMixer.

Properties

Input1

Use this property to set the first input stream to be mixed or concatenated.

Input2

Use this property to set the second input stream to be mixed or concatenated.

Mode

This property sets the mode for the TAudioMixer.  The possible values for this property are amMix and amConcatenate.

TRealTimeMixer

This component can mix two input audio streams in real timr.  Unlike other stream converter components, TRealTime component has two input properties: Input1 and Input2.  The input streams should have the same number of channels and sample rates (but may have a different number of bits per sample).

The difference between TRealTimeMixer and TAudioMixer is that you can change the inputs while the mixer is running.  In fact once the real time mixer is started it will be generating output untill it is stopped explicitly.  The mixer will generate silens if it has no input currently.  See the docs below on how to assign inputs to the real time mixer.  Volume1 and Volume2 properties can contronl level of the first and second input respectively.

This cpmonent decends from TAuInput.

Summary
Properties
Input1Use this property to set the first input stream to be mixed.
Input2Use this property to set the second input stream to be mixed or concatenated.
OutSampleRateUse this property to set the output sample rate for the mixer.
OutBitsPerSampleUse this property to set the output number of bits per sample for the mixer.
OutChannelsUse this property to set the number of channels for the mixer.

Properties

Input1

Use this property to set the first input stream to be mixed.  Assigning input to the real time mixer is tricky.  The component assigned to the mixer as an input should be ready to provide data at once.  For example if you assign a file input component as a mixing input, the file name should be assigned first to that input component.  If you want to change the file to be mixed on the fly without changing the input component t could lok like this:

WaveIn1.FileName := 'File.wav';
RealTimeMixer1.Input1 := WaveIn1;

...

RealTimeMixer1.Input1 := nil;
WaveIn1.FileName := 'NewFile.wav';
RealTimeMixer1.Input1 := WaveIn1;

Assigning nil to Input1 or Input2 makes the correspondent channel silent until you assign to it something else.

Input2

Use this property to set the second input stream to be mixed or concatenated.  See the note at Input1

OutSampleRate

Use this property to set the output sample rate for the mixer.  All the mixer inputs should have this sample rate.

OutBitsPerSample

Use this property to set the output number of bits per sample for the mixer.  The mixer inputs may have different bit depths.

OutChannels

Use this property to set the number of channels for the mixer.  All the mixer inputs should have the same number of channels.

This component can mix or concatenate two input audio streams.
The ancestor class for all input components.
the mixer mixes input streams and the size of the resulting stream is equal to the size of the longest input stream.
the two streams are concatenated together and the size of the resulting stream is the sum of the sizes of the input streams.
Use this property to set the first input stream to be mixed.
Close