📄 aflibaudiomixer.3
字号:
.TH "aflibAudioMixer" 3 "8 May 2002" "Open Source Audio Library Project" \" -*- nroff -*-.ad l.nh.SH NAMEaflibAudioMixer \- Audio Mixing class. .SH SYNOPSIS.br.PP\fC#include <aflibAudioMixer.h>\fP.PPInherits \fBaflibAudio\fP..PPInherited by \fBaflibAudioStereoToMono\fP..PP.SS "Public Methods".in +1c.ti -1c.RI "\fBaflibAudioMixer\fP (\fBaflibAudio\fP &audio)".br.RI "\fIConstructor that requires a parent.\fP".ti -1c.RI "\fBaflibAudioMixer\fP ()".br.RI "\fIConstructor that does not require a parent.\fP".ti -1c.RI "\fB~aflibAudioMixer\fP ()".br.RI "\fIDestructor.\fP".ti -1c.RI "\fBaflibStatus\fP \fBaddMix\fP (int input, int in_chan, int out_chan, int amp)".br.RI "\fIAdds a mix element.\fP".ti -1c.RI "\fBaflibStatus\fP \fBdelMix\fP (int input, int in_chan, int out_chan)".br.RI "\fIDeletes a mix element.\fP".ti -1c.RI "void \fBdelAllMix\fP ()".br.RI "\fIDeletes all mix elements.\fP".ti -1c.RI "int \fBgetNumOfMixs\fP ()".br.RI "\fIReturns the current number of active mix elements.\fP".ti -1c.RI "\fBaflibStatus\fP \fBgetMix\fP (int mix_num, int &input, int &in_chan, int &out_chan, int &)".br.RI "\fIReturns information on a specific mix element.\fP".ti -1c.RI "void \fBsetInputConfig\fP (const \fBaflibConfig\fP &cfg)".br.RI "\fISets the input audio data configuration of an object.\fP".ti -1c.RI "\fBaflibStatus\fP \fBcompute_segment\fP (list< \fBaflibData\fP * > &data, long long position=-1)".br.RI "\fIWork function, must be implemented by derived class.\fP".ti -1c.RI "const char * \fBgetName\fP () const".br.RI "\fIReturns the name of the derived class.\fP".ti -1c.RI "bool \fBisDataSizeSupported\fP (\fBaflib_data_size\fP size)".br.ti -1c.RI "bool \fBisEndianSupported\fP (\fBaflib_data_endian\fP end)".br.ti -1c.RI "bool \fBisSampleRateSupported\fP (int &rate)".br.in -1c.SH "DETAILED DESCRIPTION".PP Audio Mixing class..PPThis class provides for mixing 1 or more inputs together to a single output..PPIt is derived from \fBaflibAudio\fP and thus can be used in a chain. It will mix any number of channels, inputs to one output. The output can have multiple channels. It will also allow one to adjust the amplitude of each input. This class will force each input to have the same characteristics such as sample rate, data size and endian. If they are not then it will rely on the \fBaflibAudio\fP chain to automatically convert the data. The sample rate will be converted to the highest value for all inputs. The data size will also be converted to the largest size amoungst the inputs. The output will then be this selection of values. The mixing is performed by mapping inputs to outputs. This is done with the addMix function. Additional parents can be added by using the addParent call in the \fBaflibChain\fP base class. The ID returned from this call should be used for the addMix call. The parent passed in the constructor has an ID of 1. If a parent is removed then all mixes that reference this input will be removed. .PP.SH "CONSTRUCTOR & DESTRUCTOR DOCUMENTATION".PP .SS "aflibAudioMixer::aflibAudioMixer (\fBaflibAudio\fP & audio)".PPConstructor that requires a parent..PP.SS "aflibAudioMixer::aflibAudioMixer ()".PPConstructor that does not require a parent..PP.SS "aflibAudioMixer::~aflibAudioMixer ()".PPDestructor..PP.SH "MEMBER FUNCTION DOCUMENTATION".PP .SS "\fBaflibStatus\fP aflibAudioMixer::addMix (int input, int in_chan, int out_chan, int amp)".PPAdds a mix element..PPThis will add an element to be mixed. Any input specified must exist..PPIf an input was passed to the aflibAudioMixer constructor then that input is number 1. Use the return value from addParent there on..PPThe amplitude can be specified as any value between 1 and 100. This corresponds to 1 and 100 percent of full scale..PPThe in_chan is the channel number of the input to use. The out_chan is the same but indicates the output channel to use. The first channel for inputs and outputs start at 0. For example to mix a stereo input to a mono output one would call addMix twice with (1, 0, 0, 100) & (1, 1, 0, 100). This would take channels 0 and 1 of input 1, and output both to channel 0..PPIf inputs differ in their configuration then the output configuration will be the greater of eachs configs. See the documentation for setInputConfig for exactly how this is done..PPIf the mix was added successfully then AFLIB_SUCCESS will be returned. A mix with same input, in_chan, out_chan values will replace the old values. .SS "\fBaflibStatus\fP aflibAudioMixer::compute_segment (list< \fBaflibData\fP * > & data, long long position = -1)\fC [virtual]\fP".PPWork function, must be implemented by derived class..PPReimplemented from \fBaflibAudio\fP..SS "void aflibAudioMixer::delAllMix ()".PPDeletes all mix elements..PPThis will delele all current mix elements. .SS "\fBaflibStatus\fP aflibAudioMixer::delMix (int input, int in_chan, int out_chan)".PPDeletes a mix element..PPThis will delele a current mix element. If successful then AFLIB_SUCCESS will be returned else if the item was not found then AFLIB_NOT_FOUND will be returned. .SS "\fBaflibStatus\fP aflibAudioMixer::getMix (int mix_num, int & input, int & in_chan, int & out_chan, int & amp)".PPReturns information on a specific mix element..PPThis will retrieve the current values for a specific mix element. One should call getNumOfMixes first. Mix numbers start at 1. .SS "const char* aflibAudioMixer::getName () const\fC [inline, virtual]\fP".PPReturns the name of the derived class..PPReimplemented from \fBaflibAudio\fP..PPReimplemented in \fBaflibAudioStereoToMono\fP..SS "int aflibAudioMixer::getNumOfMixs ()".PPReturns the current number of active mix elements..PP.SS "bool aflibAudioMixer::isDataSizeSupported (\fBaflib_data_size\fP size)\fC [virtual]\fP".PPReimplemented from \fBaflibAudio\fP..SS "bool aflibAudioMixer::isEndianSupported (\fBaflib_data_endian\fP end)\fC [virtual]\fP".PPReimplemented from \fBaflibAudio\fP..SS "bool aflibAudioMixer::isSampleRateSupported (int & rate)\fC [virtual]\fP".PPReimplemented from \fBaflibAudio\fP..SS "void aflibAudioMixer::setInputConfig (const \fBaflibConfig\fP & cfg)\fC [virtual]\fP".PPSets the input audio data configuration of an object..PPThis is a virtual function that derived classes can override if needed. It allows the caller to set the configuration of the audio data of an object. By default it saves the output audio configuration to be the same as the input data configuration that is passed in. This should be sufficient for most derived classes. For those classes that will have a change from the output to input config mapping then this function should be overriden and the output config processed and saved. .PPReimplemented from \fBaflibAudio\fP..SH "AUTHOR".PP Generated automatically by Doxygen for Open Source Audio Library Project from the source code.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -