当前位置: 首页>>代码示例>>C++>>正文


C++ AudioBuffer::getBuffer方法代码示例

本文整理汇总了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;
	}
}
开发者ID:InfiniteInteractive,项目名称:LimitlessSDK,代码行数:32,代码来源:audioMix.cpp

示例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);
}
开发者ID:InfiniteInteractive,项目名称:LimitlessSDK,代码行数:9,代码来源:audioMix.cpp

示例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);
}
开发者ID:InfiniteInteractive,项目名称:LimitlessSDK,代码行数:9,代码来源:audioMix.cpp


注:本文中的AudioBuffer::getBuffer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。