本文整理汇总了C++中VCALL函数的典型用法代码示例。如果您正苦于以下问题:C++ VCALL函数的具体用法?C++ VCALL怎么用?C++ VCALL使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了VCALL函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: opensl_open_playback
static ALCenum opensl_open_playback(ALCdevice *Device, const ALCchar *deviceName)
{
osl_data *data = NULL;
SLresult result;
if(!deviceName)
deviceName = opensl_device;
else if(strcmp(deviceName, opensl_device) != 0)
return ALC_INVALID_VALUE;
data = calloc(1, sizeof(*data));
if(!data)
return ALC_OUT_OF_MEMORY;
// create engine
result = slCreateEngine(&data->engineObject, 0, NULL, 0, NULL, NULL);
PRINTERR(result, "slCreateEngine");
if(SL_RESULT_SUCCESS == result)
{
result = VCALL(data->engineObject,Realize)(SL_BOOLEAN_FALSE);
PRINTERR(result, "engine->Realize");
}
if(SL_RESULT_SUCCESS == result)
{
result = VCALL(data->engineObject,GetInterface)(SL_IID_ENGINE, &data->engine);
PRINTERR(result, "engine->GetInterface");
}
if(SL_RESULT_SUCCESS == result)
{
result = VCALL(data->engine,CreateOutputMix)(&data->outputMix, 0, NULL, NULL);
PRINTERR(result, "engine->CreateOutputMix");
}
if(SL_RESULT_SUCCESS == result)
{
result = VCALL(data->outputMix,Realize)(SL_BOOLEAN_FALSE);
PRINTERR(result, "outputMix->Realize");
}
if(SL_RESULT_SUCCESS != result)
{
if(data->outputMix != NULL)
VCALL0(data->outputMix,Destroy)();
data->outputMix = NULL;
if(data->engineObject != NULL)
VCALL0(data->engineObject,Destroy)();
data->engineObject = NULL;
data->engine = NULL;
free(data);
return ALC_INVALID_VALUE;
}
al_string_copy_cstr(&Device->DeviceName, deviceName);
Device->ExtraData = data;
return ALC_NO_ERROR;
}
示例2: ALCopenslPlayback_open
static ALCenum ALCopenslPlayback_open(ALCopenslPlayback *self, const ALCchar *name)
{
ALCdevice *device = STATIC_CAST(ALCbackend,self)->mDevice;
SLresult result;
if(!name)
name = opensl_device;
else if(strcmp(name, opensl_device) != 0)
return ALC_INVALID_VALUE;
// create engine
result = slCreateEngine(&self->mEngineObj, 0, NULL, 0, NULL, NULL);
PRINTERR(result, "slCreateEngine");
if(SL_RESULT_SUCCESS == result)
{
result = VCALL(self->mEngineObj,Realize)(SL_BOOLEAN_FALSE);
PRINTERR(result, "engine->Realize");
}
if(SL_RESULT_SUCCESS == result)
{
result = VCALL(self->mEngineObj,GetInterface)(SL_IID_ENGINE, &self->mEngine);
PRINTERR(result, "engine->GetInterface");
}
if(SL_RESULT_SUCCESS == result)
{
result = VCALL(self->mEngine,CreateOutputMix)(&self->mOutputMix, 0, NULL, NULL);
PRINTERR(result, "engine->CreateOutputMix");
}
if(SL_RESULT_SUCCESS == result)
{
result = VCALL(self->mOutputMix,Realize)(SL_BOOLEAN_FALSE);
PRINTERR(result, "outputMix->Realize");
}
if(SL_RESULT_SUCCESS != result)
{
if(self->mOutputMix != NULL)
VCALL0(self->mOutputMix,Destroy)();
self->mOutputMix = NULL;
if(self->mEngineObj != NULL)
VCALL0(self->mEngineObj,Destroy)();
self->mEngineObj = NULL;
self->mEngine = NULL;
return ALC_INVALID_VALUE;
}
alstr_copy_cstr(&device->DeviceName, name);
return ALC_NO_ERROR;
}
示例3: VOP_ISLOCKED
int VOP_ISLOCKED(struct vnode *vp)
{
struct vop_islocked_args a;
a.a_desc = VDESC(vop_islocked);
a.a_vp = vp;
return (VCALL(vp, VOFFSET(vop_islocked), &a));
}
示例4: VOP_STRATEGY
int VOP_STRATEGY(struct buf *bp)
{
struct vop_strategy_args a;
a.a_desc = VDESC(vop_strategy);
a.a_bp = bp;
return (VCALL(bp->b_vp, VOFFSET(vop_strategy), &a));
}
示例5: VOP_BWRITE
int VOP_BWRITE(struct buf *bp)
{
struct vop_bwrite_args a;
a.a_desc = VDESC(vop_bwrite);
a.a_bp = bp;
return (VCALL(bp->b_vp, VOFFSET(vop_bwrite), &a));
}
示例6: VOP_PRINT
int VOP_PRINT(struct vnode *vp)
{
struct vop_print_args a;
a.a_desc = VDESC(vop_print);
a.a_vp = vp;
return (VCALL(vp, VOFFSET(vop_print), &a));
}
示例7: VOP_RECLAIM
int VOP_RECLAIM(struct vnode *vp, struct proc *p)
{
struct vop_reclaim_args a;
a.a_desc = VDESC(vop_reclaim);
a.a_vp = vp;
a.a_p = p;
return (VCALL(vp, VOFFSET(vop_reclaim), &a));
}
示例8: VOP_ABORTOP
int VOP_ABORTOP(struct vnode *dvp, struct componentname *cnp)
{
struct vop_abortop_args a;
a.a_desc = VDESC(vop_abortop);
a.a_dvp = dvp;
a.a_cnp = cnp;
return (VCALL(dvp, VOFFSET(vop_abortop), &a));
}
示例9: VOP_REVOKE
int VOP_REVOKE(struct vnode *vp, int flags)
{
struct vop_revoke_args a;
a.a_desc = VDESC(vop_revoke);
a.a_vp = vp;
a.a_flags = flags;
return (VCALL(vp, VOFFSET(vop_revoke), &a));
}
示例10: VOP_KQFILTER
int VOP_KQFILTER(struct vnode *vp, struct knote *kn)
{
struct vop_kqfilter_args a;
a.a_desc = VDESC(vop_kqfilter);
a.a_vp = vp;
a.a_kn = kn;
return (VCALL(vp, VOFFSET(vop_kqfilter), &a));
}
示例11: VOP_POLL
int VOP_POLL(struct vnode *vp, int events, struct proc *p)
{
struct vop_poll_args a;
a.a_desc = VDESC(vop_poll);
a.a_vp = vp;
a.a_events = events;
a.a_p = p;
return (VCALL(vp, VOFFSET(vop_poll), &a));
}
示例12: VOP_UNLOCK
int VOP_UNLOCK(struct vnode *vp, int flags, struct proc *p)
{
struct vop_unlock_args a;
a.a_desc = VDESC(vop_unlock);
a.a_vp = vp;
a.a_flags = flags;
a.a_p = p;
return (VCALL(vp, VOFFSET(vop_unlock), &a));
}
示例13: VOP_OPEN
int VOP_OPEN(struct vnode *vp, int mode, struct ucred *cred, struct proc *p)
{
struct vop_open_args a;
a.a_desc = VDESC(vop_open);
a.a_vp = vp;
a.a_mode = mode;
a.a_cred = cred;
a.a_p = p;
return (VCALL(vp, VOFFSET(vop_open), &a));
}
示例14: opensl_stop_playback
static void opensl_stop_playback(ALCdevice *Device)
{
osl_data *data = Device->ExtraData;
SLPlayItf player;
SLresult result;
result = VCALL(data->bufferQueueObject,GetInterface)(SL_IID_PLAY, &player);
PRINTERR(result, "bufferQueue->GetInterface");
if(SL_RESULT_SUCCESS == result)
{
result = VCALL(player,SetPlayState)(SL_PLAYSTATE_STOPPED);
PRINTERR(result, "player->SetPlayState");
}
free(data->buffer);
data->buffer = NULL;
data->bufferSize = 0;
}
示例15: VOP_LOOKUP
int VOP_LOOKUP(struct vnode *dvp, struct vnode **vpp,
struct componentname *cnp)
{
struct vop_lookup_args a;
a.a_desc = VDESC(vop_lookup);
a.a_dvp = dvp;
a.a_vpp = vpp;
a.a_cnp = cnp;
return (VCALL(dvp, VOFFSET(vop_lookup), &a));
}