本文整理汇总了C++中OutputStream::getPan方法的典型用法代码示例。如果您正苦于以下问题:C++ OutputStream::getPan方法的具体用法?C++ OutputStream::getPan怎么用?C++ OutputStream::getPan使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OutputStream
的用法示例。
在下文中一共展示了OutputStream::getPan方法的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;
}
}
示例2: wrap_getPan
static int wrap_getPan(lua_State* L) {
lua_settop(L, 1);
OutputStream* self = luaAudiere_checkOutputStream(L, 1);
lua_pushnumber(L, self->getPan());
return 1;
}