本文整理汇总了C++中AudioBuffer::getBuffer方法的典型用法代码示例。如果您正苦于以下问题:C++ AudioBuffer::getBuffer方法的具体用法?C++ AudioBuffer::getBuffer怎么用?C++ AudioBuffer::getBuffer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AudioBuffer
的用法示例。
在下文中一共展示了AudioBuffer::getBuffer方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mixAudioBufferChannelsLogrithmicDRC
void mixAudioBufferChannelsLogrithmicDRC(AudioBuffer &audioBuffer, std::vector<float> &channelLevels, AudioBuffer &mixBuffer, float threshold)
{
if(audioBuffer.getChannels() == 0)
return;
AudioFormat format=audioBuffer.getFormat();
unsigned int samples=audioBuffer.getSamples();
switch(format)
{
case AudioFormat::UInt8:
case AudioFormat::UInt8P:
mixChannelsLogrithmicDRC<uint8_t>((uint8_t *)audioBuffer.getBuffer(), channelLevels, (uint8_t *)mixBuffer.getBuffer(), samples, threshold);
break;
case AudioFormat::Int16:
case AudioFormat::Int16P:
mixChannelsLogrithmicDRC<int16_t>((int16_t *)audioBuffer.getBuffer(), channelLevels, (int16_t *)mixBuffer.getBuffer(), samples, threshold);
break;
case AudioFormat::Int32:
case AudioFormat::Int32P:
mixChannelsLogrithmicDRC<int32_t>((int32_t *)audioBuffer.getBuffer(), channelLevels, (int32_t *)mixBuffer.getBuffer(), samples, threshold);
break;
case AudioFormat::Float:
case AudioFormat::FloatP:
mixChannelsLogrithmicDRC<float>((float *)audioBuffer.getBuffer(), channelLevels, (float *)mixBuffer.getBuffer(), samples, threshold);
break;
case AudioFormat::Double:
case AudioFormat::DoubleP:
mixChannelsLogrithmicDRC<double>((double *)audioBuffer.getBuffer(), channelLevels, (double *)mixBuffer.getBuffer(), samples, threshold);
break;
}
}
示例2: callMixAudioBufferLogrithmicDRC
void callMixAudioBufferLogrithmicDRC(std::vector<AudioBuffer> const &audioBuffers, AudioBuffer &mixBuffer, unsigned int samples, float threshold)
{
std::vector<_Type *> buffers(audioBuffers.size());
for(size_t i=0; i<audioBuffers.size(); ++i)
buffers[i]=(_Type *)audioBuffers[i].getBuffer();
mixLogrithmicDRC<_Type>(buffers, (_Type *)mixBuffer.getBuffer(), samples, threshold);
}
示例3: callMixLinearAttenuation
void callMixLinearAttenuation(std::vector<AudioBuffer> const &audioBuffers, AudioBuffer &mixBuffer, unsigned int samples)
{
std::vector<_Type *> buffers(audioBuffers.size());
for(size_t i=0; i<audioBuffers.size(); ++i)
buffers[i]=(_Type *)audioBuffers[i].getBuffer();
mixLinearAttenuation<_Type>(buffers, (_Type *)mixBuffer.getBuffer(), samples);
}