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

C++ ProcessContext函数代码示例

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

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



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

示例1: alcMakeContextCurrent

/*
    alcMakeContextCurrent

    Makes the given Context the active Context
*/
ALCAPI ALCboolean ALCAPIENTRY alcMakeContextCurrent(ALCcontext *context)
{
    ALCcontext *ALContext;
    ALboolean bReturn = AL_TRUE;

    SuspendContext(NULL);

    // context must be a valid Context or NULL
    if ((IsContext(context)) || (context == NULL))
    {
        if ((ALContext=alcGetCurrentContext()))
        {
            SuspendContext(ALContext);
            ALContext->InUse=AL_FALSE;
            ProcessContext(ALContext);
        }

        if ((ALContext=context) && (ALContext->Device))
        {
            SuspendContext(ALContext);
            ALContext->InUse=AL_TRUE;
            ProcessContext(ALContext);
        }
    }
    else
    {
        SetALCError(ALC_INVALID_CONTEXT);
        bReturn = AL_FALSE;
    }

    ProcessContext(NULL);

    return bReturn;
}
开发者ID:xiaobinshe,项目名称:multitv,代码行数:39,代码来源:ALc.c


示例2: alcMakeContextCurrent

/*
    alcMakeContextCurrent

    Makes the given Context the active Context
*/
ALCAPI ALCboolean ALCAPIENTRY alcMakeContextCurrent(ALCcontext *context)
{
    ALCcontext *ALContext;
    ALboolean bReturn = AL_TRUE;

    SuspendContext(NULL);

    // context must be a valid Context or NULL
    if(context == NULL || IsContext(context))
    {
        if((ALContext=GetContextSuspended()) != NULL)
        {
            ALContext->InUse=AL_FALSE;
            ProcessContext(ALContext);
        }

        if((ALContext=context) != NULL && ALContext->Device)
        {
            SuspendContext(ALContext);
            ALContext->InUse=AL_TRUE;
            ProcessContext(ALContext);
        }

        tls_set(LocalContext, NULL);
    }
    else
    {
        alcSetError(ALC_INVALID_CONTEXT);
        bReturn = AL_FALSE;
    }

    ProcessContext(NULL);

    return bReturn;
}
开发者ID:SergeStinckwich,项目名称:openqwaq,代码行数:40,代码来源:ALc.c


