CRI ADX  Last Updated: 2024-07-17 10:48 p
Panning
示例目录
/cri/pc/samples/criatomex/control_pan
示例描述
可以通过使用Panning 3D的功能来控制声音定位。 Panning 3D支持内部Panning,可以将声像定位到扬声器内侧。 功能的详细信息请参照Panning
用于控制定位的函数
CriFloat32 pan3d_angle;
/* 创建Player */
player = criAtomExPlayer_Create(NULL, NULL, 0);
/* 指定Cue */
criAtomExPlayer_SetCueName(player, acb_hn, "heli_Loop");
/* 开始播放 */
/* 一边更改Panning3D角度一边播放 */
for(pan3d_angle = -180.0f; pan3d_angle <= 180.0f; pan3d_angle += 0.1f) {
/* V同步等待 */
criFwSys_WaitVsync();
/* 执行Server处理 */
/* 设置Panning 3D角度 */
criAtomExPlayer_SetPan3dAngle(player, pan3d_angle);
/* 更新处理 */
}
void criAtomEx_ExecuteMain(void)
Execute the server processing
void criAtomExPlayer_SetPan3dAngle(CriAtomExPlayerHn player, CriFloat32 pan3d_angle)
Set the panning 3D angle
void criAtomExPlayer_SetCueName(CriAtomExPlayerHn player, CriAtomExAcbHn acb_hn, const CriChar8 *cue_name)
Set the sound data to play (specifying a Cue name)
CriAtomExPlaybackId criAtomExPlayer_Start(CriAtomExPlayerHn player)
Start the playback
CriAtomExPlayerObj * CriAtomExPlayerHn
Player handle
Definition: cri_le_atom_ex.h:3622
void criAtomExPlayer_UpdateAll(CriAtomExPlayerHn player)
Update the playback parameters (for all sounds currently playing)
CriAtomExPlayerHn criAtomExPlayer_Create(const CriAtomExPlayerConfig *config, void *work, CriSint32 work_size)
Create an AtomEx player


示例使用的数据中AtomCraft项目的目录

/cri/tools/criatomex/examples/tutorial_data_for_runtime