• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ LookupEffectSlot函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中LookupEffectSlot函数的典型用法代码示例。如果您正苦于以下问题:C++ LookupEffectSlot函数的具体用法?C++ LookupEffectSlot怎么用?C++ LookupEffectSlot使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: alDeleteAuxiliaryEffectSlots

AL_API ALvoid AL_APIENTRY alDeleteAuxiliaryEffectSlots(ALsizei n, ALuint *effectslots)
{
    ALCcontext *Context;
    ALeffectslot *EffectSlot;
    ALboolean SlotsValid = AL_FALSE;
    ALsizei i;

    Context = GetContextSuspended();
    if(!Context) return;

    if(n < 0)
        alSetError(Context, AL_INVALID_VALUE);
    else
    {
        SlotsValid = AL_TRUE;
        // Check that all effectslots are valid
        for(i = 0;i < n;i++)
        {
            if((EffectSlot=LookupEffectSlot(Context->EffectSlotMap, effectslots[i])) == NULL)
            {
                alSetError(Context, AL_INVALID_NAME);
                SlotsValid = AL_FALSE;
                break;
            }
            else if(EffectSlot->refcount > 0)
            {
                alSetError(Context, AL_INVALID_NAME);
                SlotsValid = AL_FALSE;
                break;
            }
        }
    }

    if(SlotsValid)
    {
        // All effectslots are valid
        for(i = 0;i < n;i++)
        {
            // Recheck that the effectslot is valid, because there could be duplicated names
            if((EffectSlot=LookupEffectSlot(Context->EffectSlotMap, effectslots[i])) == NULL)
                continue;

            ALEffect_Destroy(EffectSlot->EffectState);

            RemoveUIntMapKey(&Context->EffectSlotMap, EffectSlot->effectslot);
            ALTHUNK_REMOVEENTRY(EffectSlot->effectslot);

            memset(EffectSlot, 0, sizeof(ALeffectslot));
            free(EffectSlot);
        }
    }

    ProcessContext(Context);
}
开发者ID:120pulsations,项目名称:Torque2D,代码行数:54,代码来源:alAuxEffectSlot.c


示例2: alGetAuxiliaryEffectSlotf

AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat *pflValue)
{
    ALCcontext *Context;
    ALeffectslot *EffectSlot;

    Context = GetContextRef();
    if(!Context) return;

    if((EffectSlot=LookupEffectSlot(Context, effectslot)) != NULL)
    {
        switch(param)
        {
        case AL_EFFECTSLOT_GAIN:
            *pflValue = EffectSlot->Gain;
            break;

        default:
            alSetError(Context, AL_INVALID_ENUM);
            break;
        }
    }
    else
        alSetError(Context, AL_INVALID_NAME);

    ALCcontext_DecRef(Context);
}
开发者ID:Abce,项目名称:OpenAL,代码行数:26,代码来源:alAuxEffectSlot.c


示例3: alGetAuxiliaryEffectSlotiv

AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotiv(ALuint effectslot, ALenum param, ALint *piValues)
{
    ALCcontext *Context;

    switch(param)
    {
        case AL_EFFECTSLOT_EFFECT:
        case AL_EFFECTSLOT_AUXILIARY_SEND_AUTO:
            alGetAuxiliaryEffectSloti(effectslot, param, piValues);
            return;
    }

    Context = GetContextRef();
    if(!Context) return;

    if(LookupEffectSlot(Context, effectslot) != NULL)
    {
        switch(param)
        {
        default:
            alSetError(Context, AL_INVALID_ENUM);
            break;
        }
    }
    else
        alSetError(Context, AL_INVALID_NAME);

    ALCcontext_DecRef(Context);
}
开发者ID:Abce,项目名称:OpenAL,代码行数:29,代码来源:alAuxEffectSlot.c


示例4: alAuxiliaryEffectSlotfv

AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotfv(ALuint effectslot, ALenum param, const ALfloat *pflValues)
{
    ALCcontext *Context;

    switch(param)
    {
        case AL_EFFECTSLOT_GAIN:
            alAuxiliaryEffectSlotf(effectslot, param, pflValues[0]);
            return;
    }

    Context = GetContextRef();
    if(!Context) return;

    if(LookupEffectSlot(Context, effectslot) != NULL)
    {
        switch(param)
        {
        default:
            alSetError(Context, AL_INVALID_ENUM);
            break;
        }
    }
    else
        alSetError(Context, AL_INVALID_NAME);

    ALCcontext_DecRef(Context);
}
开发者ID:Abce,项目名称:OpenAL,代码行数:28,代码来源:alAuxEffectSlot.c


示例5: alGetAuxiliaryEffectSlotfv

AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotfv(ALuint effectslot, ALenum param, ALfloat *values)
{
    ALCcontext *Context;

    switch(param)
    {
        case AL_EFFECTSLOT_GAIN:
            alGetAuxiliaryEffectSlotf(effectslot, param, values);
            return;
    }

    Context = GetContextRef();
    if(!Context) return;

    al_try
    {
        if(LookupEffectSlot(Context, effectslot) == NULL)
            al_throwerr(Context, AL_INVALID_NAME);
        switch(param)
        {
        default:
            al_throwerr(Context, AL_INVALID_ENUM);
        }
    }
    al_endtry;

    ALCcontext_DecRef(Context);
}
开发者ID:clarkdonald,项目名称:eecs494explore3d,代码行数:28,代码来源:alAuxEffectSlot.c


示例6: alGetAuxiliaryEffectSlotfv

AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotfv(ALuint effectslot, ALenum param, ALfloat *values)
{
    ALCcontext *context;

    switch(param)
    {
    case AL_EFFECTSLOT_GAIN:
        alGetAuxiliaryEffectSlotf(effectslot, param, values);
        return;
    }

    context = GetContextRef();
    if(!context) return;

    if(LookupEffectSlot(context, effectslot) == NULL)
        SET_ERROR_AND_GOTO(context, AL_INVALID_NAME, done);
    switch(param)
    {
    default:
        SET_ERROR_AND_GOTO(context, AL_INVALID_ENUM, done);
    }

done:
    ALCcontext_DecRef(context);
}
开发者ID:Banderi,项目名称:OpenTomb,代码行数:25,代码来源:alAuxEffectSlot.c


示例7: alAuxiliaryEffectSlotf

AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat flValue)
{
    ALCcontext *Context;
    ALeffectslot *EffectSlot;

    Context = GetContextRef();
    if(!Context) return;

    if((EffectSlot=LookupEffectSlot(Context, effectslot)) != NULL)
    {
        switch(param)
        {
        case AL_EFFECTSLOT_GAIN:
            if(flValue >= 0.0f && flValue <= 1.0f)
            {
                EffectSlot->Gain = flValue;
                EffectSlot->NeedsUpdate = AL_TRUE;
            }
            else
                alSetError(Context, AL_INVALID_VALUE);
            break;

        default:
            alSetError(Context, AL_INVALID_ENUM);
            break;
        }
    }
    else
        alSetError(Context, AL_INVALID_NAME);

    ALCcontext_DecRef(Context);
}
开发者ID:Abce,项目名称:OpenAL,代码行数:32,代码来源:alAuxEffectSlot.c


示例8: alGetAuxiliaryEffectSloti

AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSloti(ALuint effectslot, ALenum param, ALint *value)
{
    ALCcontext *Context;
    ALeffectslot *Slot;

    Context = GetContextRef();
    if(!Context) return;

    al_try
    {
        if((Slot=LookupEffectSlot(Context, effectslot)) == NULL)
            al_throwerr(Context, AL_INVALID_NAME);
        switch(param)
        {
        case AL_EFFECTSLOT_EFFECT:
            *value = Slot->effect.id;
            break;

        case AL_EFFECTSLOT_AUXILIARY_SEND_AUTO:
            *value = Slot->AuxSendAuto;
            break;

        default:
            al_throwerr(Context, AL_INVALID_ENUM);
        }
    }
    al_endtry;

    ALCcontext_DecRef(Context);
}
开发者ID:clarkdonald,项目名称:eecs494explore3d,代码行数:30,代码来源:alAuxEffectSlot.c