示例3: alGetAuxiliaryEffectSlotf

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

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

    if (alIsAuxiliaryEffectSlot(effectslot))
    {
        ALeffectslot *ALEffectSlot = (ALeffectslot*)ALTHUNK_LOOKUPENTRY(effectslot);

        switch(param)
        {
        case AL_EFFECTSLOT_GAIN:
            *pflValue = ALEffectSlot->Gain;
            break;

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

    ProcessContext(Context);
}
开发者ID:SergeStinckwich,项目名称:openqwaq,代码行数:27,代码来源:alAuxEffectSlot.c


示例4: alAuxiliaryEffectSlotiv

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

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

    if (alIsAuxiliaryEffectSlot(effectslot))
    {
        switch(param)
        {
        case AL_EFFECTSLOT_EFFECT:
        case AL_EFFECTSLOT_AUXILIARY_SEND_AUTO:
            alAuxiliaryEffectSloti(effectslot, param, piValues[0]);
            break;

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

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


示例5: alGetDatabufferivEXT

AL_API ALvoid AL_APIENTRY alGetDatabufferivEXT(ALuint buffer, ALenum eParam, ALint* plValues)
{
    ALCcontext    *pContext;
    ALCdevice     *Device;

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

    if(plValues)
    {
        Device = pContext->Device;
        if(LookupDatabuffer(Device->DatabufferMap, buffer) != NULL)
        {
            switch (eParam)
            {
            case AL_SIZE:
                alGetDatabufferiEXT(buffer, eParam, plValues);
                break;

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

    ProcessContext(pContext);
}
开发者ID:3dseals,项目名称:furseal,代码行数:32,代码来源:alDatabuffer.c


示例6: alGetDatabufferSubDataEXT

AL_API ALvoid AL_APIENTRY alGetDatabufferSubDataEXT(ALuint uiBuffer, ALintptrEXT start, ALsizeiptrEXT length, ALvoid *data)
{
    ALCcontext    *pContext;
    ALdatabuffer  *pBuffer;
    ALCdevice     *Device;

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

    Device = pContext->Device;
    if((pBuffer=LookupDatabuffer(Device->DatabufferMap, uiBuffer)) != NULL)
    {
        if(start >= 0 && length >= 0 && start+length <= pBuffer->size)
        {
            if(pBuffer->state == UNMAPPED)
                memcpy(data, pBuffer->data+start, length);
            else
                alSetError(pContext, AL_INVALID_OPERATION);
        }
        else
            alSetError(pContext, AL_INVALID_VALUE);
    }
    else
        alSetError(pContext, AL_INVALID_NAME);

    ProcessContext(pContext);
}
开发者ID:3dseals,项目名称:furseal,代码行数:27,代码来源:alDatabuffer.c


示例7: alSpeedOfSound

AL_API ALvoid AL_APIENTRY alSpeedOfSound(ALfloat flSpeedOfSound)
{
    ALCcontext *pContext;
    ALboolean updateSources = AL_FALSE;

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

    if(flSpeedOfSound > 0.0f)
    {
        pContext->flSpeedOfSound = float2ALfp(flSpeedOfSound);
        updateSources = AL_TRUE;
    }
    else
        alSetError(pContext, AL_INVALID_VALUE);

    if(updateSources)
    {
        ALsizei pos;
        for(pos = 0;pos < pContext->SourceMap.size;pos++)
        {
            ALsource *source = pContext->SourceMap.array[pos].value;
            source->NeedsUpdate = AL_TRUE;
        }
    }

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


示例8: alDopplerFactor

AL_API ALvoid AL_APIENTRY alDopplerFactor(ALfloat value)
{
    ALCcontext *Context;
    ALboolean updateSources = AL_FALSE;

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

    if(value >= 0.0f)
    {
        Context->DopplerFactor = float2ALfp(value);
        updateSources = AL_TRUE;
    }
    else
        alSetError(Context, AL_INVALID_VALUE);

    // Force updating the sources for these parameters, since even head-
    // relative sources are affected
    if(updateSources)
    {
        ALsizei pos;
        for(pos = 0;pos < Context->SourceMap.size;pos++)
        {
            ALsource *source = Context->SourceMap.array[pos].value;
            source->NeedsUpdate = AL_TRUE;
        }
    }

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


示例9: alBufferiv

ALAPI void ALAPIENTRY alBufferiv(ALuint buffer, ALenum eParam, const ALint* plValues)
{
    ALCcontext    *pContext;

    (void)plValues;

    pContext = alcGetCurrentContext();
    SuspendContext(pContext);

    if (alIsBuffer(buffer) && (buffer != 0))
    {
        switch(eParam)
        {
        default:
            alSetError(AL_INVALID_ENUM);
            break;
        }
    }
    else
    {
        alSetError(AL_INVALID_NAME);
    }

    ProcessContext(pContext);
}
开发者ID:ghoulsblade,项目名称:vegaogre,代码行数:25,代码来源:alBuffer.c


示例10: alBuffer3f

ALAPI void ALAPIENTRY alBuffer3f(ALuint buffer, ALenum eParam, ALfloat flValue1, ALfloat flValue2, ALfloat flValue3)
{
    ALCcontext    *pContext;

    (void)flValue1;
    (void)flValue2;
    (void)flValue3;

    pContext = alcGetCurrentContext();
    SuspendContext(pContext);

    if (alIsBuffer(buffer) && (buffer != 0))
    {
        switch(eParam)
        {
        default:
            alSetError(AL_INVALID_ENUM);
            break;
        }
    }
    else
    {
        alSetError(AL_INVALID_NAME);
    }

    ProcessContext(pContext);
}
开发者ID:ghoulsblade,项目名称:vegaogre,代码行数:27,代码来源:alBuffer.c


示例11: alcCaptureCloseDevice

ALCAPI ALCboolean ALCAPIENTRY alcCaptureCloseDevice(ALCdevice *pDevice)
{
    ALCboolean bReturn = ALC_FALSE;
    ALCdevice **list;

    if ((pDevice)&&(pDevice->IsCaptureDevice))
    {
        SuspendContext(NULL);

        list = &g_pDeviceList;
        while(*list != pDevice)
            list = &(*list)->next;

        *list = (*list)->next;
        g_ulDeviceCount--;

        ProcessContext(NULL);

        ALCdevice_CloseCapture(pDevice);
        free(pDevice);

        bReturn = ALC_TRUE;
    }
    else
        SetALCError(ALC_INVALID_DEVICE);

    return bReturn;
}
开发者ID:ghoulsblade,项目名称:vegaogre,代码行数:28,代码来源:ALc.c


示例12: alDistanceModel

ALAPI ALvoid ALAPIENTRY alDistanceModel(ALenum value)
{
    ALCcontext *Context;
    ALsource *Source;

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

    switch(value)
    {
        case AL_NONE:
        case AL_INVERSE_DISTANCE:
        case AL_INVERSE_DISTANCE_CLAMPED:
        case AL_LINEAR_DISTANCE:
        case AL_LINEAR_DISTANCE_CLAMPED:
        case AL_EXPONENT_DISTANCE:
        case AL_EXPONENT_DISTANCE_CLAMPED:
            Context->DistanceModel = value;
            for(Source = Context->Source;Source != NULL;Source = Source->next)
                Source->DistanceModel = value;
            break;

        default:
            alSetError(AL_INVALID_VALUE);
            break;
    }

    ProcessContext(Context);
}
开发者ID:SergeStinckwich,项目名称:openqwaq,代码行数:29,代码来源:alState.c


示例13: alGetDouble

ALAPI ALdouble ALAPIENTRY alGetDouble(ALenum pname)
{
    ALCcontext *Context;
    ALdouble value = 0.0;

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

    switch(pname)
    {
        case AL_DOPPLER_FACTOR:
            value = (double)Context->DopplerFactor;
            break;

        case AL_DOPPLER_VELOCITY:
            value = (double)Context->DopplerVelocity;
            break;

        case AL_DISTANCE_MODEL:
            value = (double)Context->DistanceModel;
            break;

        case AL_SPEED_OF_SOUND:
            value = (double)Context->flSpeedOfSound;
            break;

        default:
            alSetError(AL_INVALID_ENUM);
            break;
    }

    ProcessContext(Context);

    return value;
}
开发者ID:SergeStinckwich,项目名称:openqwaq,代码行数:35,代码来源:alState.c


示例14: alDisable

AL_API ALvoid AL_APIENTRY alDisable(ALenum capability)
{
    ALCcontext *Context;
    ALboolean  updateSources = AL_FALSE;

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

    switch(capability)
    {
        case AL_SOURCE_DISTANCE_MODEL:
            Context->SourceDistanceModel = AL_FALSE;
            updateSources = AL_TRUE;
            break;

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

    if(updateSources)
    {
        ALsource *source = Context->SourceList;
        while(source)
        {
            source->NeedsUpdate = AL_TRUE;
            source = source->next;
        }
    }

    ProcessContext(Context);
}
开发者ID:SergeStinckwich,项目名称:openqwaq,代码行数:32,代码来源:alState.c


示例15: alSpeedOfSound

AL_API ALvoid AL_APIENTRY alSpeedOfSound(ALfloat flSpeedOfSound)
{
    ALCcontext *pContext;
    ALboolean updateSources = AL_FALSE;

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

    if(flSpeedOfSound > 0.0f)
    {
        pContext->flSpeedOfSound = flSpeedOfSound;
        updateSources = AL_TRUE;
    }
    else
        alSetError(pContext, AL_INVALID_VALUE);

    if(updateSources)
    {
        ALsource *source = pContext->SourceList;
        while(source)
        {
            source->NeedsUpdate = AL_TRUE;
            source = source->next;
        }
    }

    ProcessContext(pContext);
}
开发者ID:SergeStinckwich,项目名称:openqwaq,代码行数:28,代码来源:alState.c


示例16: alGetFloat

AL_API ALfloat AL_APIENTRY alGetFloat(ALenum pname)
{
    ALCcontext *Context;
    ALfloat value = 0.0f;

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

    switch(pname)
    {
        case AL_DOPPLER_FACTOR:
            value = ALfp2float(Context->DopplerFactor);
            break;

        case AL_DOPPLER_VELOCITY:
            value = ALfp2float(Context->DopplerVelocity);
            break;

        case AL_DISTANCE_MODEL:
            value = (float)Context->DistanceModel;
            break;

        case AL_SPEED_OF_SOUND:
            value = ALfp2float(Context->flSpeedOfSound);
            break;

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

    ProcessContext(Context);

    return value;
}
开发者ID:120pulsations,项目名称:Torque2D,代码行数:35,代码来源:alState.c


示例17: alGetString

AL_API const ALchar* AL_APIENTRY alGetString(ALenum pname)
{
    const ALchar *value;
    ALCcontext *pContext;

    pContext = GetContextSuspended();
    if(!pContext) return NULL;

    switch(pname)
    {
        case AL_VENDOR:
            value=alVendor;
            break;

        case AL_VERSION:
            value=alVersion;
            break;

        case AL_RENDERER:
            value=alRenderer;
            break;

        case AL_EXTENSIONS:
            value=pContext->ExtensionList;//alExtensions;
            break;

        case AL_NO_ERROR:
            value=alNoError;
            break;

        case AL_INVALID_NAME:
            value=alErrInvalidName;
            break;

        case AL_INVALID_ENUM:
            value=alErrInvalidEnum;
            break;

        case AL_INVALID_VALUE:
            value=alErrInvalidValue;
            break;

        case AL_INVALID_OPERATION:
            value=alErrInvalidOp;
            break;

        case AL_OUT_OF_MEMORY:
            value=alErrOutOfMemory;
            break;

        default:
            value=NULL;
            alSetError(pContext, AL_INVALID_ENUM);
            break;
    }

    ProcessContext(pContext);

    return value;
}
开发者ID:120pulsations,项目名称:Torque2D,代码行数:60,代码来源:alState.c


示例18: alGetBuffer3i

ALAPI void ALAPIENTRY alGetBuffer3i(ALuint buffer, ALenum eParam, ALint* plValue1, ALint* plValue2, ALint* plValue3)
{
    ALCcontext    *pContext;

    pContext = alcGetCurrentContext();
    SuspendContext(pContext);

    if ((plValue1) && (plValue2) && (plValue3))
    {
        if (alIsBuffer(buffer) && (buffer != 0))
        {
            switch(eParam)
            {
            default:
                alSetError(AL_INVALID_ENUM);
                break;
            }
        }
        else
        {
            alSetError(AL_INVALID_NAME);
        }
    }
    else
    {
        alSetError(AL_INVALID_VALUE);
    }

    ProcessContext(pContext);
}
开发者ID:ghoulsblade,项目名称:vegaogre,代码行数:30,代码来源:alBuffer.c


示例19: alDopplerVelocity

AL_API ALvoid AL_APIENTRY alDopplerVelocity(ALfloat value)
{
    ALCcontext *Context;
    ALboolean updateSources = AL_FALSE;

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

    if(value > 0.0f)
    {
        Context->DopplerVelocity=float2ALfp(value);
        updateSources = AL_TRUE;
    }
    else
        alSetError(Context, AL_INVALID_VALUE);

    if(updateSources)
    {
        ALsizei pos;
        for(pos = 0;pos < Context->SourceMap.size;pos++)
        {
            ALsource *source = Context->SourceMap.array[pos].value;
            source->NeedsUpdate = AL_TRUE;
        }
    }

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


示例20: 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



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ ProcessData函数代码示例发布时间:2022-05-30
下一篇:
C++ ProcessCommand函数代码示例发布时间: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