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


C++ OutputStream::getPitchShift方法代码示例

本文整理汇总了C++中OutputStream::getPitchShift方法的典型用法代码示例。如果您正苦于以下问题:C++ OutputStream::getPitchShift方法的具体用法?C++ OutputStream::getPitchShift怎么用?C++ OutputStream::getPitchShift使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OutputStream的用法示例。


在下文中一共展示了OutputStream::getPitchShift方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

void D3DCore_Impl::Channel_SlideTo(HCHANNEL chn, float time, int volume, int pan, float pitch)
{
	if(!m_pADevice) return;

	bool existChannel = false;
	for( Channel* I = channels; I != NULL; I = I->next )
		if( I->Handler == chn )
		{
			existChannel = true;
			break;
		}


	if(!existChannel)
	{
		for( CStreamList* I = streams; I != NULL; I = I->next )
			if( I->hstream == chn )
			{
				existChannel = true;
				break;
			}
	}

	if(existChannel)
	{
		Slide* nSlide = new Slide;
		nSlide->chn = (OutputStream*)chn;
		nSlide->time = time;

		OutputStream* OStream = (OutputStream*)chn;

		nSlide->dVolume = 0.0f;
		if( volume != -1 )
		{
			float OldVolume = OStream->getVolume();
			float NewVolume = volume*1.0f;
			if( volume == -2 ) NewVolume = 0.0f;
			nSlide->dVolume = (NewVolume - OldVolume)/time;
		}

		nSlide->dPan = 0.0f;
		if(pan != -101)
		{
			float OldPan = OStream->getPan();
			float NewPan = pan/100.0f;
			nSlide->dPan = (NewPan - OldPan)/time;
		}
			
		nSlide->dPitch = 0.0f;
		if(pan != -101)
		{
			float OldPitch = OStream->getPitchShift();
			float NewPitch = pitch;
			nSlide->dPan = (NewPitch - OldPitch)/time;
		}

		nSlide->next = slides;
		slides = nSlide;		
	}
}
开发者ID:manituan,项目名称:Arkavoid,代码行数:60,代码来源:Audiere.cpp

示例2: wrap_getPitchShift

static int wrap_getPitchShift(lua_State* L) {
  lua_settop(L, 1);
  OutputStream* self = luaAudiere_checkOutputStream(L, 1);
  lua_pushnumber(L, self->getPitchShift());
  return 1;
}
开发者ID:Bananattack,项目名称:audiere,代码行数:6,代码来源:wrapOutputStream.cpp


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