示例9: alGetAuxiliaryEffectSlotf

AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat *value)
{
    ALCcontext *Context;
    ALeffectslot *Slot;

    Context = GetContextRef();
    if(!Context) return;

    al_try
    {
        if((Slot=LookupEffectSlot(Context, effectslot)) == NULL)
            al_throwerr(Context, AL_INVALID_NAME);
        switch(param)
        {
        case AL_EFFECTSLOT_GAIN:
            *value = Slot->Gain;
            break;

        default:
            al_throwerr(Context, AL_INVALID_ENUM);
        }
    }
    al_endtry;

    ALCcontext_DecRef(Context);
}
开发者ID:clarkdonald,项目名称:eecs494explore3d,代码行数:26,代码来源:alAuxEffectSlot.c


示例10: alAuxiliaryEffectSlotiv

AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotiv(ALuint effectslot, ALenum param, const ALint *values)
{
    ALCcontext *Context;

    switch(param)
    {
        case AL_EFFECTSLOT_EFFECT:
        case AL_EFFECTSLOT_AUXILIARY_SEND_AUTO:
            alAuxiliaryEffectSloti(effectslot, param, values[0]);
            return;
    }

    Context = GetContextRef();
    if(!Context) return;

    al_try
    {
        if(LookupEffectSlot(Context, effectslot) == NULL)
            al_throwerr(Context, AL_INVALID_NAME);
        switch(param)
        {
        default:
            al_throwerr(Context, AL_INVALID_ENUM);
        }
    }
    al_endtry;

    ALCcontext_DecRef(Context);
}
开发者ID:clarkdonald,项目名称:eecs494explore3d,代码行数:29,代码来源:alAuxEffectSlot.c


示例11: alAuxiliaryEffectSlotf

AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat value)
{
    ALCcontext *Context;
    ALeffectslot *Slot;

    Context = GetContextRef();
    if(!Context) return;

    al_try
    {
        if((Slot=LookupEffectSlot(Context, effectslot)) == NULL)
            al_throwerr(Context, AL_INVALID_NAME);
        switch(param)
        {
        case AL_EFFECTSLOT_GAIN:
            CHECK_VALUE(Context, value >= 0.0f && value <= 1.0f);

            Slot->Gain = value;
            Slot->NeedsUpdate = AL_TRUE;
            break;

        default:
            al_throwerr(Context, AL_INVALID_ENUM);
        }
    }
    al_endtry;

    ALCcontext_DecRef(Context);
}
开发者ID:clarkdonald,项目名称:eecs494explore3d,代码行数:29,代码来源:alAuxEffectSlot.c


示例12: alGetAuxiliaryEffectSlotfv

AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotfv(ALuint effectslot, ALenum param, ALfloat *pflValues)
{
    ALCcontext *Context;

    Context = GetContextSuspended();
    if(!Context) return;

    if(LookupEffectSlot(Context->EffectSlotMap, effectslot) != NULL)
    {
        switch(param)
        {
        case AL_EFFECTSLOT_GAIN:
            alGetAuxiliaryEffectSlotf(effectslot, param, pflValues);
            break;

        default:
            alSetError(Context, AL_INVALID_ENUM);
            break;
        }
    }
    else
        alSetError(Context, AL_INVALID_NAME);

    ProcessContext(Context);
}
开发者ID:120pulsations,项目名称:Torque2D,代码行数:25,代码来源:alAuxEffectSlot.c


示例13: alGetAuxiliaryEffectSloti

AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSloti(ALuint effectslot, ALenum param, ALint *piValue)
{
    ALCcontext *Context;
    ALeffectslot *EffectSlot;

    Context = GetContextSuspended();
    if(!Context) return;

    if((EffectSlot=LookupEffectSlot(Context->EffectSlotMap, effectslot)) != NULL)
    {
        switch(param)
        {
        case AL_EFFECTSLOT_EFFECT:
            *piValue = EffectSlot->effect.effect;
            break;

        case AL_EFFECTSLOT_AUXILIARY_SEND_AUTO:
            *piValue = EffectSlot->AuxSendAuto;
            break;

        default:
            alSetError(Context, AL_INVALID_ENUM);
            break;
        }
    }
    else
        alSetError(Context, AL_INVALID_NAME);

    ProcessContext(Context);
}
开发者ID:120pulsations,项目名称:Torque2D,代码行数:30,代码来源:alAuxEffectSlot.c


示例14: alAuxiliaryEffectSlotf

AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat flArg)
{
    ALCcontext *Context;
    ALeffectslot *EffectSlot;
	ALfp flValue = float2ALfp(flArg);

    Context = GetContextSuspended();
    if(!Context) return;

    if((EffectSlot=LookupEffectSlot(Context->EffectSlotMap, effectslot)) != NULL)
    {
        switch(param)
        {
        case AL_EFFECTSLOT_GAIN:
            if(flValue >= int2ALfp(0) && flValue <= int2ALfp(1))
                EffectSlot->Gain = flValue;
            else
                alSetError(Context, AL_INVALID_VALUE);
            break;

        default:
            alSetError(Context, AL_INVALID_ENUM);
            break;
        }
    }
    else
        alSetError(Context, AL_INVALID_NAME);

    ProcessContext(Context);
}
开发者ID:120pulsations,项目名称:Torque2D,代码行数:30,代码来源:alAuxEffectSlot.c


示例15: alAuxiliaryEffectSlotiv

AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotiv(ALuint effectslot, ALenum param, const ALint *values)
{
    ALCcontext *context;

    switch(param)
    {
    case AL_EFFECTSLOT_EFFECT:
    case AL_EFFECTSLOT_AUXILIARY_SEND_AUTO:
        alAuxiliaryEffectSloti(effectslot, param, values[0]);
        return;
    }

    context = GetContextRef();
    if(!context) return;

    if(LookupEffectSlot(context, effectslot) == NULL)
        SET_ERROR_AND_GOTO(context, AL_INVALID_NAME, done);
    switch(param)
    {
    default:
        SET_ERROR_AND_GOTO(context, AL_INVALID_ENUM, done);
    }

done:
    ALCcontext_DecRef(context);
}
开发者ID:Banderi,项目名称:OpenTomb,代码行数:26,代码来源:alAuxEffectSlot.c


示例16: alAuxiliaryEffectSlotf

AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat value)
{
    ALCcontext *context;
    ALeffectslot *slot;

    context = GetContextRef();
    if(!context) return;

    if((slot=LookupEffectSlot(context, effectslot)) == NULL)
        SET_ERROR_AND_GOTO(context, AL_INVALID_NAME, done);
    switch(param)
    {
    case AL_EFFECTSLOT_GAIN:
        if(!(value >= 0.0f && value <= 1.0f))
            SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done);

        slot->Gain = value;
        ATOMIC_STORE(&slot->NeedsUpdate, AL_TRUE);
        break;

    default:
        SET_ERROR_AND_GOTO(context, AL_INVALID_ENUM, done);
    }

done:
    ALCcontext_DecRef(context);
}
开发者ID:Banderi,项目名称:OpenTomb,代码行数:27,代码来源:alAuxEffectSlot.c


示例17: alAuxiliaryEffectSlotiv

AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotiv(ALuint effectslot, ALenum param, const ALint *values)
{
    ALCcontext *context;

    switch(param)
    {
    case AL_EFFECTSLOT_EFFECT:
    case AL_EFFECTSLOT_AUXILIARY_SEND_AUTO:
        alAuxiliaryEffectSloti(effectslot, param, values[0]);
        return;
    }

    context = GetContextRef();
    if(!context) return;

    LockEffectSlotList(context);
    if(LookupEffectSlot(context, effectslot) == NULL)
        SETERR_GOTO(context, AL_INVALID_NAME, done, "Invalid effect slot ID %u", effectslot);
    switch(param)
    {
    default:
        alSetError(context, AL_INVALID_ENUM, "Invalid effect slot integer-vector property 0x%04x",
                   param);
    }

done:
    UnlockEffectSlotList(context);
    ALCcontext_DecRef(context);
}
开发者ID:xxxbxxx,项目名称:openal-soft,代码行数:29,代码来源:alAuxEffectSlot.c


示例18: alAuxiliaryEffectSlotf

AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat value)
{
    ALCcontext *context;
    ALeffectslot *slot;

    context = GetContextRef();
    if(!context) return;

    WriteLock(&context->PropLock);
    LockEffectSlotsRead(context);
    if((slot=LookupEffectSlot(context, effectslot)) == NULL)
        SET_ERROR_AND_GOTO(context, AL_INVALID_NAME, done);
    switch(param)
    {
    case AL_EFFECTSLOT_GAIN:
        if(!(value >= 0.0f && value <= 1.0f))
            SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done);
        slot->Gain = value;
        break;

    default:
        SET_ERROR_AND_GOTO(context, AL_INVALID_ENUM, done);
    }
    UpdateEffectSlotProps(slot);

done:
    UnlockEffectSlotsRead(context);
    WriteUnlock(&context->PropLock);
    ALCcontext_DecRef(context);
}
开发者ID:IsemanTech,项目名称:openal-soft,代码行数:30,代码来源:alAuxEffectSlot.c


示例19: alGetAuxiliaryEffectSlotf

AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat *value)
{
    ALCcontext *context;
    ALeffectslot *slot;

    context = GetContextRef();
    if(!context) return;

    LockEffectSlotsRead(context);
    if((slot=LookupEffectSlot(context, effectslot)) == NULL)
        SET_ERROR_AND_GOTO(context, AL_INVALID_NAME, done);
    switch(param)
    {
    case AL_EFFECTSLOT_GAIN:
        *value = slot->Gain;
        break;

    default:
        SET_ERROR_AND_GOTO(context, AL_INVALID_ENUM, done);
    }

done:
    UnlockEffectSlotsRead(context);
    ALCcontext_DecRef(context);
}
开发者ID:IsemanTech,项目名称:openal-soft,代码行数:25,代码来源:alAuxEffectSlot.c


示例20: alGetAuxiliaryEffectSlotfv

AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotfv(ALuint effectslot, ALenum param, ALfloat *values)
{
    ALCcontext *context;

    switch(param)
    {
    case AL_EFFECTSLOT_GAIN:
        alGetAuxiliaryEffectSlotf(effectslot, param, values);
        return;
    }

    context = GetContextRef();
    if(!context) return;

    LockEffectSlotList(context);
    if(LookupEffectSlot(context, effectslot) == NULL)
        SETERR_GOTO(context, AL_INVALID_NAME, done, "Invalid effect slot ID %u", effectslot);
    switch(param)
    {
    default:
        alSetError(context, AL_INVALID_ENUM, "Invalid effect slot float-vector property 0x%04x",
                   param);
    }

done:
    UnlockEffectSlotList(context);
    ALCcontext_DecRef(context);
}
开发者ID:xxxbxxx,项目名称:openal-soft,代码行数:28,代码来源:alAuxEffectSlot.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ LookupNumeric函数代码示例发布时间:2022-05-30
下一篇:
C++ LookupAttachment函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap