Classes that mix audio.
| ACS_AudioMix | Classes that mix audio. |
| Enumerations | |
| TAudioMixerMode | This enumeration represents the different modes of operation for a TAudioMixer. |
| TAudioMixer | This component can mix or concatenate two input audio streams. |
| 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. |
| TRealTimeMixer | This component can mix two input audio streams in real timr. |
| Properties | |
| Input1 | Use this property to set the first input stream to be mixed. |
| Input2 | Use this property to set the second input stream to be mixed or concatenated. |
| OutSampleRate | Use this property to set the output sample rate for the mixer. |
| OutBitsPerSample | Use this property to set the output number of bits per sample for the mixer. |
| OutChannels | Use this property to set the number of channels for the mixer. |
This enumeration represents the different modes of operation for a 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.
| 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. |
This property sets the mode for the TAudioMixer. The possible values for this property are amMix and amConcatenate.
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.
| Properties | |
| Input1 | Use this property to set the first input stream to be mixed. |
| Input2 | Use this property to set the second input stream to be mixed or concatenated. |
| OutSampleRate | Use this property to set the output sample rate for the mixer. |
| OutBitsPerSample | Use this property to set the output number of bits per sample for the mixer. |
| OutChannels | Use this property to set the number of channels for the mixer. |
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.
Use this property to set the second input stream to be mixed or concatenated. See the note at Input1